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

Is imported types supported? #81

Open
voxpelli opened this issue Jun 6, 2019 · 4 comments
Open

Is imported types supported? #81

voxpelli opened this issue Jun 6, 2019 · 4 comments

Comments

@voxpelli
Copy link

voxpelli commented Jun 6, 2019

Is code like this supported?

/** @typedef {import('bunyan-adaptor').BunyanLite} BunyanLite */

Seems like it was complaining quite a bit when I tried.

@englercj
Copy link
Owner

englercj commented Jun 6, 2019

No I don't think this is supported.

@jeffersoneagley
Copy link

There seems to be a bit of chatter going on about type imports in JSDoc, but no solid canonical path at the moment unfortunately.

jsdoc/jsdoc#1537
microsoft/TypeScript#22160

@thw0rted
Copy link

It looks like this is the TS team's official solution to this problem, but the JSDoc folks show no signs of implementing it on their end. Does it make sense for tsd-jsdoc to support this or do you have to wait for official JSDoc support? Supporting doc-import would allow workaround for all sorts of other unsupported constructs, by moving the type definition out of JS completely. (See this example)

@englercj
Copy link
Owner

This is another example of why I think we should do #102

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