mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix(platform): ignore fastify typing in the constructor
This commit is contained in:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -12172,6 +12172,13 @@
|
||||
"requires": {
|
||||
"path-to-regexp": "^3.0.0",
|
||||
"reusify": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"path-to-regexp": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz",
|
||||
"integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
|
||||
@@ -12,7 +12,7 @@ import * as pathToRegexp from 'path-to-regexp';
|
||||
export class FastifyAdapter extends AbstractHttpAdapter {
|
||||
constructor(
|
||||
instanceOrOptions:
|
||||
| fastify.FastifyInstance<any, any, any>
|
||||
| any
|
||||
| fastify.ServerOptions
|
||||
| fastify.ServerOptionsAsHttp
|
||||
| fastify.ServerOptionsAsHttp2
|
||||
@@ -24,7 +24,7 @@ export class FastifyAdapter extends AbstractHttpAdapter {
|
||||
instanceOrOptions &&
|
||||
(instanceOrOptions as fastify.FastifyInstance<any, any, any>).server
|
||||
? instanceOrOptions
|
||||
: fastify(instanceOrOptions as fastify.ServerOptions);
|
||||
: fastify((instanceOrOptions as any) as fastify.ServerOptions);
|
||||
|
||||
super(instance);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "2.10.0",
|
||||
"fastify": "2.11.0",
|
||||
"fastify-cors": "3.0.0",
|
||||
"fastify-formbody": "3.1.0",
|
||||
"path-to-regexp": "3.2.0"
|
||||
|
||||
Reference in New Issue
Block a user