Skip to content

hayes/ts-esm-cjs-nodenext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typescript nodenext with separate dts directory

node_modules are checked into this repo with an example dependency, so running an npm install may break the reproduction

the "example-package" has a class as a default export. It defines exports for both esm and cjs, and defines types in a shared "dts" directory.

"src/index.ts" uses the cjs import, and works correctly, src/index.mts and "src/esm/index.ts" both use the esm import, and have an error saying Type 'typeof import("{path}/node_modules/example-package/dts/index")' has no construct signatures.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published