mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
815 B
TypeScript
53 lines
815 B
TypeScript
//// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsExportAssignedClassExpressionShadowing.ts] ////
|
|
|
|
//// [index.js]
|
|
class A {
|
|
member = new Q();
|
|
}
|
|
class Q {
|
|
x = 42;
|
|
}
|
|
module.exports = class Q {
|
|
constructor() {
|
|
this.x = new A();
|
|
}
|
|
}
|
|
module.exports.Another = Q;
|
|
|
|
|
|
//// [index.js]
|
|
"use strict";
|
|
class A {
|
|
constructor() {
|
|
this.member = new Q();
|
|
}
|
|
}
|
|
class Q {
|
|
constructor() {
|
|
this.x = 42;
|
|
}
|
|
}
|
|
module.exports = class Q {
|
|
constructor() {
|
|
this.x = new A();
|
|
}
|
|
};
|
|
module.exports.Another = Q;
|
|
|
|
|
|
//// [index.d.ts]
|
|
export = Q_1;
|
|
declare class Q_1 {
|
|
x: A;
|
|
constructor();
|
|
}
|
|
declare namespace Q_1 {
|
|
export { Q as Another };
|
|
}
|
|
declare class A {
|
|
member: Q;
|
|
}
|
|
declare class Q {
|
|
x: number;
|
|
}
|