diff options
author | 2023-08-21 19:57:59 +0000 | |
---|---|---|
committer | 2023-08-21 19:57:59 +0000 | |
commit | 76b2761d62f459442989c6a55518408b68f0ad34 (patch) | |
tree | 66d299669495672ec9dcb97f21d4fdf23ceb5a8c /src | |
parent | 6ff9a01cc841b9d15c9ccaea4790746b9de2cb4b (diff) | |
download | it-tools-76b2761d62f459442989c6a55518408b68f0ad34.tar.gz it-tools-76b2761d62f459442989c6a55518408b68f0ad34.tar.zst it-tools-76b2761d62f459442989c6a55518408b68f0ad34.zip |
chore(deps): switched to fucking typescript v5 (#501)
* chore(deps): update dependency typescript to v5
* chore(deps): switched to fucking typescript v5
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/shims.d.ts | 28 | ||||
-rw-r--r-- | src/tools/benchmark-builder/benchmark-builder.models.ts | 2 | ||||
-rw-r--r-- | src/tools/emoji-picker/emoji.types.ts | 2 | ||||
-rw-r--r-- | src/tools/token-generator/token-generator.service.ts | 14 |
4 files changed, 29 insertions, 17 deletions
diff --git a/src/shims.d.ts b/src/shims.d.ts index f3db1b7..147c01e 100644 --- a/src/shims.d.ts +++ b/src/shims.d.ts @@ -1,21 +1,35 @@ declare module '*.vue' { - import type { ComponentOptions, ComponentOptions } from 'vue'; + import type { ComponentOptions } from 'vue'; const Component: ComponentOptions; export default Component; } declare module '*.md' { + import type { ComponentOptions } from 'vue'; const Component: ComponentOptions; export default Component; } -declare module '~icons/*' { - import { FunctionalComponent, SVGAttributes } from 'vue'; - const component: FunctionalComponent<SVGAttributes>; - export default component; -} - declare module 'iarna-toml-esm' { export const parse: (toml: string) => any; export const stringify: (obj: any) => string; +} + +declare module 'emojilib' { + const lib: Record<string, string[]>; + export default lib; +} + +declare module 'unicode-emoji-json' { + const emoji: Record<string, { + name: string; + slug: string; + group: string; + emoji_version: string; + unicode_version: string; + skin_tone_support: boolean; + skin_tone_support_unicode_version: string; + }>; + + export default emoji; }
\ No newline at end of file diff --git a/src/tools/benchmark-builder/benchmark-builder.models.ts b/src/tools/benchmark-builder/benchmark-builder.models.ts index 10ae8a7..0bf3456 100644 --- a/src/tools/benchmark-builder/benchmark-builder.models.ts +++ b/src/tools/benchmark-builder/benchmark-builder.models.ts @@ -18,7 +18,7 @@ function computeVariance({ data }: { data: number[] }) { return computeAverage({ data: squaredDiffs }); } -function arrayToMarkdownTable({ data, headerMap = {} }: { data: unknown[]; headerMap?: Record<string, string> }) { +function arrayToMarkdownTable({ data, headerMap = {} }: { data: Record<string, unknown>[]; headerMap?: Record<string, string> }) { if (!Array.isArray(data) || data.length === 0) { return ''; } diff --git a/src/tools/emoji-picker/emoji.types.ts b/src/tools/emoji-picker/emoji.types.ts index 4fc85ea..7b7bf92 100644 --- a/src/tools/emoji-picker/emoji.types.ts +++ b/src/tools/emoji-picker/emoji.types.ts @@ -5,4 +5,4 @@ export type EmojiInfo = { emoji: string codePoints: string | undefined unicode: string -} & typeof emojiUnicodeData['\uD83E\uDD10']; +} & typeof emojiUnicodeData[string]; diff --git a/src/tools/token-generator/token-generator.service.ts b/src/tools/token-generator/token-generator.service.ts index 1885d24..3733a88 100644 --- a/src/tools/token-generator/token-generator.service.ts +++ b/src/tools/token-generator/token-generator.service.ts @@ -15,14 +15,12 @@ export function createToken({ length?: number alphabet?: string }) { - const allAlphabet - = alphabet - ?? [ - ...(withUppercase ? 'ABCDEFGHIJKLMOPQRSTUVWXYZ' : ''), - ...(withLowercase ? 'abcdefghijklmopqrstuvwxyz' : ''), - ...(withNumbers ? '0123456789' : ''), - ...(withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : ''), - ].join(''); + const allAlphabet = alphabet ?? [ + withUppercase ? 'ABCDEFGHIJKLMOPQRSTUVWXYZ' : '', + withLowercase ? 'abcdefghijklmopqrstuvwxyz' : '', + withNumbers ? '0123456789' : '', + withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : '', + ].join(''); ; return shuffleString(allAlphabet.repeat(length)).substring(0, length); } |