mobx 6.15.2 → 6.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # mobx
2
2
 
3
+ ## 6.15.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`25e859a3582bcdd3c5a71aa52510adfd924a1a60`](https://github.com/mobxjs/mobx/commit/25e859a3582bcdd3c5a71aa52510adfd924a1a60) [#4644](https://github.com/mobxjs/mobx/pull/4644) Thanks [@kubk](https://github.com/kubk)! - Fix TypeScript errors when using `flow` as a standard decorator.
8
+
3
9
  ## 6.15.2
4
10
 
5
11
  ### Patch Changes
@@ -9,7 +9,9 @@ export declare function isFlowCancellationError(error: Error): error is FlowCanc
9
9
  export type CancellablePromise<T> = Promise<T> & {
10
10
  cancel(): void;
11
11
  };
12
- interface Flow extends Annotation, PropertyDecorator, ClassMethodDecorator {
12
+ type FlowGenerator = (...args: any[]) => Generator<any, any, any> | AsyncGenerator<any, any, any>;
13
+ interface Flow extends Annotation, PropertyDecorator {
14
+ <This, Value extends FlowGenerator>(value: Value, context: ClassMethodDecoratorContext<This, Value>): Value | void;
13
15
  <R, Args extends any[]>(generator: (...args: Args) => Generator<any, R, any> | AsyncGenerator<any, R, any>): (...args: Args) => CancellablePromise<R>;
14
16
  bound: Annotation & PropertyDecorator & ClassMethodDecorator;
15
17
  }