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
#12754
"Key mapping" is really 3 features:
String concat types
Join
Join<["a", "b", "c"], ","
"a,b,c"
Split
Split<"a,b,c", ",">
["a", "b", "c"]
Name clause for mapped types
type Foo<T> = { [K in keyof T as `get_${K}` ]: () => T[K] }; // ^^^^^^^^^^^^^ // Current syntax
never
0
"0"
Operators: uppercase, lowercase, capitalize, uncapitalize
Previously had an error on large unions.
`${Digit}${Digit}${Digit}${Digit}${Digit}`
Can imagine a prefix in these strings the same way find/replace works in editors
\u${SomeType}
How do we feel about as in key mapping?
as
in
customDescriptionGenerator
https://github.com/microsoft/vscode-js-debug/blob/a04cff2e4c2b39616d4e1b813f41a40643b9fa76/OPTIONS.md#customdescriptiongenerator-1
Node
Symbol
Signature
FlowNode
The text was updated successfully, but these errors were encountered:
#40308 for the PR utilizing customDescriptionGenerator
Sorry, something went wrong.
I saw that there is now helpers for Uppercase, Lowercase, etc... Is there any push to do this kebab-case, camelCase, snake_case?
kebab-case, camelCase, snake_case
This would be handy for Database types
Linking to #40505, #40336.
No branches or pull requests
Key Mapping in Mapped Types
#12754
"Key mapping" is really 3 features:
String concat types
Join
operator that takes a bunch of literals and separates them by a delimiter.Join<["a", "b", "c"], ","
->"a,b,c"
Split
using inference; string splitting uses non-greedy matching.Split<"a,b,c", ",">
->["a", "b", "c"]
Name clause for mapped types
never
, and that removes a keyI * Have to make sure that's the behavior (bug in current implementation)
0
and the string key"0"
.Operators: uppercase, lowercase, capitalize, uncapitalize
Previously had an error on large unions.
`${Digit}${Digit}${Digit}${Digit}${Digit}`
Can imagine a prefix in these strings the same way find/replace works in editors
\u${SomeType}
How do we feel about
as
in key mapping?as
looks like it is doing something with the constraint of the mapped type (the right side of thein
)customDescriptionGenerator
https://github.com/microsoft/vscode-js-debug/blob/a04cff2e4c2b39616d4e1b813f41a40643b9fa76/OPTIONS.md#customdescriptiongenerator-1
Node
s,Symbol
s,Signature
s,FlowNode
s.The text was updated successfully, but these errors were encountered: