Skip to content

Fix TS types #68

Open
Open

Description

@leebenson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions