Yo, I have this peice of code in my API and it gives me an error I don't understand.
Code :
server.get('/deleteall', async (request, reply) => {
var json = JSON.stringify(deleteall);
fs.writeFile('todos.json', json, 'utf8', callback);
return 'File overwritten.'
})
Error :
Argument of type '(arg0: string, json: string, arg2: string, callback: any) => void' is not assignable to parameter of type 'NoParamCallback'.
The error happens on build, I don't understand it at all, keep in mind, this is my first TS experience.