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

Feature request: Typescript definitions #367

Open
jamiehowarth0 opened this issue Nov 25, 2019 · 6 comments
Open

Feature request: Typescript definitions #367

jamiehowarth0 opened this issue Nov 25, 2019 · 6 comments

Comments

@jamiehowarth0
Copy link

I'm working on a project right now using Typescript and I'd like to see support for SVG Edit added. I'll start working on a PR to create @types/svgedit as a package.

@brettz9
Copy link
Contributor

brettz9 commented Nov 25, 2019

Great! I've been trying to keep the jsdoc in order, so let us know if, in the course of your work checking through the files, you find any problems with the types expressed within jsdoc.

@jamiehowarth0
Copy link
Author

@brettz9 I've got a fork with tsd-jsdoc installed, and it's throwing errors when handling @external definitions, digging a bit deeper

@jamiehowarth0
Copy link
Author

Update: the bug's in tsd-jsdoc, I've filed an issue & PR. This successfully seems to correctly process & produce a types.d.ts file, I'll try & test it against an active project shortly.

@jfhenon
Copy link
Collaborator

jfhenon commented Jun 2, 2022

can this issue be closed?

@brettz9
Copy link
Contributor

brettz9 commented Jun 2, 2022

FWIW, @external is not the approach that should be used for TypeScript-flavored JSDoc. In eslint-plugin-jsdoc, that means setting settings: {jsdoc: {mode: 'typescript'}} and then using the likes of import() within JSDoc type fields to get external types rather than external: references. I.e., the flavor of JSDoc that was in the code (and I presume may still be in the code) needs to be changed to the TypeScript flavor of JSDoc. Then it can be used to build TS declaration files.

@mccolljr
Copy link

mccolljr commented Apr 6, 2024

I know that this is an old issue, but I have an interest in typescript definitions. I would like to use this in a typescript project but not having definitions is a bit of a blocker. I'm happy to generate them myself, i.e. with the tsd-jsdoc, as long as the issue pointed out by @brettz9 has been / can be resolved

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

No branches or pull requests

4 participants