Effect CommunityEC
Effect Community2y ago
3 replies
RJ

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):

type GenericId<TableName extends string> = string & { __tableName: TableName }


What's the best way to do this?
Was this page helpful?