Skip to content

Commit 38cf8c9

Browse files
vonagamdaffl
authored andcommitted
fix: Typings for express request and response properties (#1609)
1 parent baad6a2 commit 38cf8c9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/express/index.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Application as FeathersApplication } from '@feathersjs/feathers';
1+
import { Application as FeathersApplication, Params as FeathersParams, HookContext } from '@feathersjs/feathers';
22
import express from 'express';
33

44
declare const feathersExpress: FeathersExpress;
@@ -36,3 +36,14 @@ interface FeathersExpress extends Express {
3636
declare namespace feathersExpress {
3737
type Application<T = any> = express.Express & FeathersApplication<T>;
3838
}
39+
40+
declare module 'express-serve-static-core' {
41+
interface Request {
42+
feathers?: Partial<FeathersParams>;
43+
}
44+
45+
interface Response {
46+
data?: any;
47+
hook?: HookContext;
48+
}
49+
}

0 commit comments

Comments
 (0)