Skip to content

Commit

Permalink
Fixed flow iterator type, fixes #1624
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Dec 3, 2018
1 parent 4746c04 commit 1cf5ab1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions flow-typed/mobx.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,6 @@ declare export class IObservableFactories {
deep(target: Object, property?: string, descriptor?: PropertyDescriptor): IObservableDecorator
}

export interface Iterator<T> {
next(): {
done: boolean,
value?: T
}
}

export interface Lambda {
(): void,
name?: string
Expand Down Expand Up @@ -327,7 +320,11 @@ export interface IWhenOptions {
onError?: (error: any) => void
}

declare export function when(cond: () => boolean, effect: Lambda, options?: IWhenOptions): () => mixed
declare export function when(
cond: () => boolean,
effect: Lambda,
options?: IWhenOptions
): () => mixed
declare export function when(cond: () => boolean, options?: IWhenOptions): Promise<any>

declare export function computed<T>(
Expand Down Expand Up @@ -358,7 +355,7 @@ declare export function isObservableProp(value: any, property: string): boolean
declare export var comparer: {
identity: IEqualsComparer<any>,
structural: IEqualsComparer<any>,
default: IEqualsComparer<any>,
default: IEqualsComparer<any>
}

declare export var observable: IObservableFactory &
Expand Down

0 comments on commit 1cf5ab1

Please sign in to comment.