mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
45 lines
935 B
TypeScript
45 lines
935 B
TypeScript
//// [tests/cases/conformance/salsa/controlFlowJSClassProperty.ts] ////
|
|
|
|
//// [controlFlowJSClassProperty.js]
|
|
export class C {
|
|
name = "CompileDiagnostic";
|
|
|
|
/**
|
|
* @param {[number, number] | undefined} position
|
|
*/
|
|
constructor(position) {
|
|
if (position) {
|
|
this.position = position;
|
|
}
|
|
}
|
|
}
|
|
var c = new C([1, 2]);
|
|
c.position;
|
|
|
|
|
|
//// [controlFlowJSClassProperty.js]
|
|
export class C {
|
|
name = "CompileDiagnostic";
|
|
/**
|
|
* @param {[number, number] | undefined} position
|
|
*/
|
|
constructor(position) {
|
|
if (position) {
|
|
this.position = position;
|
|
}
|
|
}
|
|
}
|
|
var c = new C([1, 2]);
|
|
c.position;
|
|
|
|
|
|
//// [controlFlowJSClassProperty.d.ts]
|
|
export declare class C {
|
|
position: [number, number] | undefined;
|
|
name: string;
|
|
/**
|
|
* @param {[number, number] | undefined} position
|
|
*/
|
|
constructor(position: [number, number] | undefined);
|
|
}
|