4 ms·
> This number scared us (a lot) at first but we quickly figured out that most of these were related to TypeScript not supporting .js files. Typescript actually
by drew-y 8y ago
> This number scared us (a lot) at first but we quickly figured out that most of these were related to TypeScript not supporting .js files.
Typescript actually does support .js files. You just need to use the `--alowJs` option.
- ng12 8y agoI think it's a catastrophically poor decision to not have the allowJs behavior as the default. That one flag fixed almost all of the QOL issues I was having.
- WorldMaker 8y agoIt's the default if you name your project-level config file jsconfig.json instead of tsconfig.json, which is an interesting convention versus configuration trade-off. VSCode makes this somewhat clear in some of its tools (it will offer to create a jsconfig or tsconfig for you and tries to guess based on source code metrics), but it's easy to miss in most Typescript documentation.