Experimental project to figure out how to make a custom TypeScript transformation from a json import to an inline object as const.
To try it out:
clone repositoryyarn
To build:
yarn ttsc --outDir ./build
Challenges as described in this SO post
- How to configure VS Code use the custom transformation of
import c from './some.json';toconst c = { "test": "Hello world!" } as const;, e.g. for type checking and intellisense support - How to configure build to use type during type checking