Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TS types #68

Open
leebenson opened this issue Apr 2, 2018 · 0 comments
Open

Fix TS types #68

leebenson opened this issue Apr 2, 2018 · 0 comments

Comments

@leebenson
Copy link

Following the Koa example, it seems some TS definitions are missing or out of sync with the lib.

Adding middleware requires any casting, such as:

app.use(webpackHotServerMiddleware(compiler, {
  createHandler: (webpackHotServerMiddleware as any).createKoaHandler,
}) as any);

... because:

  1. webpackHotServerMiddleware, by default, returns an Express middleware signature, not Koa.
  2. webpackHotServerMiddleware.createKoaHandler (and probably other handlers) are lacking definitions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant