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
Literal type, string mapping type, intersection
https://www.typescriptlang.org/play?#code/C4TwDgpgBAYg9nKBeKBvKYBOcwC4oDOwmAlgHYDmUAvgNwBQ9okUAKgAzKwIDaARFhx8AurShQA9BKgB5ANZNw0VgEYu8OP0Fg+UAGRQABmAAkqIqUrUwh0eKmyFzZQCZ1vAdh36jp1ABk4AHcITABjAEMCCAAeC3IKAD5rWzFJaXlFFlYAZndNTyEfQJDwqNj4ykS7dKgAUUxsTAAaKCCI4AB+eiA
type Foo = { prop: string }; type T0 = Foo["prop"]; // string type T1 = Foo["prop" & `p${string}p`]; // string type T2 = Foo["prop" & `p${Lowercase<string>}p`]; // string type T3 = Foo["prop" & Lowercase<string>]; // Error, wat?
Error.
No error.
See here.
The text was updated successfully, but these errors were encountered:
ahejlsberg
Successfully merging a pull request may close this issue.
π Search Terms
Literal type, string mapping type, intersection
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/C4TwDgpgBAYg9nKBeKBvKYBOcwC4oDOwmAlgHYDmUAvgNwBQ9okUAKgAzKwIDaARFhx8AurShQA9BKgB5ANZNw0VgEYu8OP0Fg+UAGRQABmAAkqIqUrUwh0eKmyFzZQCZ1vAdh36jp1ABk4AHcITABjAEMCCAAeC3IKAD5rWzFJaXlFFlYAZndNTyEfQJDwqNj4ykS7dKgAUUxsTAAaKCCI4AB+eiA
π» Code
π Actual behavior
Error.
π Expected behavior
No error.
Additional information about the issue
See here.
The text was updated successfully, but these errors were encountered: