-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Broken flow typings in mobx@4.0.0 #1392
Comments
Pr Would be great!
Op ma 12 mrt. 2018 17:53 schreef Andrew Romanov <notifications@github.com>:
… Hi! Thanks for mobx 4, flow decorator really simplifies async actions 👍
I have an issue with ***@***.*** flow typings. I updated mobx from 3 to 4,
ran flow and got this errors:
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/mobx/lib/mobx.js.flow:3:65
Cannot resolve name IDepTreeNode.
1│ // @flow
2│
3│ declare export function getAtom(thing: any, property?: string): IDepTreeNode
4│ declare export function getDebugName(thing: any, property?: string): string
5│ declare export function getDependencyTree(thing: any, property?: string): IDependencyTree
6│ declare export function getObserverTree(thing: any, property?: string): IObserverTree
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/mobx/lib/mobx.js.flow:5:75
Cannot resolve name IDependencyTree.
2│
3│ declare export function getAtom(thing: any, property?: string): IDepTreeNode
4│ declare export function getDebugName(thing: any, property?: string): string
5│ declare export function getDependencyTree(thing: any, property?: string): IDependencyTree
6│ declare export function getObserverTree(thing: any, property?: string): IObserverTree
7│
8│ export type IObservableMapInitialValues<K, V> = IMapEntries<K, V> | KeyValueMap<V> | IMap<K, V>
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/mobx/lib/mobx.js.flow:6:73
Cannot resolve name IObserverTree.
3│ declare export function getAtom(thing: any, property?: string): IDepTreeNode
4│ declare export function getDebugName(thing: any, property?: string): string
5│ declare export function getDependencyTree(thing: any, property?: string): IDependencyTree
6│ declare export function getObserverTree(thing: any, property?: string): IObserverTree
7│
8│ export type IObservableMapInitialValues<K, V> = IMapEntries<K, V> | KeyValueMap<V> | IMap<K, V>
9│
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ source/stores/auth/index.js:2:40
Cannot import reaction because there is no reaction export in mobx. Did you mean Reaction?
1│ // @flow
2│ import { observable, action, computed, reaction, runInAction } from 'mobx';
3│ import apiAdapter from '~/api';
4│ import localStorage from '~/utils/local-storage';
5│ import type {
It seems like IDepTreeNode, IDependencyTree and IObserverTree are used
before their definition, and reaction type annotation is missing.
I'd make a PR with fixes if it's ok.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1392>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvGhL0tQiLUacviXU7iktqo5Vn-uGbYks5tdqf9gaJpZM4SnAUl>
.
|
Merged
Released in 4.0.1, thanks for the PR! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks for mobx 4,
flow
decorator really simplifies async actions 👍I have an issue with mobx@4.0.0 flow typings. I updated mobx from 3 to 4, ran
flow
and got these errors:It seems like
IDepTreeNode
,IDependencyTree
andIObserverTree
are used before their definition, andreaction
type annotation is missing.I'd make a PR with fixes if it's ok.
The text was updated successfully, but these errors were encountered: