Skip to content

Fix EditorJS default import types for Node16#3007

Open
cyphercodes wants to merge 1 commit into
codex-team:nextfrom
cyphercodes:fix-node16-default-import-types
Open

Fix EditorJS default import types for Node16#3007
cyphercodes wants to merge 1 commit into
codex-team:nextfrom
cyphercodes:fix-node16-default-import-types

Conversation

@cyphercodes
Copy link
Copy Markdown

Summary

  • add conditional package exports so Node16/NodeNext import resolution can use an ESM declaration entrypoint
  • add an index.d.mts wrapper that keeps the default EditorJS export constructable while preserving existing named type/value exports
  • add a type fixture covering default construction with moduleResolution: Node16

Fixes #2624.

Verification

  • yarn install --frozen-lockfile --ignore-scripts --ignore-engines
  • yarn test:types
  • npx -y -p typescript@5.9.3 tsc -p test/types/tsconfig.node16.json --pretty false
  • npx -y -p typescript@5.9.3 tsc -p test/types/tsconfig.node16.json --module NodeNext --moduleResolution NodeNext --pretty false
  • yarn lint:errors
  • yarn build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS2351: This expression is not constructable.

1 participant