7635884224
* resolve require with entity name postfix For example, `require("x").c`. This is the value equivalent of `import("x").a.b.c`, but the syntax tree is not as nicely designed for this purpose. Fixes #34802 * Add bug number to test * Add optional chain test
24 lines
342 B
TypeScript
24 lines
342 B
TypeScript
// #34802
|
|
// @Filename: jsdocTypeReferenceToImport.js
|
|
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
|
|
const C = require('./ex').C;
|
|
const D = require('./ex')?.C;
|
|
/** @type {C} c */
|
|
var c = new C()
|
|
c.start
|
|
c.end
|
|
|
|
/** @type {D} c */
|
|
var d = new D()
|
|
d.start
|
|
d.end
|
|
|
|
// @Filename: ex.d.ts
|
|
export class C {
|
|
start: number
|
|
end: number
|
|
}
|