2018-02-09 02:31:48 +01:00
|
|
|
function restValid(a: i32, ...b: i32[]): void {}
|
2018-03-17 01:37:05 +01:00
|
|
|
function optionalValid(a: i32, b?: i32): void {}
|
|
|
|
|
|
|
|
// 1014: A rest parameter must be last in a parameter list.
|
2018-02-09 02:31:48 +01:00
|
|
|
function restParameterMustBeLast(...a: i32[], b: i32): void {}
|
|
|
|
|
2018-03-17 01:37:05 +01:00
|
|
|
// 1016: A required parameter cannot follow an optional parameter.
|
2018-02-09 02:31:48 +01:00
|
|
|
function optionalCannotPrecedeRequired(a?: i32, b: i32): void {}
|
2018-03-17 01:37:05 +01:00
|
|
|
|
|
|
|
// 1016: A required parameter cannot follow an optional parameter.
|
2018-02-09 02:31:48 +01:00
|
|
|
function optionalWithInitializerCannotPrecedeRequired(a: i32 = 1, b: i32): void {}
|