Skip to content

@import syntax in a javascript file to get types from a typescript file #2891

Answered by Gerrit0
stwlam asked this question in Q&A

You must be logged in to vote

TypeDoc documents your exports. While you have imported the interface there, you have not exported it from your entry point, so typedoc won't document it. This is working as intended.

TypeScript lacks an @export tag that you could use to do this easily (microsoft/TypeScript#60831), so TypeDoc supports handling @typedef tags which "look like" re-exports as re-exports.

@typedef {import("./types.mjs").Thing} Thing

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by stwlam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants