Skip to content
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

Typescript and Node.js #1018

Open
Masadow opened this issue Sep 9, 2024 · 0 comments
Open

Typescript and Node.js #1018

Masadow opened this issue Sep 9, 2024 · 0 comments

Comments

@Masadow
Copy link

Masadow commented Sep 9, 2024

Hi,

I'm unable to use this package with typescript in node.js

I use showdown on the backend to build emails in Markdown. I don't need to convert html to markdown so I don't use makeMarkdown that takes an HTMLDocument which is missing in Node.js and therefore makes builds to fail

Cannot find name 'HTMLDocument'.

951         makeMarkdown(src: string, HTMLParser?: HTMLDocument): string;
                                                   ~~~~~~~~~~~~
Found 1 error in node_modules/@types/showdown/index.d.ts:951

I cannot override typings to fix this myself as showdown package does not allow for typing override :

Could not find a declaration file for module 'showdown'. '[project_path]/node_modules/showdown/dist/showdown.js' implicitly has an 'any' type.
  There are types at '[project_path]/types/showdown/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'showdown' library may need to update its package.json or typings.

Any help ?

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

No branches or pull requests

1 participant