forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Migrate to @react-native-clipboard/clipboard
`Clipboard` in RN core has been deprecated for a while, and in RN's v0.71 doc they finally mark it "removed": https://reactnative.dev/docs/clipboard We've reportedly (zulip#4502) been getting console warnings that we should use @react-native-community/clipboard instead of the RN-core module. Do basically that, except we use its new name, @react-native-clipboard/clipboard; see react-native-clipboard/clipboard#87 Supersedes: zulip#4502 Co-authored-by: rajprakash00 <rajprakash1999@gmail.com>
- Loading branch information
1 parent
69cd544
commit 367a003
Showing
14 changed files
with
81 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
types/@react-native-clipboard/clipboard/dist/Clipboard.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
import type { EmitterSubscription as $tsflower_subst$RN$EmitterSubscription } from 'tsflower/subst/react-native'; | ||
import 'react-native'; | ||
|
||
declare export var Clipboard: { | ||
getString(): Promise<string>, | ||
getStrings(): Promise<string[]>, | ||
getImagePNG(): Promise<string>, | ||
getImageJPG(): Promise<string>, | ||
setImage(content: string): void, | ||
getImage(): Promise<string>, | ||
setString(content: string): void, | ||
setStrings(content: string[]): void, | ||
hasString(): any, | ||
hasImage(): any, | ||
hasURL(): any, | ||
hasNumber(): any, | ||
hasWebURL(): any, | ||
addListener(callback: () => void): $tsflower_subst$RN$EmitterSubscription, | ||
removeAllListeners(): void, | ||
... | ||
}; |
10 changes: 10 additions & 0 deletions
10
types/@react-native-clipboard/clipboard/dist/NativeClipboard.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
import type { EmitterSubscription as $tsflower_subst$RN$EmitterSubscription } from 'tsflower/subst/react-native'; | ||
import 'react-native'; | ||
declare var _default: any; | ||
export default _default; | ||
declare var addListener: (callback: () => void) => $tsflower_subst$RN$EmitterSubscription; | ||
declare var removeAllListeners: () => void; | ||
export { addListener, removeAllListeners }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
import { Clipboard } from './Clipboard'; | ||
export { useClipboard } from './useClipboard'; | ||
export default Clipboard; |
4 changes: 4 additions & 0 deletions
4
types/@react-native-clipboard/clipboard/dist/useClipboard.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
declare export var useClipboard: () => [string, (content: string) => void]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* @flow | ||
* @generated | ||
*/ | ||
export * from './dist/index.js.flow'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters