-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
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
String literal type operators #12940
Comments
Should be covered by the proposal in #6579 |
@mhegazy I think this it depends how deep we want to go with this. Regex types are a much more generalized idea, but also bring complexity. |
Also it seems that Regexes are at odds with |
It's not a duplicate of #6579 without some way of incorporating a The sticking point seems to be the use of non-enumerable types extending The proposal for |
then #12754 is what you are looking for. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
It would be useful if we could combine string literal types to create new types. For example suppose
A
andB
extendstring
then:This would combine well with mapped types. For example suppose we want to specify an ordering of records of type
T
to some third-party module that requires SQL-like syntax. We could write:Maybe some other forms would be useful:
The text was updated successfully, but these errors were encountered: