mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-02 22:37:48 +08:00
* Creating a separate interface for IncomingMessageHeaders
This allows for IncomingMessage.headers types to be extensible per project. Suppose a node service expects a fixed set of headers of certain type (say string), that service can specify custom IncomingMessageHeaders with more concrete types defined.
For example
```
interface IncomingMessageHeaders {
"host": string;
"set-cookie": string[]
}
```
* Changing IncomingMessageHeaders defn
This definition adds undefined in addition to string and string[].