Closed
Description
TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)
Try it yourself in the playground
Code
function fancyMethod({ option1:boolean = true, option2: number = 1 } = {}) {
console.log(option1, option2);
}
fancyMethod();
fancyMethod({option2: 3});
Expected behavior:
Console log shows value of option1 and option 2
Actual behavior:
Typescript shows errors:
- Cannot find name 'option1'.
- Cannot find name 'option2'.
Metadata
Metadata
Assignees
Labels
No labels