template literal/backtick string types e.g. type T = `type-${string}`
I can't see how to do in Ark:
I specifically want compile-time checking.
Tried to drop it in "1:1" style, but this doesn't work as-is:
nor did it work trying to use 'type' as a tagged template:
I did look in the docs but I don't believe it's there yet, and if it's in the tests I didn't spot it
Do I have to set it up as a custom string constraint so it'd be like
IIUC this doesn't get the compile-time checking:
I specifically want compile-time checking.
Tried to drop it in "1:1" style, but this doesn't work as-is:
nor did it work trying to use 'type' as a tagged template:
I did look in the docs but I don't believe it's there yet, and if it's in the tests I didn't spot it
Do I have to set it up as a custom string constraint so it'd be like
const UserId = type('string-userId')? IIUC this doesn't get the compile-time checking:
// Subtypes like 'email' are inferred like 'string' but provide additional validation at runtime.
email: "string.email",