I am having problems using a named parameter in TypeScript, I know that it is not supported the way I use it in TS. But how can I
TypeScript:
SomeFunction(name1: boolean, name2: boolean, name3: boolean, name4: boolean)
JavaScript:
$(function () {
...SomeFunction({name1:false, name2:false, name3:false, name4:true});
});
I looked (this did not work):
Named parameters in javascript
How to add optional named parameters to a TypeScript function parameter?
What can I do in TypeScript to use named parameters in JavaScript?
This is an example of using VisualStudio: here . Interestingly, VS2015 did not show a syntax error when using the named parameter as I used it in TypeScript ...
ps .: I am using TS 2.1