mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-08-06 14:05:18 +02:00
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>
This commit is contained in:
parent
6ff9a01cc8
commit
76b2761d62
10 changed files with 1121 additions and 886 deletions
28
src/shims.d.ts
vendored
28
src/shims.d.ts
vendored
|
@ -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;
|
||||
}
|
|
@ -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 '';
|
||||
}
|
||||
|
|
|
@ -5,4 +5,4 @@ export type EmojiInfo = {
|
|||
emoji: string
|
||||
codePoints: string | undefined
|
||||
unicode: string
|
||||
} & typeof emojiUnicodeData['\uD83E\uDD10'];
|
||||
} & typeof emojiUnicodeData[string];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue