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
Hello,
I would suggest to add a "regex literal" type to make ensuring that a string data matches a pattern at assigment.
As the literal string feature has been added in the latest release, i found very convenient to type my variables with, e.g. for typing my react props (size : "small"| "big" )... On the same idea, it could be convenient to be able to type a variable with a pattern.
Example :
var myString : /\d{3}.*\d{2}/;
myString="555hhhhh44" ; //correct
myString="55dsds5dss4"; //error
In react it could be vey useful for defining a react prop like phone numbers, emails, dates, ...
regards
Xavier
The text was updated successfully, but these errors were encountered:
Hello,
I would suggest to add a "regex literal" type to make ensuring that a string data matches a pattern at assigment.
As the literal string feature has been added in the latest release, i found very convenient to type my variables with, e.g. for typing my react props (size : "small"| "big" )... On the same idea, it could be convenient to be able to type a variable with a pattern.
Example :
In react it could be vey useful for defining a react prop like phone numbers, emails, dates, ...
regards
Xavier
The text was updated successfully, but these errors were encountered: