mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
534 B
TypeScript
20 lines
534 B
TypeScript
//// [tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts] ////
|
|
|
|
//// [fatarrowfunctionsOptionalArgsErrors1.ts]
|
|
(arg1?, arg2) => 101;
|
|
(...arg?) => 102;
|
|
(...arg) => 103;
|
|
(...arg:number [] = []) => 104;
|
|
|
|
// Uninitialized parameter makes the initialized one required
|
|
(arg1 = 1, arg2) => 1;
|
|
|
|
//// [fatarrowfunctionsOptionalArgsErrors1.js]
|
|
"use strict";
|
|
(arg1, arg2) => 101;
|
|
(...arg) => 102;
|
|
(...arg) => 103;
|
|
(...arg = []) => 104;
|
|
// Uninitialized parameter makes the initialized one required
|
|
(arg1 = 1, arg2) => 1;
|