1
- import * as fastify from 'fastify' ;
2
- import * as http from 'http' ;
1
+ import { FastifyRequest , FastifyInstance , RawServerBase , RawRequestDefaultExpression , RawReplyDefaultExpression , FastifyError } from 'fastify' ;
3
2
4
- declare function fastifyOauth2 (
5
- instance : fastify . FastifyInstance < http . Server , http . IncomingMessage , http . ServerResponse > ,
6
- options : fastifyOauth2 . FastifyOAuth2Options ,
7
- callback : ( err ?: fastify . FastifyError ) => void ,
3
+ declare function fastifyOauth2 (
4
+ instance : FastifyInstance < RawServerBase , RawRequestDefaultExpression < RawServerBase > , RawReplyDefaultExpression < RawServerBase > > ,
5
+ opts : fastifyOauth2 . FastifyOAuth2Options ,
6
+ next : ( err ?: FastifyError ) => void
8
7
) : void ;
9
8
10
9
declare namespace fastifyOauth2 {
@@ -25,11 +24,11 @@ declare namespace fastifyOauth2 {
25
24
26
25
interface OAuth2Namespace {
27
26
getAccessTokenFromAuthorizationCodeFlow (
28
- request : fastify . FastifyRequest < http . IncomingMessage > ,
27
+ request : FastifyRequest ,
29
28
) : Promise < OAuth2Token > ;
30
29
31
30
getAccessTokenFromAuthorizationCodeFlow (
32
- request : fastify . FastifyRequest < http . IncomingMessage > ,
31
+ request : FastifyRequest ,
33
32
callback : ( token : OAuth2Token ) => void ,
34
33
) : void ;
35
34
0 commit comments