andywer / andywer/squid

Support for branded types in schema

Offen
#34 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
157
Forks
7
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.