[TS] Type clipboard common module (#15)
* [TS] Type clipboard common module * [TS] Add a _ to Clipboard for style
This commit is contained in:
parent
1891a46eb9
commit
2f856b3a72
4 changed files with 18 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
||||||
"author": "Beef",
|
"author": "Beef",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@react-native-clipboard/clipboard": "1.10.0",
|
||||||
"@types/react": "18.0.27",
|
"@types/react": "18.0.27",
|
||||||
"@types/react-native": "0.70.6",
|
"@types/react-native": "0.70.6",
|
||||||
"esbuild": "^0.17.5",
|
"esbuild": "^0.17.5",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
lockfileVersion: 5.4
|
lockfileVersion: 5.4
|
||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
|
'@react-native-clipboard/clipboard': ^1.10.0
|
||||||
'@types/react': 18.0.27
|
'@types/react': 18.0.27
|
||||||
'@types/react-native': 0.70.6
|
'@types/react-native': 0.70.6
|
||||||
esbuild: ^0.17.5
|
esbuild: ^0.17.5
|
||||||
|
@ -14,6 +15,7 @@ dependencies:
|
||||||
spitroast: 1.4.2
|
spitroast: 1.4.2
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@react-native-clipboard/clipboard': 1.10.0
|
||||||
'@types/react': 18.0.27
|
'@types/react': 18.0.27
|
||||||
'@types/react-native': 0.70.6
|
'@types/react-native': 0.70.6
|
||||||
esbuild: 0.17.5
|
esbuild: 0.17.5
|
||||||
|
@ -222,6 +224,18 @@ packages:
|
||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
/@react-native-clipboard/clipboard/1.10.0:
|
||||||
|
resolution: {integrity: sha512-1L+I0vmeUJgMi8MnNsqI00391/RFLkmmxj9qAuOS2madpvce/oNqJb8Pwk2Fc/uxIJSxOckTpq+dQwyPU6s+7w==}
|
||||||
|
peerDependencies:
|
||||||
|
react: '>=16.0'
|
||||||
|
react-native: '>=0.57.0'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
react:
|
||||||
|
optional: true
|
||||||
|
react-native:
|
||||||
|
optional: true
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/prop-types/15.7.5:
|
/@types/prop-types/15.7.5:
|
||||||
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
|
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
3
src/def.d.ts
vendored
3
src/def.d.ts
vendored
|
@ -1,6 +1,7 @@
|
||||||
import * as _spitroast from "spitroast";
|
import * as _spitroast from "spitroast";
|
||||||
import _React from "react";
|
import _React from "react";
|
||||||
import _RN from "react-native";
|
import _RN from "react-native";
|
||||||
|
import _Clipboard from "@react-native-clipboard/clipboard";
|
||||||
|
|
||||||
type MetroModules = { [id: number]: any };
|
type MetroModules = { [id: number]: any };
|
||||||
|
|
||||||
|
@ -217,7 +218,7 @@ interface VendettaObject {
|
||||||
url: PropIntellisense<"openURL">;
|
url: PropIntellisense<"openURL">;
|
||||||
toasts: PropIntellisense<"open" | "close">;
|
toasts: PropIntellisense<"open" | "close">;
|
||||||
stylesheet: PropIntellisense<"createThemedStyleSheet">;
|
stylesheet: PropIntellisense<"createThemedStyleSheet">;
|
||||||
clipboard: PropIntellisense<"setString" | "getString" | "hasString">;
|
clipboard: typeof _Clipboard;
|
||||||
assets: PropIntellisense<"registerAsset">;
|
assets: PropIntellisense<"registerAsset">;
|
||||||
invites: PropIntellisense<"acceptInviteAndTransitionToInviteChannel">;
|
invites: PropIntellisense<"acceptInviteAndTransitionToInviteChannel">;
|
||||||
commands: PropIntellisense<"getBuiltInCommands">;
|
commands: PropIntellisense<"getBuiltInCommands">;
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const i18n = findByProps("Messages");
|
||||||
export const url = findByProps("openURL");
|
export const url = findByProps("openURL");
|
||||||
export const toasts = find(m => m.open && m.close && !m.startDrag && !m.init && !m.openReplay && !m.setAlwaysOnTop);
|
export const toasts = find(m => m.open && m.close && !m.startDrag && !m.init && !m.openReplay && !m.setAlwaysOnTop);
|
||||||
export const stylesheet = findByProps("createThemedStyleSheet");
|
export const stylesheet = findByProps("createThemedStyleSheet");
|
||||||
export const clipboard = findByProps("setString", "getString", "hasString");
|
export const clipboard = findByProps("setString", "getString", "hasString") as typeof import("@react-native-clipboard/clipboard").default;
|
||||||
export const assets = findByProps("registerAsset");
|
export const assets = findByProps("registerAsset");
|
||||||
export const invites = findByProps("acceptInviteAndTransitionToInviteChannel");
|
export const invites = findByProps("acceptInviteAndTransitionToInviteChannel");
|
||||||
export const commands = findByProps("getBuiltInCommands");
|
export const commands = findByProps("getBuiltInCommands");
|
||||||
|
|
Loading…
Reference in a new issue