8000 fix: Typings for express request and response properties by vonagam · Pull Request #1609 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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