You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to see Regex types be added into typescript. This would allow us to create types for specific necessary strings. I feel like adding template literal types was a step in the right direction, but this would be even better.
📃 Example
typeAllUppercase=/^[A-Z]+$/;
let myLowercaseVariable: AllUppercase="test";// error
let myUppercaseVariable: AllUppercase="TEST";// works
The text was updated successfully, but these errors were encountered:
Add Regex String Types
⭐ Suggestion
I'd like to see Regex types be added into typescript. This would allow us to create types for specific necessary strings. I feel like adding template literal types was a step in the right direction, but this would be even better.
📃 Example
The text was updated successfully, but these errors were encountered: