-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic import issue for TypeScript 4.5.0-beta "module" of "nodenext" or "node12" #16
Comments
I should note that this issue is only for Typescript The recommended option of "module": "commonjs" builds correctly. |
Thanks for reaching out @tvquizphd! A few things to note here:
I'd be fine updating Lines 3 to 5 in a0d3a07
with - * @typedef {import('./jsx-classic').Element} h.JSX.Element
+ * @typedef {import('./jsx-classic.js').Element} h.JSX.Element including the extension for consistency with other files. |
@ChristianMurphy --- Thanks for the clarity! I was able to see my mistake. I need to set The error message when
Also, the error message when
With the Typescript beta, to support the |
From the Tyepscript 4.5.0-beta release notes, it seems they explicitly say that we should import
|
Didn’t they revert that change in 4.5.0? If it lands, and it can be fixed here, 👍 to a PR |
I’ll close this for now, as it seems reverted. PR welcome if they land this again. |
Initial checklist
Affected packages and versions
hastscript==7.0.2
Link to runnable example
https://github.com/tvquizphd/hastscript-test
Steps to reproduce
In
index.ts
, I simply importh
fromhastscript
:Here's a relevant
tsconfig.json
snippet:Here's a relevant
package.json
snippet:Expected behavior
The module should build without error.
Actual behavior
There seems to be an error with dynamic import of
jsx-classic
inhtml.d.ts
andsvg.d.ts
:Here are lines 17-25 of
node_modules/hastscript/lib/html.d.ts
:Runtime
Node v16
Package manager
Other (please specify in steps to reproduce)
OS
Linux
Build and bundle tools
Other (please specify in steps to reproduce)
The text was updated successfully, but these errors were encountered: