I've a small piece of JavaScript that I open on Visual Studio Code, I then enable @ts-check
to get type hinting from TypeScript
definition files.
When I refer to a type that comes from a different import VSCode will give the hint and add the following code to the beginning of the file:
import { SomeType } from 'some-module';
This is correct if I'm working on ES6 but currently I'm targetting to older runtimes and would prefer to get the generated code be written using the commonjs
syntax:
var SomeType = require('some-module').SomeType;
Is there any configuration I can change to achieve this behavior?