Skip to content
Advertisement

Tag: typescript

NestJS and TypeORM Exception Filter: Get Status is not a function

I’m developing an app using NestJS and TypeORM. My goal is to catch TypeORM errors and it could be done using exception filters. But my problem is, I’m encountering this error: (node:345) UnhandledPromiseRejectionWarning: TypeError: exception.getStatus is not a function This is similar to this github post discussing the problem but it’s not working on my end. Here’s my setup: I’ve

How to filter numbers in a drop down list?

I have an HTML table with a numeric variable called statut. The statut variable is a drop-down list, it has two values -> 1 and 9. The method in typescript seems to be correct I think my problem is the HTML, how to make the HTML know that it must filter a number and not a string? Thank you for

How do I delete all unused imports in the active file with one command in VS Code (typescript)?

Previously, I used to be able to do CMD+SHIFT+p > Organize imports and this would both sort and delete unused imports. This functionality seems to have broken. How can I delete unused imports quickly with one command? Current workaround is: click on unused import, CMD+. > Delete unused imports. Languages for which this is applicable (typescript, typescriptreact, javascript, javascriptreact). I

Advertisement