You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to the proposal @ #1404, we could also use Readonly<T> to represent the equivalent of ColumnType<T, never, never> for column types, but in a TypeScript-native way that's much more readable and concise. Some tools and people use GeneratedAlways<T> as a shorthand for this use case, but it's semantically wrong.
Readonly<T> requires using primitive type constructors, e.g. String instead of string.
Hey 👋
Proposal:
Similar to the proposal @ #1404, we could also use
Readonly<T>
to represent the equivalent ofColumnType<T, never, never>
for column types, but in a TypeScript-native way that's much more readable and concise. Some tools and people useGeneratedAlways<T>
as a shorthand for this use case, but it's semantically wrong.Readonly<T>
requires using primitive type constructors, e.g.String
instead ofstring
.It supports nullable:
Cons:
Forcing usage of constructor types for primitives.
It's niche, and there's already a way to achieve the same thing.
The text was updated successfully, but these errors were encountered: