I just wonder - is it a way to check if the string matches some pattern via TypeScript.
I don't want to do the checks in the runtime.
//What I have now
public id: string; //can be whatever string
//What I want to see
public id: IdType; //Some type?
id = '0000-0000-0000-0001'//valid
id = 'whatever'//invalid
So is it a way to define string format?