45 lines
862 B
Plaintext
45 lines
862 B
Plaintext
|
=== tests/cases/compiler/collisionRestParameterInterfaceMembers.ts ===
|
||
|
// call
|
||
|
interface i1 {
|
||
|
>i1 : i1
|
||
|
|
||
|
(_i: number, ...restParameters); // no error - no code gen
|
||
|
>_i : number
|
||
|
>restParameters : any[]
|
||
|
}
|
||
|
interface i1NoError {
|
||
|
>i1NoError : i1NoError
|
||
|
|
||
|
(_i: number); // no error
|
||
|
>_i : number
|
||
|
}
|
||
|
|
||
|
// new
|
||
|
interface i2 {
|
||
|
>i2 : i2
|
||
|
|
||
|
new (_i: number, ...restParameters); // no error - no code gen
|
||
|
>_i : number
|
||
|
>restParameters : any[]
|
||
|
}
|
||
|
interface i2NoError {
|
||
|
>i2NoError : i2NoError
|
||
|
|
||
|
new (_i: number); // no error
|
||
|
>_i : number
|
||
|
}
|
||
|
|
||
|
// method
|
||
|
interface i3 {
|
||
|
>i3 : i3
|
||
|
|
||
|
foo (_i: number, ...restParameters); // no error - no code gen
|
||
|
>foo : (_i: number, ...restParameters: any[]) => any
|
||
|
>_i : number
|
||
|
>restParameters : any[]
|
||
|
|
||
|
fooNoError (_i: number); // no error
|
||
|
>fooNoError : (_i: number) => any
|
||
|
>_i : number
|
||
|
}
|