I have tried the answer of Pacerier from the question Skip arguments in a JavaScript function. But it does not seem to work.
I have a function with many arguments
this.service.list("all",null, null, localStorage.getItem('currentProgram'), null, 100, ...Array(2), environment.liveMode).subscribe(...)
The only way I've found is to write it one by one, like (,null, null or undefined,undefined).
I also set a test method to see if it was different, but it does not work as well.
test(a: any, b: any, c: any, d: string) {
console.log(d)
}
ngOnInit() {
this.test(...Array(3), "a")
}
I also tried other syntax proposed in the answer.
Is there a less verbose way to do this in TypeScript ?