mobx-utils icon indicating copy to clipboard operation
mobx-utils copied to clipboard

lazyObservable.current is missing `| undefined` in type signature

Open lukebjerring opened this issue 3 years ago • 1 comments

https://github.com/mobxjs/mobx-utils/blob/3a1ee03527950a44c5ce57007344a56a9b974c94/src/lazy-observable.ts#L45

Given that we're fine to omit the initial value fallback, current() can return undefined while the promise is unresolved. The code snippet example even compares current() === undefined.

lukebjerring avatar Jan 17 '22 17:01 lukebjerring