Generate types for FormatJS translation keys and use them to avoid typos, get autocompletion, etc.
It happens often I need to implement a TypeScript type-guard that consumes an object-like type, but did not found clear examples in official documentation or articles. This is the solution I found.
Neovim is my favourite editor for modern web development with React, TypeScript, etc. Here it is my setup.
Define a list of strings that represents a set of entities, using Literal Types instead of Enum
If you are writing a JavaScript code base you should use TypeScript, even if you are not writing TypeScript code.