Skip to content

Commit b02d411

Browse files
gabeleviFacebook Github Bot 9
authored andcommitted
Deploy v0.23.0
Reviewed By: mroch Differential Revision: D3179969 fb-gh-sync-id: e0513a17d565ff1ae5c6e58c49ce82b6b0d5db86 fbshipit-source-id: e0513a17d565ff1ae5c6e58c49ce82b6b0d5db86
1 parent 0e719bd commit b02d411

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

.flowconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ suppress_type=$FlowIssue
8787
suppress_type=$FlowFixMe
8888
suppress_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]+
9292
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
9393

9494
[version]
95-
^0.22.0
95+
0.23.0

flow/Promise.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
}

0 commit comments

Comments
 (0)