Skip to content

Commit

Permalink
clipboard types: Fix $FlowFixMes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe committed Mar 29, 2022
1 parent 3d9cd20 commit 23e236c
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions types/@react-native-clipboard/clipboard.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ declare var Clipboard: {
* }
* ```
*/
hasString(): $FlowFixMe, // `any` in TypeScript upstream :(
// In the TS upstream, this is `any`. But reading code in 1.8.5, the
// resolve value is always a boolean:
// [NSNumber numberWithBool: …]
// (NSNumber is a funny way of saying boolean; it's a "boxed value":
// https://clang.llvm.org/docs/ObjectiveCLiterals.html )
hasString(): Promise<boolean>,

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

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

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

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

/**
* (iOS and Android Only)
Expand Down

0 comments on commit 23e236c

Please sign in to comment.