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

IObservableArray.find() typing fix #1324

Merged
merged 1 commit into from
Jan 31, 2018
Merged

IObservableArray.find() typing fix #1324

merged 1 commit into from
Jan 31, 2018

Conversation

outring
Copy link
Contributor

@outring outring commented Jan 29, 2018

Hi! Currently, IObservableArray<T>.find returns T instead of T | undefined which leads to runtime errors.

I’ve tried to write a test, but it seems that typescript-tests.ts is not being typechecked, because even var x:string = 1 doesn’t fail. Is there any way to test this?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.472% when pulling 296a84b on outring:hotfix/find-typing into a7c7b45 on mobxjs:master.

@mweststrate
Copy link
Member

Thanks!

@mweststrate mweststrate merged commit 64c3ee2 into mobxjs:master Jan 31, 2018
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.

3 participants