How to declare types when importing within a JSDoc type? #12404
Unanswered
jaydenseric
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a way to declare types when importing:
But how do you do the same when importing within a JSDoc type?
For example in
x.js
:In the above situation, if
Foo
is a type that comes from a.d.ts
file and isn't actually a named export in the ESM module, trying to import thex.js
module in a TypeScript module with type checking enabled will cause a TS error:TS2694 [ERROR]: Namespace '__' has no exported member 'Foo'.
.Beta Was this translation helpful? Give feedback.
All reactions