[X] I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.4.0
Plugin version
No response
Node.js version
v14.15.1
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
The documentation says the following:
The fastify object is decorated the same way as reply and allows you to just render a view into a variable instead of sending the result back to the browser:
But this is not described in the index.d.ts file, which is why the typescript compiler does not see the "view" method in FastifyInstance interface.
Solution:
Extend FastifyInstance interface in index.d.ts
Prerequisites
Fastify version
4.4.0
Plugin version
No response
Node.js version
v14.15.1
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
The documentation says the following: The fastify object is decorated the same way as reply and allows you to just render a view into a variable instead of sending the result back to the browser:
But this is not described in the index.d.ts file, which is why the typescript compiler does not see the "view" method in FastifyInstance interface.
Solution: Extend FastifyInstance interface in index.d.ts
No response