60frames / webpack-hot-server-middleware

:fire: Hot reload webpack bundles on the server
MIT License
324 stars 50 forks source link

Types: Add support for `createHandler` #90

Open hedgepigdaniel opened 4 years ago

hedgepigdaniel commented 4 years ago

Previously the returned handler was typed as an express request handler, even if the createHandler option had been used to return something different.

With these changes there is a type parameter for the handler exported by the handler creation function inside the compiler, and for the handler returned by createHandler. They both default to express handlers, so there is no breaking change.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling c61cb68511735c8bb4471a7766bb8cb4e0a50d8a on hedgepigdaniel:types/createHandler into ffcf4139155df48d1faf027ae9fd45d37d96953d on 60frames:master.

hedgepigdaniel commented 3 years ago

Any chance of coming back to this?