8223c07527
Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
15 lines
231 B
TypeScript
15 lines
231 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @Filename: mod1.js
|
|
class C {
|
|
s() { }
|
|
}
|
|
module.exports.C = C
|
|
|
|
// @Filename: test.js
|
|
/** @typedef {import('./mod1').C} X */
|
|
/** @param {X} c */
|
|
function demo(c) {
|
|
c.s
|
|
}
|