Add ts-pattern as @webpack/common

This commit is contained in:
Nuckyz 2024-08-30 06:12:28 -03:00
parent 07e629d8d4
commit eb0d91fd8e
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
3 changed files with 14 additions and 0 deletions

View file

@ -49,6 +49,11 @@ export const moment: typeof import("moment") = findByPropsLazy("parseTwoDigitYea
export const hljs: typeof import("highlight.js") = findByPropsLazy("highlight", "registerLanguage");
export const { match, P }: Pick<typeof import("ts-pattern"), "match" | "P"> = mapMangledModuleLazy("@ts-pattern/matcher", {
match: filters.byCode("return new"),
P: filters.byProps("when")
});
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
export const i18n: t.i18n = findLazy(m => m.Messages?.["en-US"]);