#Is there a difference between typescript's import syntax and the ESM standard?
6 messages · Page 1 of 1 (latest)
typescript has import = and export = to model how cjs or similar systems work more closely
it also has type-level imports
ts imports have to model both esm and cjs as well as type stuff so it's a superset of esm
@shrewd minnow Sorry for the late reply. First of all, thanks for the information! Are there lots of little things like this or is your response pretty comprehensive?
I believe that TS's (ordinary) import and export is the same, but resolution is not. The resolution will depend on factors like moduleResolution setting, whether TS is compiling to ESM or CJS, and any paths overrides.