Sure, now make it work without having to type "\\w"
ssalbdivad•7h ago
Yes, there are limits on what string literals can precisely represent, but we've tried to be pragmatic about trade offs around clarity, concision and performance.
Subexpressions like `\\w` or `[a-Z]` would just be inferred as `${string}`, but that doesn't mean the inference won't be useful. For example:
wredcoll•8h ago
ssalbdivad•7h ago
Subexpressions like `\\w` or `[a-Z]` would just be inferred as `${string}`, but that doesn't mean the inference won't be useful. For example:
expression: regex("^\\w+@\\w+\\.\\w+$") type: Regex<`${string}@${string}.${string}`>
wredcoll•5h ago
ssalbdivad•3h ago
wredcoll•14m ago