[TS] Type clipboard common module (#15)

* [TS] Type clipboard common module

* [TS] Add a _ to Clipboard for style
This commit is contained in:
Jack 2023-02-04 13:44:33 -05:00 committed by GitHub
parent 1891a46eb9
commit 2f856b3a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View file

@ -14,6 +14,7 @@
"author": "Beef",
"license": "BSD-3-Clause",
"devDependencies": {
"@react-native-clipboard/clipboard": "1.10.0",
"@types/react": "18.0.27",
"@types/react-native": "0.70.6",
"esbuild": "^0.17.5",

View file

@ -1,6 +1,7 @@
lockfileVersion: 5.4
specifiers:
'@react-native-clipboard/clipboard': ^1.10.0
'@types/react': 18.0.27
'@types/react-native': 0.70.6
esbuild: ^0.17.5
@ -14,6 +15,7 @@ dependencies:
spitroast: 1.4.2
devDependencies:
'@react-native-clipboard/clipboard': 1.10.0
'@types/react': 18.0.27
'@types/react-native': 0.70.6
esbuild: 0.17.5
@ -222,6 +224,18 @@ packages:
dev: 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:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
dev: true

3
src/def.d.ts vendored
View file

@ -1,6 +1,7 @@
import * as _spitroast from "spitroast";
import _React from "react";
import _RN from "react-native";
import _Clipboard from "@react-native-clipboard/clipboard";
type MetroModules = { [id: number]: any };
@ -217,7 +218,7 @@ interface VendettaObject {
url: PropIntellisense<"openURL">;
toasts: PropIntellisense<"open" | "close">;
stylesheet: PropIntellisense<"createThemedStyleSheet">;
clipboard: PropIntellisense<"setString" | "getString" | "hasString">;
clipboard: typeof _Clipboard;
assets: PropIntellisense<"registerAsset">;
invites: PropIntellisense<"acceptInviteAndTransitionToInviteChannel">;
commands: PropIntellisense<"getBuiltInCommands">;

View file

@ -7,7 +7,7 @@ export const i18n = findByProps("Messages");
export const url = findByProps("openURL");
export const toasts = find(m => m.open && m.close && !m.startDrag && !m.init && !m.openReplay && !m.setAlwaysOnTop);
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 invites = findByProps("acceptInviteAndTransitionToInviteChannel");
export const commands = findByProps("getBuiltInCommands");