This is a great tip to avoid having to set ‘as const’ on a thousand separate string inputs in TypeScript: pawelgrzybek.com/infer-type-o...
pawelgrzybek.comInfer type of a function argument as const in TypeScript | pawelgrzybek.comTypeScript infers literal types from function arguments of primitive types and creates more general types for complex data structures. There may be a situation when you need a stricter type of inferen...
0 reposts3 likes