oauth2-client-js
oauth2-client-js copied to clipboard
Type declaration to not require optional parameters
The current type declaration requires that all properties are supplied when creating a new Provider or Request object, when the code supplies default values in the constructor.
See:
- https://github.com/zalando-stups/oauth2-client-js/blob/master/src/request.js#L17
- https://github.com/zalando-stups/oauth2-client-js/blob/master/src/request.js#L30
- https://github.com/zalando-stups/oauth2-client-js/blob/master/src/provider.js#L13
This PR flags the non-required parameters as optional so that using the default values passes type-checking. Without this change, the main example in the README has TS errors.
Bump this. It makes the lib very awkward to use in a strict TS environment.