#59 was closed as complete, but the issue remains in the latest release version and also in trunk.
https://arethetypeswrong.github.io/?p=short-unique-id%405.1.1
With the newly added specs, I was able to confirm the error shown on the page above by making the following changes to the specs directory:
- Add
specs/package.json
- Edit
specs/import-esm.spec.ts to include .js in the import:
import ShortUniqueId from '../dist/short-unique-id.js';
Then, running npx tsc in that directory produces the following error:
import-esm.spec.ts:3:18 - error TS2351: This expression is not constructable.
Type 'typeof import("/[redacted]/short-unique-id/dist/short-unique-id")' has no construct signatures.
3 const suid = new ShortUniqueId({length: 3});
~~~~~~~~~~~~~
Found 1 error in import-esm.spec.ts:3
I also confirmed that my project still has trouble building with the latest release version (short-unique-id@5.1.1)
#59 was closed as complete, but the issue remains in the latest release version and also in trunk.
https://arethetypeswrong.github.io/?p=short-unique-id%405.1.1
With the newly added specs, I was able to confirm the error shown on the page above by making the following changes to the
specsdirectory:specs/package.json{ "type": "module" }specs/import-esm.spec.tsto include.jsin the import:Then, running
npx tscin that directory produces the following error:I also confirmed that my project still has trouble building with the latest release version (short-unique-id@5.1.1)