TypeScript/tests/cases/compiler/restParameterWithBindingPattern3.ts
2018-08-01 11:12:47 +02:00

9 lines
302 B
TypeScript

function a(...[a = 1, b = true]: string[]) { }
function b(...[...foo = []]: string[]) { }
function c(...{0: a, length, 3: d}: [boolean, string, number]) { }
function d(...[a, , , d]: [boolean, string, number]) { }
function e(...{0: a = 1, 1: b = true, ...rest: rest}: [boolean, string, number]) { }