Closed Zamiell closed 5 months ago
Is there some way for a declaration merge to get rid of the string index signature? Because that's the root cause of the bug.
Unfortunately no. I'm not sure how to fix this at all.
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Prerequisites
Fastify version
4.25.1
Plugin version
7.1.0
Node.js version
20.9.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
The types don't work properly. e.g.:
In the above code snippet, we made a typo, and typed it as "usersID" instead of "userID". Oops! But we don't get a compiler error - it just works, and the bug makes its way to production.
Is there some way for a declaration merge to get rid of the string index signature? Because that's the root cause of the bug.