From 889456f2c6c4ff9fbd907c9ba6cf3527808b4ac7 Mon Sep 17 00:00:00 2001 From: Sam Chung Date: Sun, 27 Aug 2023 06:20:25 +1000 Subject: [PATCH] fix: type FastifyRequest id as a string (#4992) --- test/types/request.test-d.ts | 2 +- types/request.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/types/request.test-d.ts b/test/types/request.test-d.ts index 34b114a6e1..420bd2e528 100644 --- a/test/types/request.test-d.ts +++ b/test/types/request.test-d.ts @@ -83,7 +83,7 @@ const getHandler: RouteHandler = function (request, _reply) { request.headers = {} expectType(request.query) - expectType(request.id) + expectType(request.id) expectType(request.log) expectType(request.socket) expectType(request.validationError) diff --git a/types/request.d.ts b/types/request.d.ts index bd75639fad..b019bd3bab 100644 --- a/types/request.d.ts +++ b/types/request.d.ts @@ -50,7 +50,7 @@ export interface FastifyRequest { - id: any; + id: string; params: RequestType['params']; // deferred inference raw: RawRequest; query: RequestType['query'];