TypeScript/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToClassAlias.ts
Nathan Shively-Sanders 8223c07527
getTypeFromJSDocValueReference: handle import types (#34683)
Previously it only handled types whose declaration was from `require`,
but now it handles types whose reference is an import type as well.
2019-10-23 15:53:38 -07:00

16 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
}