Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I didn't go deep into the docs, but the 'movie' on the homepage clearly shows string-based field name mappings so I instantly saw that as a red flag...

Nice to know it's implemented better though.



TypeScript allows strongly typed string constants. It's actually not a red flag, it's just idiomatic TypeScript.


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.h...

Scala: 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-lite...

They are a little bit more than string mappings, and the mapping you do see is all codegen generated from the DB schema.


Yeah, TS has a very flexible/powerful type system. You can have a type like ‘full_name’, that can only be that exact string, or a type like ‘full_name’ | ‘id’ | ‘email’, that can only be those 3 strings, etc. Kysely takes advantage of those sorts of types.


It’s a string but TS is crazily powerful. The generated types would verify it’s the correct string says like table_name and the columns name also matches with table_name.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: