JS Type Checker Wish List: Regex validated strings
type HexColor = /#[0-9a-f]+/i;
const color: HexColor = '#eee'; // fine
const color: HexColor = 'red'; // error!
-
Show this thread
-
Replying to @sebmck
Check Facebook's internal Flow support group. I asked for that feature before, and remember that there was a good reply. That feature would be helpful in many cases.
1 reply 0 retweets 2 likes
Replying to @millermedeiros
Just checked and it was "that's a great idea, we don't have time, PRs accepted" which is about what I expected haha
0 replies
1 retweet
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 