Skip to content

Commit

Permalink
fix: Typings for express request and response properties
Browse files Browse the repository at this point in the history
  • Loading branch information
vonagam committed Oct 8, 2019
1 parent 6a56056 commit 84b09ae
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/express/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Application as FeathersApplication } from '@feathersjs/feathers';
import { Application as FeathersApplication, Params as FeathersParams, HookContext } from '@feathersjs/feathers';
import express from 'express';

declare const feathersExpress: FeathersExpress;
Expand Down Expand Up @@ -36,3 +36,14 @@ interface FeathersExpress extends Express {
declare namespace feathersExpress {
type Application<T = any> = express.Express & FeathersApplication<T>;
}

declare module 'express-serve-static-core' {
interface Request {
feathers?: Partial<FeathersParams>;
}

interface Response {
data?: any;
hook?: HookContext;
}
}

0 comments on commit 84b09ae

Please sign in to comment.