Handling Type Mismatch with Branded IDs in TypeScript
Hey all, I have a a schema and am using a branded ID:
I am querying my database using the TS Drizzle library which returns a typescript type of the database table. The returned string is NOT a branded AssetId.
What is the proper way to handle this scenario?
I am querying my database using the TS Drizzle library which returns a typescript type of the database table. The returned string is NOT a branded AssetId.
return new Asset(assetReturnedFromDrizzle); However it throws the "string is not type of AssetId" which makes sense. What is the proper way to handle this scenario?

