Express exposes serve-static as express.static: https://github.com/strongloop/express/blob/master/lib/express.js#L60
Prior to this change, the type definitions would only consist of the call signature of serve-static, but serve static also has member variables. By importing the entire type definition from serve-static and using it for express.static, both the call signature and the members can be used.
- Move Express-prefixed interface names into internal module as
unprefixed names
- The importing code will use express.Response instead of
ExpressServerResponse
- Internal definitions can just use Response instead of
ExpressServerResponse
- Response should extend http.Response to be able to type check .end
for example
This enables each definition to have a readme if necessary.
Also a .json metadata file to help with package managers.
And last, to have different versions of the definitions.