While attempting to convert some javascript code into typescript, I came across this error: https://i.sstatic.net/QTIpe.png
I'm a bit confused because it's expecting an argument
interface Command {
execute: (client: Client, message: Message) => void;
init: (this: this) => void;
help: {
name: string;
aliases: string[];
};
conf: {
location: string;
};
}
It clearly states that it requires an argument:
https://i.sstatic.net/AH8Qa.png
Could this be related to me passing in this
? I'm unsure why it's behaving like this.
Here is my tsconfig.json configuration:
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build",
"module": "esnext",
"target": "es5",
"lib": [
"es6",
"dom",
"esnext.asynciterable"
],
"sourceMap": true,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}