Skip to content

Commit

Permalink
fix: remove .use from types (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Oct 15, 2020
1 parent a794879 commit 9d05ba0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions test/types/instance.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ expectAssignable<FastifyInstance>(server.addSchema({
expectType<Record<string, unknown>>(server.getSchemas())
expectType<unknown>(server.getSchema('SchemaId'))

expectType<unknown>(server.use(() => {}))
expectType<unknown>(server.use('/foo', () => {}))

expectAssignable<FastifyInstance>(
server.setErrorHandler(function (error, request, reply) {
expectAssignable<FastifyInstance>(this)
Expand Down
7 changes: 0 additions & 7 deletions types/instance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ export interface FastifyInstance<

register: FastifyRegister<FastifyInstance<RawServer, RawRequest, RawReply, Logger> & PromiseLike<undefined>>;

/**
* This method will throw a `FST_ERR_MISSING_MIDDLEWARE` error unless support
* for Express-style middlewares is first enabled. Visit
* https://fastify.io/docs/latest/Middleware/ for more info.
*/
use(...args: unknown[]): unknown;

route<
RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
ContextConfig = ContextConfigDefault
Expand Down

0 comments on commit 9d05ba0

Please sign in to comment.