Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type declaration to not require optional parameters #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Type declaration to not require optional parameters #32

wants to merge 1 commit into from

Conversation

jtfell
Copy link

@jtfell jtfell commented Jan 8, 2018

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:

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.

@Sunjammer
Copy link

Bump this. It makes the lib very awkward to use in a strict TS environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants