83 lines
6 KiB
Plaintext
83 lines
6 KiB
Plaintext
=== tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunction.ts ===
|
|
// object types with call signatures can override members of Function
|
|
// no errors expected below
|
|
|
|
interface I {
|
|
>I : I, Symbol(I, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 0, 0))
|
|
|
|
(): void;
|
|
apply(a: any, b?: any): void;
|
|
>apply : (a: any, b?: any) => void, Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
>a : any, Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 10))
|
|
>b : any, Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 17))
|
|
|
|
call(thisArg: number, ...argArray: number[]): any;
|
|
>call : (thisArg: number, ...argArray: number[]) => any, Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
>thisArg : number, Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 6, 9))
|
|
>argArray : number[], Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 6, 25))
|
|
}
|
|
|
|
var i: I;
|
|
>i : I, Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>I : I, Symbol(I, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 0, 0))
|
|
|
|
var r1: (a: any, b?: any) => void = i.apply;
|
|
>r1 : (a: any, b?: any) => void, Symbol(r1, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 3))
|
|
>a : any, Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 9))
|
|
>b : any, Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 16))
|
|
>i.apply : (a: any, b?: any) => void, Symbol(I.apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
>i : I, Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>apply : (a: any, b?: any) => void, Symbol(I.apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
|
|
var r1b: (thisArg: number, ...argArray: number[]) => void = i.call;
|
|
>r1b : (thisArg: number, ...argArray: number[]) => void, Symbol(r1b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 3))
|
|
>thisArg : number, Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 10))
|
|
>argArray : number[], Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 26))
|
|
>i.call : (thisArg: number, ...argArray: number[]) => any, Symbol(I.call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
>i : I, Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>call : (thisArg: number, ...argArray: number[]) => any, Symbol(I.call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
|
|
var r1c = i.arguments;
|
|
>r1c : any, Symbol(r1c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 12, 3))
|
|
>i.arguments : any, Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
>i : I, Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>arguments : any, Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
|
|
var x: {
|
|
>x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; }, Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
|
|
(): void;
|
|
apply(a: any, b?: any): void;
|
|
>apply : (a: any, b?: any) => void, Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
>a : any, Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 10))
|
|
>b : any, Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 17))
|
|
|
|
call(thisArg: number, ...argArray: number[]): any;
|
|
>call : (thisArg: number, ...argArray: number[]) => any, Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
>thisArg : number, Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 17, 9))
|
|
>argArray : number[], Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 17, 25))
|
|
}
|
|
|
|
var r2: (a: any, b?: any) => void = x.apply;
|
|
>r2 : (a: any, b?: any) => void, Symbol(r2, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 3))
|
|
>a : any, Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 9))
|
|
>b : any, Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 16))
|
|
>x.apply : (a: any, b?: any) => void, Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
>x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; }, Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>apply : (a: any, b?: any) => void, Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
|
|
var r2b: (thisArg: number, ...argArray: number[]) => void = x.call;
|
|
>r2b : (thisArg: number, ...argArray: number[]) => void, Symbol(r2b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 3))
|
|
>thisArg : number, Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 10))
|
|
>argArray : number[], Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 26))
|
|
>x.call : (thisArg: number, ...argArray: number[]) => any, Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
>x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; }, Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>call : (thisArg: number, ...argArray: number[]) => any, Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
|
|
var r2c = x.arguments;
|
|
>r2c : any, Symbol(r2c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 22, 3))
|
|
>x.arguments : any, Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
>x : { (): void; apply(a: any, b?: any): void; call(thisArg: number, ...argArray: number[]): any; }, Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>arguments : any, Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
|