For testing and migration proposes I would like to disable this option (TS2554), but I can't seem to find it regarding the name.
{
"extends": "@quasar/app-webpack/tsconfig-preset",
"compilerOptions": {
"baseUrl": ".",
"noImplicitAny": false,
"strictPropertyInitialization": false,
"strictNullChecks": false,
"????": false
}
}
Thank you,
It sounds like you're trying to call a function with 0 arguments when it expects 1. As far as I know, there is no option you can specify in the tsconfig.json file to allow calls like this.
If you have control over the function signature, you could change the parameter to be optional. Then you could call the function without passing in an argument. Something like this:
function myFunction(a?: any){
console.log(a);
}
myFunction();
If you do not have control over the function signature, you could cast the function like this:
function myFunction(a: string){
console.log(a);
}
(myFunction as () => undefined)();
You can also use a @ts-ignore comment to tell the Typescript compiler to not type check your call to the function:
function myFunction(a: string){
console.log(a);
}
// @ts-ignore
myFunction();
Those last 2 options are unsafe, unless you're sure that the function is equipped to handle a call without arguments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With