Skip to content

Commit 23e236c

Browse files
committed
clipboard types: Fix $FlowFixMes
1 parent 3d9cd20 commit 23e236c

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

types/@react-native-clipboard/clipboard.js.flow

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ declare var Clipboard: {
7676
* }
7777
* ```
7878
*/
79-
hasString(): $FlowFixMe, // `any` in TypeScript upstream :(
79+
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
80+
// resolve value is always a boolean:
81+
// [NSNumber numberWithBool: …]
82+
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
83+
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
84+
hasString(): Promise<boolean>,
8085

8186
/**
8287
* Returns whether the clipboard has an image or is empty.
@@ -87,7 +92,12 @@ declare var Clipboard: {
8792
* }
8893
* ```
8994
*/
90-
hasImage(): $FlowFixMe, // `any` in TypeScript upstream :(
95+
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
96+
// resolve value is always a boolean:
97+
// [NSNumber numberWithBool: …]
98+
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
99+
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
100+
hasImage(): Promise<boolean>,
91101

92102
/**
93103
* (IOS Only)
@@ -100,7 +110,12 @@ declare var Clipboard: {
100110
* }
101111
* ```
102112
*/
103-
hasURL(): $FlowFixMe, // `any` in TypeScript upstream :(
113+
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
114+
// resolve value is always a boolean:
115+
// [NSNumber numberWithBool: …]
116+
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
117+
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
118+
hasURL(): Promise<boolean>,
104119

105120
/**
106121
* (IOS 14+ Only)
@@ -113,7 +128,12 @@ declare var Clipboard: {
113128
* }
114129
* ```
115130
*/
116-
hasNumber(): $FlowFixMe, // `any` in TypeScript upstream :(
131+
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
132+
// resolve value is always a boolean:
133+
// [NSNumber numberWithBool: …]
134+
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
135+
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
136+
hasNumber(): Promise<boolean>,
117137

118138
/**
119139
* (IOS 14+ Only)
@@ -126,7 +146,12 @@ declare var Clipboard: {
126146
* }
127147
* ```
128148
*/
129-
hasWebURL(): $FlowFixMe, // `any` in TypeScript upstream :(
149+
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
150+
// resolve value is always a boolean:
151+
// [NSNumber numberWithBool: …]
152+
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
153+
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
154+
hasWebURL(): Promise<boolean>,
130155

131156
/**
132157
* (iOS and Android Only)

0 commit comments

Comments
 (0)