Skip to content

Commit

Permalink
chore(tsconfig): disable strictFunctionTypes as this is unpractical w…
Browse files Browse the repository at this point in the history
…ith express
  • Loading branch information
toverux committed Feb 10, 2018
1 parent 3f09f33 commit 2df4794
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sse_hub_middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compose, Handler as ComposeHandler } from 'compose-middleware';
import { compose } from 'compose-middleware';
import { Handler, NextFunction, Request, Response } from 'express';
import { Hub, IHub } from './hub';
import { ISseMiddlewareOptions } from './sse_handler_middleware';
Expand Down Expand Up @@ -59,5 +59,5 @@ export function sseHub(options: Partial<ISseHubMiddlewareOptions> = {}): Handler
next();
}

return compose(sse(options) as ComposeHandler, middleware as ComposeHandler);
return compose(sse(options), middleware);
}
4 changes: 2 additions & 2 deletions src/sse_middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compose, Handler as ComposeHandler } from 'compose-middleware';
import { compose } from 'compose-middleware';
import { Handler, NextFunction, Request, Response } from 'express';
import * as fmt from './sse_formatter';
import { ISseMiddlewareOptions, sseHandler } from './sse_handler_middleware';
Expand Down Expand Up @@ -74,5 +74,5 @@ export function sse(options: Partial<ISseMiddlewareOptions> = {}): Handler {
next();
}

return compose(sseHandler(options) as ComposeHandler, middleware as ComposeHandler);
return compose(sseHandler(options), middleware);
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"declaration": true,
"moduleResolution": "node",
"strict": true,
"strictFunctionTypes": false,
"noUnusedLocals": false,
"lib": ["es7"]
},
Expand Down

0 comments on commit 2df4794

Please sign in to comment.