andywer / andywer/squid

Support for branded types in schema

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
157
Forks
7
PR merge metrics
No merged PRs in 30d

Description

We use brands extensively in our code to make it easy to distinguish between different types of integers. For example:
```
type Brand = K & { __brand: T };
export type CommunityId = Brand;
export type UserId = Brand;
```

It would be great if I could define this in my schema so that the columns in query results have the right type instead of having to be converted.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.