Update index.d.ts

based on hapi.js request object on actual module that params and payload are possible to be null when there is no value applied on it.
```
params: null,
paramsArray: null,
path: '/v1/Schemas',
payload: null,
```
This commit is contained in:
Cahya Pribadi
2018-06-22 16:54:26 +12:00
committed by GitHub
parent af5a943b40
commit de1ec36c49

View File

@@ -424,7 +424,7 @@ export interface Request extends Podium {
/**
* An object where each key is a path parameter name with matching value as described in [Path parameters](https://github.com/hapijs/hapi/blob/master/API.md#path-parameters).
*/
readonly params: Util.Dictionary<string>;
readonly params: Util.Dictionary<string> | null;
/**
* An array containing all the path params values in the order they appeared in the path.
@@ -440,7 +440,7 @@ export interface Request extends Podium {
* The request payload based on the route payload.output and payload.parse settings.
* TODO check this typing and add references / links.
*/
readonly payload: stream.Readable | Buffer | string | object;
readonly payload: stream.Readable | Buffer | string | object | null;
/**
* Plugin-specific state. Provides a place to store and pass request-level plugin data. The plugins is an object where each key is a plugin name and the value is the state.