I have the following error when using decorator on function in object

This is the object with the decorator:
export default {
Query: {
@query
containerById: async (scope, { id }, context) => {
return context.loaders.containerLoader.getContainerById.load(id);
},
}
};
I tried to suppress this error but I am unable to.
The only way I was able to is by adding the below line to .vscode/settings.json
"typescript.validate.enable": false
This obviously is a bad solution as it disables all the typescript validation which is not what I want.
This is my tsconfig.json file:
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"allowJs": true,
"sourceMap": true,
"outDir": "./lib",
"strict": true,
"noImplicitAny": false,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"/*": ["./src/*"]
},
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}