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

Add missing null return types in base-provider #2316

Conversation

sebastinez
Copy link

Hey @ricmoo,

I created this PR to define null as return type in some functions in providers/src.ts/base-provider.ts since it didn't match with the functions implementations, where the functions return null.

It's the same issue that issue #1850 brought up.

Feel free to let me know of any feedback.

@ricmoo
Copy link
Member

ricmoo commented Nov 22, 2021

I can’t add this to v5 unfortunately. I have tried in the past and it breaks so many downstream dependencies.

In v5, there is no strict type checking in the TS config, so anything can return a null value. In v6, I am using strict which includes strictNullCheck, so this won’t be an issue.

So this won’t be an issue much longer. For now, keep in mind v5 does not strictly check null.

@ricmoo
Copy link
Member

ricmoo commented Dec 1, 2021

Closing this as it isn't compatible with v5 and v6 already has this in place.

Thanks! :)

@ricmoo ricmoo closed this Dec 1, 2021
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