mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
fix: apply reported changes
This commit is contained in:
parent
69ea49f587
commit
92dca5cf1a
27 changed files with 98 additions and 67 deletions
|
@ -26,7 +26,7 @@ jobs:
|
|||
|
||||
- name: Check packages/discord-types for TypeScript errors and lint
|
||||
run: | # https://github.com/microsoft/TypeScript/issues/40431
|
||||
pnpm tsc --emitDeclarationOnly
|
||||
pnpm tspc --emitDeclarationOnly
|
||||
cd packages/discord-types
|
||||
pnpm test
|
||||
|
||||
|
|
2
.github/workflows/test-scripts.yml
vendored
2
.github/workflows/test-scripts.yml
vendored
|
@ -28,6 +28,6 @@ jobs:
|
|||
|
||||
- name: Check scripts for TypeScript errors
|
||||
run: | # https://github.com/microsoft/TypeScript/issues/40431
|
||||
pnpm tsc --emitDeclarationOnly
|
||||
pnpm tspc --emitDeclarationOnly
|
||||
cd scripts
|
||||
pnpm tsc --noEmit
|
||||
|
|
|
@ -208,4 +208,14 @@ export default tseslint.config(
|
|||
"yoda": "error",
|
||||
}
|
||||
},
|
||||
// Declarations are not emitted for '.d.ts' files: https://github.com/microsoft/TypeScript/issues/38146
|
||||
{
|
||||
files: ["src/webpack/common/types/**"],
|
||||
rules: {
|
||||
"no-restricted-syntax": ["error", {
|
||||
selector: ":expression:not([declare=true] *, [type=/^TS/] *, ExportAllDeclaration *, ExportNamedDeclaration *, ImportDeclaration *)",
|
||||
message: "This file is intended to contain only types."
|
||||
}],
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
"esbuild": "^0.23.1",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint-plugin-path-alias": "^2.1.0",
|
||||
"eslint-plugin-react": "^7.35.2",
|
||||
"eslint-plugin-react": "^7.36.1",
|
||||
"eslint-plugin-simple-header": "^1.2.1",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unused-imports": "^4.1.3",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"highlight.js": "11.8.0",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"moment": "2.22.2",
|
||||
|
@ -74,7 +74,7 @@
|
|||
"stylelint-config-standard": "^36.0.1",
|
||||
"ts-patch": "^3.2.1",
|
||||
"ts-pattern": "5.0.4",
|
||||
"tsx": "^4.19.0",
|
||||
"tsx": "^4.19.1",
|
||||
"type-fest": "^4.26.1",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.5.0",
|
||||
|
@ -87,7 +87,8 @@
|
|||
"@stylistic/eslint-plugin@2.8.0": "patches/@stylistic__eslint-plugin@2.8.0.patch",
|
||||
"eslint-plugin-path-alias@2.1.0": "patches/eslint-plugin-path-alias@2.1.0.patch",
|
||||
"eslint@9.10.0": "patches/eslint@9.10.0.patch",
|
||||
"standalone-electron-types@1.0.0": "patches/standalone-electron-types@1.0.0.patch"
|
||||
"standalone-electron-types@1.0.0": "patches/standalone-electron-types@1.0.0.patch",
|
||||
"typescript-transform-paths@3.5.1": "patches/typescript-transform-paths@3.5.1.patch"
|
||||
},
|
||||
"packageExtensions": {
|
||||
"eslint": {
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
"eslint-plugin-simple-header": "^1.2.1",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unicorn": "^55.0.0",
|
||||
"eslint-plugin-unused-imports": "^4.1.3",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"puppeteer-core": "^23.3.0",
|
||||
"semver": "^7.6.3",
|
||||
"tsx": "^4.19.0",
|
||||
"tsx": "^4.19.1",
|
||||
"type-fest": "^4.26.1",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.5.0"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,7 @@ import type { ChannelRecord, ChannelType } from "../channels/ChannelRecord";
|
|||
import type { UserRecord } from "../UserRecord";
|
||||
import type { InteractionRecord, InteractionType } from "./InteractionRecord";
|
||||
import type { MessageSnapshotRecord } from "./MessageSnapshotRecord";
|
||||
import type { MessageFlags, MinimalMessageRecord, MinimalMessageRecordOwnProperties } from "./MinimalMessageRecord";
|
||||
import type { MinimalMessageRecord, MinimalMessageRecordOwnProperties } from "./MinimalMessageRecord";
|
||||
|
||||
export type MessageRecordOwnProperties = MinimalMessageRecordOwnProperties & Pick<MessageRecord, "activity" | "activityInstance" | "application" | "applicationId" | "author" | "blocked" | "bot" | "call" | "changelogId" | "channel_id" | "colorString" | "customRenderedContent" | "giftCodes" | "giftInfo" | "id" | "interaction" | "interactionData" | "interactionError" | "interactionMetadata" | "isSearchHit" | "isUnsupported" | "loggingName" | "mentionChannels" | "mentioned" | "mentionEveryone" | "mentionRoles" | "mentions" | "messageReference" | "messageSnapshots" | "nick" | "nonce" | "pinned" | "poll" | "purchaseNotification" | "reactions" | "referralTrialOfferId" | "roleSubscriptionData" | "state" | "tts" | "webhookId">;
|
||||
|
||||
|
@ -42,8 +42,8 @@ export declare class MessageRecord<
|
|||
): this;
|
||||
canDeleteOwnMessage(userId: string): boolean;
|
||||
getChannelId(): string;
|
||||
getContentMessage(): MinimalMessageRecord | this | undefined;
|
||||
getReaction(emoji: MessageReactionEmoji): MessageReaction | undefined;
|
||||
hasFlag(flag: MessageFlags): boolean;
|
||||
isCommandType(): boolean;
|
||||
isEdited(): boolean;
|
||||
isFirstMessageInForumPost(channel: ChannelRecord): boolean;
|
||||
|
|
|
@ -20,6 +20,8 @@ export declare class MinimalMessageRecord<
|
|||
> extends RecordBase<OwnProperties> {
|
||||
constructor(minimalMessageProperties: MinimalMessageProperties);
|
||||
|
||||
hasFlag(flag: MessageFlags): boolean;
|
||||
|
||||
attachments: MessageAttachment[];
|
||||
codedLinks: CodedLink[];
|
||||
components: MessageComponent[];
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,7 +28,7 @@
|
|||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tsx": "^4.19.0",
|
||||
"tsx": "^4.19.1",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
|
13
patches/typescript-transform-paths@3.5.1.patch
Normal file
13
patches/typescript-transform-paths@3.5.1.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/dist/transformer.js b/dist/transformer.js
|
||||
index a065be75d92d96332bb38dd66e45aa742c191446..259463bb61e50396289cf56abcaf89de5009e6a4 100644
|
||||
--- a/dist/transformer.js
|
||||
+++ b/dist/transformer.js
|
||||
@@ -108,7 +108,7 @@ manualTransformOptions) {
|
||||
...tsTransformPathsContext,
|
||||
sourceFile,
|
||||
isDeclarationFile: sourceFile.isDeclarationFile,
|
||||
- originalSourceFile: tsInstance.getOriginalSourceFile(sourceFile),
|
||||
+ originalSourceFile: tsInstance.getSourceFileOfNode(sourceFile),
|
||||
getVisitor() {
|
||||
return visitor_1.nodeVisitor.bind(this);
|
||||
},
|
|
@ -36,6 +36,9 @@ patchedDependencies:
|
|||
standalone-electron-types@1.0.0:
|
||||
hash: cvychuhjtbzvtowhc2efrgpqjq
|
||||
path: patches/standalone-electron-types@1.0.0.patch
|
||||
typescript-transform-paths@3.5.1:
|
||||
hash: 67beklx2y5qvw7iy3wqqxjhwr4
|
||||
path: patches/typescript-transform-paths@3.5.1.patch
|
||||
|
||||
importers:
|
||||
|
||||
|
@ -115,8 +118,8 @@ importers:
|
|||
specifier: ^2.1.0
|
||||
version: 2.1.0(patch_hash=japuwsqfkulviwgkm4kd2oi3ky)(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
eslint-plugin-react:
|
||||
specifier: ^7.35.2
|
||||
version: 7.35.2(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
specifier: ^7.36.1
|
||||
version: 7.36.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
eslint-plugin-simple-header:
|
||||
specifier: ^1.2.1
|
||||
version: 1.2.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
|
@ -124,8 +127,8 @@ importers:
|
|||
specifier: ^12.1.1
|
||||
version: 12.1.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
eslint-plugin-unused-imports:
|
||||
specifier: ^4.1.3
|
||||
version: 4.1.3(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
specifier: ^4.1.4
|
||||
version: 4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
highlight.js:
|
||||
specifier: 11.8.0
|
||||
version: 11.8.0
|
||||
|
@ -154,8 +157,8 @@ importers:
|
|||
specifier: 5.0.4
|
||||
version: 5.0.4
|
||||
tsx:
|
||||
specifier: ^4.19.0
|
||||
version: 4.19.0
|
||||
specifier: ^4.19.1
|
||||
version: 4.19.1
|
||||
type-fest:
|
||||
specifier: ^4.26.1
|
||||
version: 4.26.1
|
||||
|
@ -167,7 +170,7 @@ importers:
|
|||
version: 8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
|
||||
typescript-transform-paths:
|
||||
specifier: ^3.5.1
|
||||
version: 3.5.1(typescript@5.6.2)
|
||||
version: 3.5.1(patch_hash=67beklx2y5qvw7iy3wqqxjhwr4)(typescript@5.6.2)
|
||||
zip-local:
|
||||
specifier: ^0.3.5
|
||||
version: 0.3.5
|
||||
|
@ -227,8 +230,8 @@ importers:
|
|||
specifier: ^55.0.0
|
||||
version: 55.0.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
eslint-plugin-unused-imports:
|
||||
specifier: ^4.1.3
|
||||
version: 4.1.3(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
specifier: ^4.1.4
|
||||
version: 4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
|
||||
puppeteer-core:
|
||||
specifier: ^23.3.0
|
||||
version: 23.3.0
|
||||
|
@ -236,8 +239,8 @@ importers:
|
|||
specifier: ^7.6.3
|
||||
version: 7.6.3
|
||||
tsx:
|
||||
specifier: ^4.19.0
|
||||
version: 4.19.0
|
||||
specifier: ^4.19.1
|
||||
version: 4.19.1
|
||||
type-fest:
|
||||
specifier: ^4.26.1
|
||||
version: 4.26.1
|
||||
|
@ -282,8 +285,8 @@ importers:
|
|||
specifier: ^11.2.0
|
||||
version: 11.2.0
|
||||
tsx:
|
||||
specifier: ^4.19.0
|
||||
version: 4.19.0
|
||||
specifier: ^4.19.1
|
||||
version: 4.19.1
|
||||
typescript:
|
||||
specifier: ^5.6.2
|
||||
version: 5.6.2
|
||||
|
@ -1174,8 +1177,8 @@ packages:
|
|||
peerDependencies:
|
||||
eslint: ^8.0.0
|
||||
|
||||
eslint-plugin-react@7.35.2:
|
||||
resolution: {integrity: sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==}
|
||||
eslint-plugin-react@7.36.1:
|
||||
resolution: {integrity: sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
||||
|
@ -1196,8 +1199,8 @@ packages:
|
|||
peerDependencies:
|
||||
eslint: '>=8.56.0'
|
||||
|
||||
eslint-plugin-unused-imports@4.1.3:
|
||||
resolution: {integrity: sha512-lqrNZIZjFMUr7P06eoKtQLwyVRibvG7N+LtfKtObYGizAAGrcqLkc3tDx+iAik2z7q0j/XI3ihjupIqxhFabFA==}
|
||||
eslint-plugin-unused-imports@4.1.4:
|
||||
resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0
|
||||
eslint: ^9.0.0 || ^8.0.0
|
||||
|
@ -2266,8 +2269,8 @@ packages:
|
|||
tslib@2.7.0:
|
||||
resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==}
|
||||
|
||||
tsx@4.19.0:
|
||||
resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==}
|
||||
tsx@4.19.1:
|
||||
resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
hasBin: true
|
||||
|
||||
|
@ -3285,7 +3288,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-react@7.35.2(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
|
||||
eslint-plugin-react@7.36.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
|
||||
dependencies:
|
||||
array-includes: '@nolyfill/array-includes@1.0.28'
|
||||
array.prototype.findlast: '@nolyfill/array.prototype.findlast@1.0.24'
|
||||
|
@ -3335,7 +3338,7 @@ snapshots:
|
|||
semver: 7.6.3
|
||||
strip-indent: 3.0.0
|
||||
|
||||
eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
|
||||
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
|
||||
dependencies:
|
||||
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
|
||||
optionalDependencies:
|
||||
|
@ -4456,7 +4459,7 @@ snapshots:
|
|||
|
||||
tslib@2.7.0: {}
|
||||
|
||||
tsx@4.19.0:
|
||||
tsx@4.19.1:
|
||||
dependencies:
|
||||
esbuild: 0.23.1
|
||||
get-tsconfig: 4.7.5
|
||||
|
@ -4486,7 +4489,7 @@ snapshots:
|
|||
- eslint
|
||||
- supports-color
|
||||
|
||||
typescript-transform-paths@3.5.1(typescript@5.6.2):
|
||||
typescript-transform-paths@3.5.1(patch_hash=67beklx2y5qvw7iy3wqqxjhwr4)(typescript@5.6.2):
|
||||
dependencies:
|
||||
minimatch: 9.0.5
|
||||
typescript: 5.6.2
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import type { Settings } from "@api/Settings";
|
||||
import type { PluginIpcMappings } from "@main/ipcPlugins";
|
||||
import type { UserThemeHeader } from "@main/themes";
|
||||
import { IpcEvents } from "@shared/IpcEvents";
|
||||
import type { IpcRes } from "@utils/types";
|
||||
import type { Settings } from "api/Settings";
|
||||
import { ipcRenderer } from "electron";
|
||||
|
||||
function invoke<T = any>(event: IpcEvents, ...args: unknown[]): Promise<T> {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import { Logger } from "@utils/Logger";
|
||||
import * as Webpack from "@webpack";
|
||||
import { patches } from "plugins";
|
||||
|
||||
import { patches } from "../plugins";
|
||||
import { loadLazyChunks } from "./loadLazyChunks";
|
||||
|
||||
const ReporterLogger = new Logger("Reporter");
|
||||
|
|
2
src/globals.d.ts
vendored
2
src/globals.d.ts
vendored
|
@ -138,4 +138,4 @@ type TupleKeys<T extends readonly unknown[]>
|
|||
? number
|
||||
: Exclude<Partial<T>["length"], T["length"]>;
|
||||
|
||||
export { };
|
||||
export {};
|
||||
|
|
2
src/modules.d.ts
vendored
2
src/modules.d.ts
vendored
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/// <reference types="standalone-electron-types"/>
|
||||
/// <reference types="standalone-electron-types" />
|
||||
|
||||
declare module "~plugins" {
|
||||
const plugins: Record<string, import("./utils/types").Plugin>;
|
||||
|
|
|
@ -25,9 +25,10 @@ import definePlugin, { type PluginNative, StartAt } from "@utils/types";
|
|||
import * as Webpack from "@webpack";
|
||||
import { extract, filters, findAll, findModuleId, search } from "@webpack";
|
||||
import * as Common from "@webpack/common";
|
||||
import { loadLazyChunks } from "debug/loadLazyChunks";
|
||||
import type { ComponentType } from "react";
|
||||
|
||||
import { loadLazyChunks } from "../../debug/loadLazyChunks";
|
||||
|
||||
const DESKTOP_ONLY = (f: string) => () => {
|
||||
throw new Error(`'${f}' is Discord Desktop only.`);
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { CopyIcon, DeleteIcon } from "@components/Icons";
|
||||
import { AlertActionCreators, ClipboardUtils, ContextMenuApi, Menu, UserStore } from "webpack/common";
|
||||
import { AlertActionCreators, ClipboardUtils, ContextMenuApi, Menu, UserStore } from "@webpack/common";
|
||||
|
||||
import type { Decoration } from "../../lib/api";
|
||||
import { useCurrentUserDecorationsStore } from "../../lib/stores/CurrentUserDecorationsStore";
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { definePluginSettings, Settings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { type PersistedStore, RelationshipType } from "@vencord/discord-types";
|
||||
import { findStoreLazy } from "@webpack";
|
||||
import { ChannelStore, Constants, FluxDispatcher, GuildStore, RelationshipStore, SnowflakeUtils, UserStore } from "@webpack/common";
|
||||
import { Settings } from "Vencord";
|
||||
|
||||
const UserAffinitiesStore: PersistedStore & Record<string, any> = findStoreLazy("UserAffinitiesStore");
|
||||
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import gitHash from "~git-hash";
|
||||
import gitRemote from "~git-remote";
|
||||
import $gitHash from "~git-hash";
|
||||
import $gitRemote from "~git-remote";
|
||||
|
||||
export { gitHash, gitRemote };
|
||||
// Declarations are not emitted for modules '~git-hash' and '~git-remote'.
|
||||
export const gitHash: string = $gitHash;
|
||||
export const gitRemote: string = $gitRemote;
|
||||
|
||||
export const VENCORD_USER_AGENT = `Vencord/${gitHash}${gitRemote ? ` (https://github.com/${gitRemote})` : ""}`;
|
||||
|
|
|
@ -21,8 +21,8 @@ export * from "./components";
|
|||
export * from "./menu";
|
||||
export * from "./react";
|
||||
export * from "./stores";
|
||||
export type * as ComponentTypes from "./types/components.d";
|
||||
export type * as MenuTypes from "./types/menu.d";
|
||||
export type * as UtilTypes from "./types/utils.d";
|
||||
export type * as ComponentTypes from "./types/components";
|
||||
export type * as MenuTypes from "./types/menu";
|
||||
export type * as UtilTypes from "./types/utils";
|
||||
export * from "./userSettings";
|
||||
export * from "./utils";
|
||||
|
|
|
@ -24,7 +24,7 @@ export type FormTextTypes = Record<"DEFAULT" | "INPUT_PLACEHOLDER" | "DESCRIPTIO
|
|||
export type HeadingTag = `h${1 | 2 | 3 | 4 | 5 | 6}`;
|
||||
|
||||
export type Margins = Record<"marginTop16" | "marginTop8" | "marginBottom8" | "marginTop20" | "marginBottom20", string>;
|
||||
export type ButtonLooks = Record<"FILLED" | "INVERTED" | "OUTLINED" | "LINK" | "BLANK", string>;
|
||||
export type ButtonLooks = Record<"FILLED" | "OUTLINED" | "LINK" | "BLANK", string>;
|
||||
|
||||
export type TextProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement> & {
|
||||
variant?: TextVariant;
|
||||
|
@ -176,7 +176,7 @@ export type Button = ComponentType<PropsWithChildren<Omit<HTMLProps<HTMLButtonEl
|
|||
BorderColors: Record<"BLACK" | "BRAND" | "BRAND_NEW" | "GREEN" | "LINK" | "PRIMARY" | "RED" | "TRANSPARENT" | "WHITE" | "YELLOW", string>;
|
||||
Colors: Record<"BRAND" | "RED" | "GREEN" | "YELLOW" | "PRIMARY" | "LINK" | "WHITE" | "BLACK" | "TRANSPARENT" | "BRAND_NEW" | "CUSTOM", string>;
|
||||
Hovers: Record<"DEFAULT" | "BRAND" | "RED" | "GREEN" | "YELLOW" | "PRIMARY" | "LINK" | "WHITE" | "BLACK" | "TRANSPARENT", string>;
|
||||
Looks: Record<"FILLED" | "INVERTED" | "OUTLINED" | "LINK" | "BLANK", string>;
|
||||
Looks: ButtonLooks;
|
||||
Sizes: Record<"NONE" | "TINY" | "SMALL" | "MEDIUM" | "LARGE" | "XLARGE" | "MIN" | "MAX" | "ICON", string>;
|
||||
|
||||
Link: any;
|
||||
|
@ -487,7 +487,7 @@ export type Avatar = ComponentType<PropsWithChildren<{
|
|||
"aria-label"?: string;
|
||||
}>>;
|
||||
|
||||
type FocusLock = ComponentType<PropsWithChildren<{
|
||||
export type FocusLock = ComponentType<PropsWithChildren<{
|
||||
containerRef: RefObject<HTMLElement>;
|
||||
}>>;
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import type { ComponentType, CSSProperties, MouseEvent, PropsWithChildren, ReactNode, UIEvent } from "react";
|
||||
|
||||
type RC<C> = ComponentType<PropsWithChildren<C & Record<string, any>>>;
|
||||
export type RC<C> = ComponentType<PropsWithChildren<C & Record<string, any>>>;
|
||||
|
||||
export interface Menu {
|
||||
Menu: RC<{
|
|
@ -6,22 +6,22 @@
|
|||
"noUncheckedSideEffectImports": true,
|
||||
"strict": true,
|
||||
|
||||
"baseUrl": "./src/",
|
||||
// 'baseUrl' allows module specifiers that are invalid in emitted declarations: https://github.com/microsoft/TypeScript/issues/34749
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"paths": {
|
||||
"@api": ["./api"],
|
||||
"@api/*": ["./api/*"],
|
||||
"@components": ["./components"],
|
||||
"@components/*": ["./components/*"],
|
||||
"@main": ["./main"],
|
||||
"@main/*": ["./main/*"],
|
||||
"@shared/*": ["./shared/*"],
|
||||
"@utils": ["./utils"],
|
||||
"@utils/*": ["./utils/*"],
|
||||
"@webpack": ["./webpack/webpack"],
|
||||
"@webpack/types": ["./webpack/common/types"],
|
||||
"@webpack/common": ["./webpack/common"]
|
||||
"@api": ["./src/api"],
|
||||
"@api/*": ["./src/api/*"],
|
||||
"@components": ["./src/components"],
|
||||
"@components/*": ["./src/components/*"],
|
||||
"@main": ["./src/main"],
|
||||
"@main/*": ["./src/main/*"],
|
||||
"@shared/*": ["./src/shared/*"],
|
||||
"@utils": ["./src/utils"],
|
||||
"@utils/*": ["./src/utils/*"],
|
||||
"@webpack": ["./src/webpack/webpack"],
|
||||
"@webpack/types": ["./src/webpack/common/types"],
|
||||
"@webpack/common": ["./src/webpack/common"]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
|
||||
|
|
Loading…
Reference in a new issue