fix(@feathersjs/various): proper module augmentation, add reexports (#23195)

* fix feathersjs__{authentication-client,express,socket-commons}

* fix feathersjs__authentication-client
This commit is contained in:
Jan Lohage
2018-01-25 22:41:41 +01:00
committed by Andy
parent 5ec69dfcc8
commit 9dec8df964
9 changed files with 78 additions and 57 deletions

View File

@@ -1,5 +1,8 @@
import feathers, { Application } from '@feathersjs/feathers';
import feathersExpress from '@feathersjs/express';
import { Application as ExpressApplication } from 'express';
import feathersExpress, { original, rest, notFound, errorHandler } from '@feathersjs/express';
const app: ExpressApplication & Application<{}> = feathersExpress(feathers());
const app = feathersExpress(feathers());
app.configure(rest());
app.use(notFound());
app.use(errorHandler());

View File

@@ -5,6 +5,18 @@
// TypeScript Version: 2.2
import { Application as FeathersApplication } from '@feathersjs/feathers';
import { Application as ExpressApplication } from 'express';
import * as express from 'express';
export default function feathersExpress<T>(app: FeathersApplication<T>): ExpressApplication & FeathersApplication<T>;
export default function feathersExpress<T>(app: FeathersApplication<T>): express.Application & FeathersApplication<T>;
export function errorHandler(options?: any): express.ErrorRequestHandler;
export function notFound(): express.RequestHandler;
export const rest: {
(): () => void;
formatter: express.RequestHandler;
};
/*
* Re-export of the express package. Can't be typed properly without just copying everything.
**/
export const original: any;