TypeScript/tests/cases/compiler/restParameterWithBindingPattern3.ts

9 lines
302 B
TypeScript
Raw Normal View History

2018-07-30 16:13:22 +02:00
function a(...[a = 1, b = true]: string[]) { }
function b(...[...foo = []]: string[]) { }
function c(...{0: a, length, 3: d}: [boolean, string, number]) { }
2018-08-01 11:12:47 +02:00
function d(...[a, , , d]: [boolean, string, number]) { }
function e(...{0: a = 1, 1: b = true, ...rest: rest}: [boolean, string, number]) { }