|
|
|
@ -10,47 +10,52 @@ function f2(...args,) {}
|
|
|
|
|
>f2 : Symbol(f2, Decl(trailingCommasInFunctionParametersAndArguments.ts, 2, 7))
|
|
|
|
|
>args : Symbol(args, Decl(trailingCommasInFunctionParametersAndArguments.ts, 4, 12))
|
|
|
|
|
|
|
|
|
|
// Allowed for ambient declarations
|
|
|
|
|
declare function f25(...args,): void;
|
|
|
|
|
>f25 : Symbol(f25, Decl(trailingCommasInFunctionParametersAndArguments.ts, 4, 24))
|
|
|
|
|
>args : Symbol(args, Decl(trailingCommasInFunctionParametersAndArguments.ts, 7, 21))
|
|
|
|
|
|
|
|
|
|
f2(...[],);
|
|
|
|
|
>f2 : Symbol(f2, Decl(trailingCommasInFunctionParametersAndArguments.ts, 2, 7))
|
|
|
|
|
|
|
|
|
|
// Not confused by overloads
|
|
|
|
|
declare function f3(x, ): number;
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 6, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 33))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 20))
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 12, 33))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 12, 20))
|
|
|
|
|
|
|
|
|
|
declare function f3(x, y,): string;
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 6, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 33))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 10, 20))
|
|
|
|
|
>y : Symbol(y, Decl(trailingCommasInFunctionParametersAndArguments.ts, 10, 22))
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 12, 33))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 13, 20))
|
|
|
|
|
>y : Symbol(y, Decl(trailingCommasInFunctionParametersAndArguments.ts, 13, 22))
|
|
|
|
|
|
|
|
|
|
<number>f3(1,);
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 6, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 33))
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 12, 33))
|
|
|
|
|
|
|
|
|
|
<string>f3(1, 2,);
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 6, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 33))
|
|
|
|
|
>f3 : Symbol(f3, Decl(trailingCommasInFunctionParametersAndArguments.ts, 9, 11), Decl(trailingCommasInFunctionParametersAndArguments.ts, 12, 33))
|
|
|
|
|
|
|
|
|
|
// Works for constructors too
|
|
|
|
|
class X {
|
|
|
|
|
>X : Symbol(X, Decl(trailingCommasInFunctionParametersAndArguments.ts, 13, 18))
|
|
|
|
|
>X : Symbol(X, Decl(trailingCommasInFunctionParametersAndArguments.ts, 16, 18))
|
|
|
|
|
|
|
|
|
|
constructor(a,) { }
|
|
|
|
|
>a : Symbol(a, Decl(trailingCommasInFunctionParametersAndArguments.ts, 17, 16))
|
|
|
|
|
>a : Symbol(a, Decl(trailingCommasInFunctionParametersAndArguments.ts, 20, 16))
|
|
|
|
|
|
|
|
|
|
// See trailingCommasInGetter.ts
|
|
|
|
|
set x(value,) { }
|
|
|
|
|
>x : Symbol(X.x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 17, 23))
|
|
|
|
|
>value : Symbol(value, Decl(trailingCommasInFunctionParametersAndArguments.ts, 19, 10))
|
|
|
|
|
>x : Symbol(X.x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 20, 23))
|
|
|
|
|
>value : Symbol(value, Decl(trailingCommasInFunctionParametersAndArguments.ts, 22, 10))
|
|
|
|
|
}
|
|
|
|
|
interface Y {
|
|
|
|
|
>Y : Symbol(Y, Decl(trailingCommasInFunctionParametersAndArguments.ts, 20, 1))
|
|
|
|
|
>Y : Symbol(Y, Decl(trailingCommasInFunctionParametersAndArguments.ts, 23, 1))
|
|
|
|
|
|
|
|
|
|
new(x,);
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 22, 8))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 25, 8))
|
|
|
|
|
|
|
|
|
|
(x,);
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 23, 5))
|
|
|
|
|
>x : Symbol(x, Decl(trailingCommasInFunctionParametersAndArguments.ts, 26, 5))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new X(1,);
|
|
|
|
|
>X : Symbol(X, Decl(trailingCommasInFunctionParametersAndArguments.ts, 13, 18))
|
|
|
|
|
>X : Symbol(X, Decl(trailingCommasInFunctionParametersAndArguments.ts, 16, 18))
|
|
|
|
|
|
|
|
|
|