diff options
author | fawn <fawn@envs.net> | 2023-03-19 08:13:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 05:13:17 -0300 |
commit | 17c3496542adc9ddfe46e3bc73c0fe7776c30f78 (patch) | |
tree | 888c20ae5837a2d9ec17140f8a4af6737a14e0fc /src/utils | |
parent | 0fb79b763d797d70d2eb6d847b0bf711c9927337 (diff) | |
download | Vencord-17c3496542adc9ddfe46e3bc73c0fe7776c30f78.tar.gz Vencord-17c3496542adc9ddfe46e3bc73c0fe7776c30f78.tar.bz2 Vencord-17c3496542adc9ddfe46e3bc73c0fe7776c30f78.zip |
feat(typingIndicator): Option to not show indicator for blocked users (#513)
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/patches.ts | 4 | ||||
-rw-r--r-- | src/utils/types.ts | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/utils/patches.ts b/src/utils/patches.ts index 0f83d40..c30f7b1 100644 --- a/src/utils/patches.ts +++ b/src/utils/patches.ts @@ -16,9 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { PatchReplacement } from "./types"; - -export type ReplaceFn = (match: string, ...groups: string[]) => string; +import { PatchReplacement, ReplaceFn } from "./types"; export function canonicalizeMatch(match: RegExp | string) { if (typeof match === "string") return match; diff --git a/src/utils/types.ts b/src/utils/types.ts index 76a3d74..54c9674 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -19,13 +19,13 @@ import { Command } from "@api/Commands"; import { Promisable } from "type-fest"; -import type { ReplaceFn } from "./patches"; - // exists to export default definePlugin({...}) export default function definePlugin<P extends PluginDef>(p: P & Record<string, any>) { return p; } +export type ReplaceFn = (match: string, ...groups: string[]) => string; + export interface PatchReplacement { match: string | RegExp; replace: string | ReplaceFn; |