1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
//// [propertyAssignmentUseParentType3.ts]
// don't use the parent type if it's a function declaration (#33741)
function foo1(): number {
return 123;
}
foo1.toFixed = "";
function foo2(): any[] {
return [];
}
foo2.join = "";
function foo3(): string {
return "";
}
foo3.trim = "";
function foo4(): ({x: number}) {
return {x: 123};
}
foo4.x = "456";
//// [propertyAssignmentUseParentType3.js]
// don't use the parent type if it's a function declaration (#33741)
function foo1() {
return 123;
}
foo1.toFixed = "";
function foo2() {
return [];
}
foo2.join = "";
function foo3() {
return "";
}
foo3.trim = "";
function foo4() {
return { x: 123 };
}
foo4.x = "456";
|