File tree Expand file tree Collapse file tree 2 files changed +43
-3
lines changed
Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ suppress_type=$FlowIssue
8787suppress_type=$FlowFixMe
8888suppress_type=$FixMe
8989
90- suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-2 ]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
91- suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-2 ]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
90+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-3 ]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
91+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-3 ]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
9292suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
9393
9494[version]
95- ^0.22 .0
95+ 0.23 .0
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2013-present, Facebook, Inc.
3+ * All rights reserved.
4+ *
5+ * This source code is licensed under the BSD-style license found in the
6+ * LICENSE file in the root directory of this source tree. An additional grant
7+ * of patent rights can be found in the PATENTS file in the same directory.
8+ */
9+
10+ // These annotations are copy/pasted from the built-in Flow definitions for
11+ // Native Promises with some non-standard APIs added in
12+ declare class Promise < + R > {
13+ constructor ( callback : (
14+ resolve : ( result ?: Promise < R > | R ) = > void ,
15+ reject : ( error ? : any ) = > void
16+ ) => mixed ) : void ;
17+
18+ then < U > (
19+ onFulfill ?: ?( value : R ) => Promise < U > | ?U ,
20+ onReject ?: ?( error : any ) => Promise < U > | ?U
21+ ) : Promise < U > ;
22+
23+ catch < U > (
24+ onReject?: (error: any) => ?Promise < U > | U
25+ ) : Promise < U > ;
26+
27+ static resolve < T > ( object ?: Promise < T > | T ) : Promise < T > ;
28+ static reject < T > ( error ? : any ) : Promise < T > ;
29+
30+ static all : Promise$All ;
31+ static race < T > ( promises : Array < Promise < T >> ) : Promise < T > ;
32+
33+ // Non-standard APIs
34+ done < U > (
35+ onFulfill ?: ?( value : R ) => mixed ,
36+ onReject ?: ?( error : any ) => mixed
37+ ) : void ;
38+
39+ static cast < T > ( object ? : T ) : Promise < T > ;
40+ }
You can’t perform that action at this time.
0 commit comments