Eu tenho o seguinte método:
async sync({model, event, data}: {model: string, event: string, data: Category}) {
if (model === 'category') {
switch (event) {
case 'created':
await this.categoryRepo.create({
...data,
createdAt: new Date(),
updatedAt: new Date()
});
break;
}
}
}
QuandoMas quando faço a chamada dele:
this.sync({model, event, data});
O typescriptTypeScript me retorna o seguinte erro no thisthis
:
ESLint: Promises must be handled appropriately or explicitly marked as ignored with the
void
operator.(@typescript-eslint/no-floating-promises)
Como posso tratar isso?