We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template string, Intersection type
4.5.4
Playground link with relevant code
const a = 'a' type A = typeof a type Mix = A & {foo: string} type Origin1 = `${A}` // type is 'a' type Origin2 = `${Mix}` // type is string
Origin1 is 'a' and Origin2 is string
Origin1
'a'
Origin2
string
Origin1 and Origin2 both are 'a'
The text was updated successfully, but these errors were encountered:
And I found that I cannot use Mix in indexed object.
type Object1 = {[K in A]: number} // type is {a: number}, correct type Object2 = {[K in Mix]: number} // type is {}, wrong
Sorry, something went wrong.
const
Successfully merging a pull request may close this issue.
Bug Report
π Search Terms
Template string, Intersection type
π Version & Regression Information
4.5.4
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Origin1
is'a'
andOrigin2
isstring
π Expected behavior
Origin1
andOrigin2
both are'a'
The text was updated successfully, but these errors were encountered: