How TypeScript template literal types helped us with multiple database support
In November last year, TypeScript introduced template literal types which opened up new possibilities for developers. These types allowed for more precise control over string literals and made it easier to maintain code. At Hasura, we recently utilized these template literal types in our multiple database support feature. By using Path and PathValue types along with a get function, we were able to implement type-safe dot string notation and autocomplete features. This greatly improved the developer experience and allowed for safer code writing.
Company
Hasura
Date published
May 11, 2021
Author(s)
Aleksandra
Word count
1122
Language
English
Hacker News points
None found.