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
infer
charAt
text-transform
capitalize
uppercase
[]
`${...infer Foo}`
Foo
D
(.*?D)
(.?)
(.)
as
{ [K in T as Foo]: Bar }
T
`a${"b"}` as const
string
"ab"
`a${x}` as const
`a${typeof x}`
as const
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Template Types and Key Remapping
Template Types and
infer
charAt
. Not necessarily well-formed.text-transform
values distinguish betweencapitalize
anduppercase
?[]
in conditional types to avoid distributivity.`${...infer Foo}`
to get all potential arrays of characters inFoo
infer
with delimiterD
=(.*?D)
infer
with no delimiter =(.?)
infer
with no delimiter =(.)
(.?)
as
clausesas
clause removes the constraint of the type being iterated over - so in{ [K in T as Foo]: Bar }
, there is no constraint onT
at all!Future Direction
`a${"b"}` as const
isstring
"ab"
.`a${x}` as const
being`a${typeof x}`
?as const
- kind of a signal to "constant fold" the types.The text was updated successfully, but these errors were encountered: