Creating a Schema for a Branded Type in TypeScript
I'd like to create a Schema for a branded type which looks like this (I cannot change the definition of this type):
What's the best way to do this?
What's the best way to do this?
type GenericId<TableName extends string> = string & { __tableName: TableName }