4 ms·
These are literal string types. Its a feature of at least two languages that I know of: Typescript: https://www.typescriptlang.org/docs/handbook/literal-types.
by a_humean 3y ago
These are literal string types. Its a feature of at least two languages that I know of:
Typescript:
https://www.typescriptlang.org/docs/handbook/literal-types.html https://www.typescriptlang.org/docs/handbook/literal-types.h...
Scala:
https://docs.scala-lang.org/sips/42.type.html https://docs.scala-lang.org/sips/42.type.html
Typescript goes a step further has has things like template literal types:
https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html https://www.typescriptlang.org/docs/handbook/2/template-lite...
They are a little bit more than string mappings, and the mapping you do see is all codegen generated from the DB schema.