@esposter/shared 2.38.1 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +425 -404
- package/dist/index.js +39 -17
- package/package.json +13 -15
package/dist/index.d.ts
CHANGED
|
@@ -3,18 +3,18 @@ import { Result, ResultAsync } from "neverthrow";
|
|
|
3
3
|
import { HTMLElement } from "node-html-parser";
|
|
4
4
|
import baseSanitizeHtml from "sanitize-html";
|
|
5
5
|
//#region src/test/constants.d.ts
|
|
6
|
-
declare const AllSpecialValues: {
|
|
6
|
+
export declare const AllSpecialValues: {
|
|
7
7
|
isPlainObject: boolean;
|
|
8
8
|
value: unknown;
|
|
9
9
|
}[];
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/models/error/ForbiddenError.d.ts
|
|
12
|
-
declare class ForbiddenError extends Error {
|
|
12
|
+
export declare class ForbiddenError extends Error {
|
|
13
13
|
constructor(message: string);
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/models/shared/Operation.d.ts
|
|
17
|
-
declare enum Operation {
|
|
17
|
+
export declare enum Operation {
|
|
18
18
|
Create = "Create",
|
|
19
19
|
Delete = "Delete",
|
|
20
20
|
Push = "Push",
|
|
@@ -24,40 +24,40 @@ declare enum Operation {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/models/error/InvalidOperationError.d.ts
|
|
27
|
-
declare class InvalidOperationError extends Error {
|
|
27
|
+
export declare class InvalidOperationError extends Error {
|
|
28
28
|
constructor(operation: Operation, name: string, message: string);
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/models/error/NotFoundError.d.ts
|
|
32
|
-
declare class NotFoundError<T extends string = string> extends Error {
|
|
32
|
+
export declare class NotFoundError<T extends string = string> extends Error {
|
|
33
33
|
constructor(name: T, id: string);
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/models/error/NotInitializedError.d.ts
|
|
37
|
-
declare class NotInitializedError<T extends string = string> extends Error {
|
|
37
|
+
export declare class NotInitializedError<T extends string = string> extends Error {
|
|
38
38
|
constructor(name: T);
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/models/error/WordFilteredError.d.ts
|
|
42
|
-
declare class WordFilteredError extends Error {
|
|
42
|
+
export declare class WordFilteredError extends Error {
|
|
43
43
|
constructor(message: string);
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/models/message/ClassifiedMentions.d.ts
|
|
47
|
-
interface ClassifiedMentions {
|
|
47
|
+
export interface ClassifiedMentions {
|
|
48
48
|
broadcastIds: string[];
|
|
49
49
|
regularUserIds: string[];
|
|
50
50
|
roleIds: string[];
|
|
51
51
|
}
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/models/message/MentionType.d.ts
|
|
54
|
-
declare enum MentionType {
|
|
54
|
+
export declare enum MentionType {
|
|
55
55
|
Role = "role",
|
|
56
56
|
User = "user"
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/models/router/RoutePath.d.ts
|
|
60
|
-
declare const RoutePath: {
|
|
60
|
+
export declare const RoutePath: {
|
|
61
61
|
readonly About: "/about";
|
|
62
62
|
readonly Achievements: "/achievements";
|
|
63
63
|
readonly Anime: "/anime";
|
|
@@ -95,25 +95,25 @@ declare const RoutePath: {
|
|
|
95
95
|
readonly UserSettings: "/user/settings";
|
|
96
96
|
readonly View: (type: string, id: string) => string;
|
|
97
97
|
};
|
|
98
|
-
type RoutePath = typeof RoutePath;
|
|
98
|
+
export type RoutePath = typeof RoutePath;
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/util/types/GetArrayProps.d.ts
|
|
101
|
-
type GetArrayProps<T extends unknown[], P extends string, D extends unknown[], R extends boolean> = (D extends [unknown, ...infer Rest] ? GetProperties<T[number], R extends true ? `${P}[number]` : `${P}.[number]`, Rest, false> : never) | {
|
|
101
|
+
export type GetArrayProps<T extends unknown[], P extends string, D extends unknown[], R extends boolean> = (D extends [unknown, ...infer Rest] ? GetProperties<T[number], R extends true ? `${P}[number]` : `${P}.[number]`, Rest, false> : never) | {
|
|
102
102
|
path: R extends true ? "length" : `${P}.length`;
|
|
103
103
|
value: T["length"];
|
|
104
104
|
};
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/util/types/KnownKeys.d.ts
|
|
107
|
-
type KnownKeys<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K]; };
|
|
107
|
+
export type KnownKeys<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K]; };
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/util/types/GetObjectProps.d.ts
|
|
110
|
-
type GetObjectProps<T, P extends string, D extends unknown[], R extends boolean> = { [K in keyof KnownKeys<T> & (number | string)]: K extends `${number}` ? never : NonNullable<T[K]> extends Function ? never : (D extends [unknown, ...infer Rest] ? GetProperties<T[K], R extends true ? `${K}` : `${P}.${K}`, Rest, false> : never) | {
|
|
110
|
+
export type GetObjectProps<T, P extends string, D extends unknown[], R extends boolean> = { [K in keyof KnownKeys<T> & (number | string)]: K extends `${number}` ? never : NonNullable<T[K]> extends Function ? never : (D extends [unknown, ...infer Rest] ? GetProperties<T[K], R extends true ? `${K}` : `${P}.${K}`, Rest, false> : never) | {
|
|
111
111
|
path: R extends true ? `${K}` : `${P}.${K}`;
|
|
112
112
|
value: T[K];
|
|
113
113
|
}; }[keyof KnownKeys<T> & (number | string)];
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/util/types/GetPrimitiveProps.d.ts
|
|
116
|
-
type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boolean> = T extends string ? {
|
|
116
|
+
export type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boolean> = T extends string ? {
|
|
117
117
|
path: R extends true ? "length" : `${P}.length`;
|
|
118
118
|
value: number;
|
|
119
119
|
} : T extends symbol ? (D extends [unknown, ...infer Rest] ? GetProperties<string | undefined, R extends true ? "description" : `${P}.description`, Rest, false> : never) | {
|
|
@@ -122,50 +122,50 @@ type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boole
|
|
|
122
122
|
} : never;
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/util/types/GetProperties.d.ts
|
|
125
|
-
type GetProperties<T, P extends string = "", D extends unknown[] = [unknown, unknown, unknown, unknown, unknown], R extends boolean = true> = [T] extends [never] ? never : D extends [] ? never : NonNullable<T> extends (infer O) ? O extends unknown[] ? GetArrayProps<O, P, D, R> : O extends object ? GetObjectProps<O, P, D, R> : GetPrimitiveProps<O, P, D, R> : never;
|
|
125
|
+
export type GetProperties<T, P extends string = "", D extends unknown[] = [unknown, unknown, unknown, unknown, unknown], R extends boolean = true> = [T] extends [never] ? never : D extends [] ? never : NonNullable<T> extends (infer O) ? O extends unknown[] ? GetArrayProps<O, P, D, R> : O extends object ? GetObjectProps<O, P, D, R> : GetPrimitiveProps<O, P, D, R> : never;
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/util/types/GetPaths.d.ts
|
|
128
|
-
type GetPaths<T> = GetProperties<T> extends (infer U) ? (U extends {
|
|
128
|
+
export type GetPaths<T> = GetProperties<T> extends (infer U) ? (U extends {
|
|
129
129
|
path: infer Path;
|
|
130
130
|
} ? Path : never) : never;
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/util/types/PropertyNames.d.ts
|
|
133
|
-
type PropertyNames<T> = { [P in GetPaths<T>]: P; };
|
|
133
|
+
export type PropertyNames<T> = { [P in GetPaths<T>]: P; };
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/models/shared/ItemEntityType.d.ts
|
|
136
|
-
interface ItemEntityType<T extends string> {
|
|
136
|
+
export interface ItemEntityType<T extends string> {
|
|
137
137
|
type: T;
|
|
138
138
|
}
|
|
139
|
-
declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>;
|
|
140
|
-
declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
|
|
139
|
+
export declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>;
|
|
140
|
+
export declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
|
|
141
141
|
type: T;
|
|
142
142
|
}>;
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/models/shared/ItemMetadata.d.ts
|
|
145
|
-
declare class ItemMetadata {
|
|
145
|
+
export declare class ItemMetadata {
|
|
146
146
|
createdAt: Date;
|
|
147
147
|
deletedAt: Date | null;
|
|
148
148
|
updatedAt: Date;
|
|
149
149
|
}
|
|
150
|
-
declare const ItemMetadataPropertyNames: PropertyNames<ItemMetadata>;
|
|
151
|
-
declare const itemMetadataSchema: z.ZodObject<{
|
|
150
|
+
export declare const ItemMetadataPropertyNames: PropertyNames<ItemMetadata>;
|
|
151
|
+
export declare const itemMetadataSchema: z.ZodObject<{
|
|
152
152
|
createdAt: z.ZodDate;
|
|
153
153
|
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
154
154
|
updatedAt: z.ZodDate;
|
|
155
155
|
}>;
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/models/shared/Serializable.d.ts
|
|
158
|
-
declare abstract class Serializable {
|
|
158
|
+
export declare abstract class Serializable {
|
|
159
159
|
toJSON(): this;
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/models/shared/TakeOne.d.ts
|
|
163
|
-
interface TakeOne {
|
|
163
|
+
export interface TakeOne {
|
|
164
164
|
<T extends readonly unknown[]>(values: T, index?: number): T[number];
|
|
165
165
|
<T extends object | Record<PropertyKey, unknown>>(values: T, index: keyof T): T[keyof T];
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
168
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/primitive.d.ts
|
|
169
169
|
/**
|
|
170
170
|
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
171
171
|
|
|
@@ -173,7 +173,7 @@ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/
|
|
|
173
173
|
*/
|
|
174
174
|
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
175
175
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
176
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/basic.d.ts
|
|
177
177
|
/**
|
|
178
178
|
Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
|
|
179
179
|
|
|
@@ -184,7 +184,83 @@ type Class<T, Arguments extends unknown[] = any[]> = {
|
|
|
184
184
|
new (...arguments_: Arguments): T;
|
|
185
185
|
};
|
|
186
186
|
//#endregion
|
|
187
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
187
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/union-to-intersection.d.ts
|
|
188
|
+
/**
|
|
189
|
+
Convert a union type to an intersection type.
|
|
190
|
+
|
|
191
|
+
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
|
|
192
|
+
|
|
193
|
+
@example
|
|
194
|
+
```
|
|
195
|
+
import type {UnionToIntersection} from 'type-fest';
|
|
196
|
+
|
|
197
|
+
type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
|
|
198
|
+
|
|
199
|
+
type Intersection = UnionToIntersection<Union>;
|
|
200
|
+
//=> {the(): void} & {great(arg: string): void} & {escape: boolean}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
@category Type
|
|
204
|
+
*/
|
|
205
|
+
type UnionToIntersection<Union> = (
|
|
206
|
+
// `extends unknown` is always going to be the case and is used to convert the
|
|
207
|
+
// `Union` into a [distributive conditional
|
|
208
|
+
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
|
209
|
+
Union extends unknown ?
|
|
210
|
+
// The union type is used as the only argument to a function since the union
|
|
211
|
+
// of function arguments is an intersection.
|
|
212
|
+
(distributedUnion: Union) => void :
|
|
213
|
+
// This won't happen.
|
|
214
|
+
never
|
|
215
|
+
// Infer the `Intersection` type since TypeScript represents the positional
|
|
216
|
+
// arguments of unions of functions as an intersection of the union.
|
|
217
|
+
) extends ((mergedIntersection: infer Intersection) => void) ?
|
|
218
|
+
// The `& Union` is to ensure result of `UnionToIntersection<A | B>` is always assignable to `A | B`
|
|
219
|
+
Intersection & Union : never;
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/keys-of-union.d.ts
|
|
222
|
+
/**
|
|
223
|
+
Create a union of all keys from a given type, even those exclusive to specific union members.
|
|
224
|
+
|
|
225
|
+
Unlike the native `keyof` keyword, which returns keys present in **all** union members, this type returns keys from **any** member.
|
|
226
|
+
|
|
227
|
+
@link https://stackoverflow.com/a/49402091
|
|
228
|
+
|
|
229
|
+
@example
|
|
230
|
+
```
|
|
231
|
+
import type {KeysOfUnion} from 'type-fest';
|
|
232
|
+
|
|
233
|
+
type A = {
|
|
234
|
+
common: string;
|
|
235
|
+
a: number;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
type B = {
|
|
239
|
+
common: string;
|
|
240
|
+
b: string;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
type C = {
|
|
244
|
+
common: string;
|
|
245
|
+
c: boolean;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
type Union = A | B | C;
|
|
249
|
+
|
|
250
|
+
type CommonKeys = keyof Union;
|
|
251
|
+
//=> 'common'
|
|
252
|
+
|
|
253
|
+
type AllKeys = KeysOfUnion<Union>;
|
|
254
|
+
//=> 'common' | 'a' | 'b' | 'c'
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
@category Object
|
|
258
|
+
*/
|
|
259
|
+
type KeysOfUnion<ObjectType> =
|
|
260
|
+
// Hack to fix https://github.com/sindresorhus/type-fest/issues/1008
|
|
261
|
+
keyof UnionToIntersection<ObjectType extends unknown ? Record<keyof ObjectType, never> : never>;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-any.d.ts
|
|
188
264
|
/**
|
|
189
265
|
Returns a boolean for whether the given type is `any`.
|
|
190
266
|
|
|
@@ -215,7 +291,7 @@ const anyA = get(anyObject, 'a');
|
|
|
215
291
|
*/
|
|
216
292
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
217
293
|
//#endregion
|
|
218
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
294
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
219
295
|
/**
|
|
220
296
|
Returns a boolean for whether the given key is an optional key of type.
|
|
221
297
|
|
|
@@ -258,7 +334,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
258
334
|
*/
|
|
259
335
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
260
336
|
//#endregion
|
|
261
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
337
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
262
338
|
/**
|
|
263
339
|
Extract all optional keys from the given type.
|
|
264
340
|
|
|
@@ -296,7 +372,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
|
|
|
296
372
|
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never; }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
297
373
|
: never; // Should never happen
|
|
298
374
|
//#endregion
|
|
299
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
375
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
300
376
|
/**
|
|
301
377
|
Extract all required keys from the given type.
|
|
302
378
|
|
|
@@ -330,7 +406,7 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
330
406
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
331
407
|
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
332
408
|
//#endregion
|
|
333
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
409
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-never.d.ts
|
|
334
410
|
/**
|
|
335
411
|
Returns a boolean for whether the given type is `never`.
|
|
336
412
|
|
|
@@ -386,7 +462,7 @@ type B = IsTrueFixed<never>;
|
|
|
386
462
|
*/
|
|
387
463
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
388
464
|
//#endregion
|
|
389
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
465
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/if.d.ts
|
|
390
466
|
/**
|
|
391
467
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
392
468
|
|
|
@@ -481,7 +557,7 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
481
557
|
*/
|
|
482
558
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
483
559
|
//#endregion
|
|
484
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
560
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/unknown-array.d.ts
|
|
485
561
|
/**
|
|
486
562
|
Represents an array with `unknown` value.
|
|
487
563
|
|
|
@@ -508,7 +584,7 @@ type C = IsArray<string>;
|
|
|
508
584
|
*/
|
|
509
585
|
type UnknownArray = readonly unknown[];
|
|
510
586
|
//#endregion
|
|
511
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
587
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/type.d.ts
|
|
512
588
|
/**
|
|
513
589
|
Returns a boolean for whether A is false.
|
|
514
590
|
|
|
@@ -576,7 +652,7 @@ Indicates the value of `exactOptionalPropertyTypes` compiler option.
|
|
|
576
652
|
*/
|
|
577
653
|
type IsExactOptionalPropertyTypesEnabled = [(string | undefined)?] extends [string?] ? false : true;
|
|
578
654
|
//#endregion
|
|
579
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
655
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/array.d.ts
|
|
580
656
|
/**
|
|
581
657
|
Transforms a tuple type by replacing it's rest element with a single element that has the same type as the rest element, while keeping all the non-rest elements intact.
|
|
582
658
|
|
|
@@ -621,7 +697,7 @@ TArray extends readonly [...infer Rest, infer Last] ? _CollapseRestElement<Rest,
|
|
|
621
697
|
: First], BackwardAccumulator> : never // Should never happen, since `[(infer First)?, ...infer Rest]` is a top-type for arrays.
|
|
622
698
|
: never; // Should never happen
|
|
623
699
|
//#endregion
|
|
624
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
700
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/characters.d.ts
|
|
625
701
|
type Whitespace = '\t' // '\t'
|
|
626
702
|
| '\n' // '\n'
|
|
627
703
|
| '\v' // '\v'
|
|
@@ -632,200 +708,7 @@ type Whitespace = '\t' // '\t'
|
|
|
632
708
|
type WordSeparators = '-' | '_' | Whitespace;
|
|
633
709
|
type AsciiPunctuation = '!' | '"' | '#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~';
|
|
634
710
|
//#endregion
|
|
635
|
-
//#region ../../node_modules/.pnpm/
|
|
636
|
-
declare const tag: unique symbol;
|
|
637
|
-
//#endregion
|
|
638
|
-
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/tagged.d.ts
|
|
639
|
-
// eslint-disable-next-line type-fest/require-exported-types
|
|
640
|
-
type TagContainer<Token> = {
|
|
641
|
-
readonly [tag]: Token;
|
|
642
|
-
};
|
|
643
|
-
type Tag<Token extends PropertyKey, TagMetadata> = TagContainer<{ [K in Token]: TagMetadata; }>;
|
|
644
|
-
/**
|
|
645
|
-
Create a [tagged type](https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d) that can support [multiple tags](https://github.com/sindresorhus/type-fest/issues/665) and [per-tag metadata](https://medium.com/@ethanresnick/advanced-typescript-tagged-types-improved-with-type-level-metadata-5072fc125fcf).
|
|
646
|
-
|
|
647
|
-
A type returned by `Tagged` can be passed to `Tagged` again, to create a type with multiple tags.
|
|
648
|
-
|
|
649
|
-
A tag's name is usually a string (and must be a string, number, or symbol), but each application of a tag can also contain an arbitrary type as its "metadata". See {@link GetTagMetadata} for examples and explanation.
|
|
650
|
-
|
|
651
|
-
A type `A` returned by `Tagged` is assignable to another type `B` returned by `Tagged` if and only if:
|
|
652
|
-
- the underlying (untagged) type of `A` is assignable to the underlying type of `B`;
|
|
653
|
-
- `A` contains at least all the tags `B` has;
|
|
654
|
-
- and the metadata type for each of `A`'s tags is assignable to the metadata type of `B`'s corresponding tag.
|
|
655
|
-
|
|
656
|
-
There have been several discussions about adding similar features to TypeScript. Unfortunately, nothing has (yet) moved forward:
|
|
657
|
-
- [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202)
|
|
658
|
-
- [Microsoft/TypeScript#4895](https://github.com/microsoft/TypeScript/issues/4895)
|
|
659
|
-
- [Microsoft/TypeScript#33290](https://github.com/microsoft/TypeScript/pull/33290)
|
|
660
|
-
|
|
661
|
-
@example
|
|
662
|
-
```
|
|
663
|
-
import type {Tagged} from 'type-fest';
|
|
664
|
-
|
|
665
|
-
type AccountNumber = Tagged<number, 'AccountNumber'>;
|
|
666
|
-
type AccountBalance = Tagged<number, 'AccountBalance'>;
|
|
667
|
-
|
|
668
|
-
function createAccountNumber(): AccountNumber {
|
|
669
|
-
// As you can see, casting from a `number` (the underlying type being tagged) is allowed.
|
|
670
|
-
return 2 as AccountNumber;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
declare function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance;
|
|
674
|
-
|
|
675
|
-
// This will compile successfully.
|
|
676
|
-
getMoneyForAccount(createAccountNumber());
|
|
677
|
-
|
|
678
|
-
// But this won't, because it has to be explicitly passed as an `AccountNumber` type!
|
|
679
|
-
// Critically, you could not accidentally use an `AccountBalance` as an `AccountNumber`.
|
|
680
|
-
// @ts-expect-error
|
|
681
|
-
getMoneyForAccount(2);
|
|
682
|
-
|
|
683
|
-
// You can also use tagged values like their underlying, untagged type.
|
|
684
|
-
// I.e., this will compile successfully because an `AccountNumber` can be used as a regular `number`.
|
|
685
|
-
// In this sense, the underlying base type is not hidden, which differentiates tagged types from opaque types in other languages.
|
|
686
|
-
const accountNumber = createAccountNumber() + 2;
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
@example
|
|
690
|
-
```
|
|
691
|
-
import type {Tagged} from 'type-fest';
|
|
692
|
-
|
|
693
|
-
// You can apply multiple tags to a type by using `Tagged` repeatedly.
|
|
694
|
-
type Url = Tagged<string, 'URL'>;
|
|
695
|
-
type SpecialCacheKey = Tagged<Url, 'SpecialCacheKey'>;
|
|
696
|
-
|
|
697
|
-
// You can also pass a union of tag names, so this is equivalent to the above, although it doesn't give you the ability to assign distinct metadata to each tag.
|
|
698
|
-
type SpecialCacheKey2 = Tagged<string, 'URL' | 'SpecialCacheKey'>;
|
|
699
|
-
```
|
|
700
|
-
|
|
701
|
-
@category Type
|
|
702
|
-
*/
|
|
703
|
-
type Tagged<Type, TagName extends PropertyKey, TagMetadata = never> = Type & Tag<TagName, TagMetadata>;
|
|
704
|
-
/**
|
|
705
|
-
Get the untagged portion of a tagged type created with `Tagged`.
|
|
706
|
-
|
|
707
|
-
Why is this necessary?
|
|
708
|
-
|
|
709
|
-
1. Use a `Tagged` type as object keys
|
|
710
|
-
2. Prevent TS4058 error: "Return type of exported function has or is using name X from external module Y but cannot be named"
|
|
711
|
-
|
|
712
|
-
@example
|
|
713
|
-
```
|
|
714
|
-
import type {Tagged, UnwrapTagged} from 'type-fest';
|
|
715
|
-
|
|
716
|
-
type AccountType = Tagged<'SAVINGS' | 'CHECKING', 'AccountType'>;
|
|
717
|
-
|
|
718
|
-
const moneyByAccountType: Record<UnwrapTagged<AccountType>, number> = {
|
|
719
|
-
SAVINGS: 99,
|
|
720
|
-
CHECKING: 0.1,
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
// Without UnwrapTagged, the following expression would throw a type error.
|
|
724
|
-
const money = moneyByAccountType.SAVINGS; // TS error: Property 'SAVINGS' does not exist
|
|
725
|
-
|
|
726
|
-
// Attempting to pass a non-Tagged type to UnwrapTagged will raise a type error.
|
|
727
|
-
// @ts-expect-error
|
|
728
|
-
type WontWork = UnwrapTagged<string>;
|
|
729
|
-
```
|
|
730
|
-
|
|
731
|
-
@category Type
|
|
732
|
-
*/
|
|
733
|
-
type UnwrapTagged<TaggedType extends Tag<PropertyKey, any>> = RemoveAllTags<TaggedType>;
|
|
734
|
-
type RemoveAllTags<T> = T extends Tag<PropertyKey, any> ? { [ThisTag in keyof T[typeof tag]]: T extends Tagged<infer Type, ThisTag, T[typeof tag][ThisTag]> ? RemoveAllTags<Type> : never; }[keyof T[typeof tag]] : T;
|
|
735
|
-
//#endregion
|
|
736
|
-
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-literal.d.ts
|
|
737
|
-
/**
|
|
738
|
-
Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
739
|
-
|
|
740
|
-
Useful for:
|
|
741
|
-
- providing strongly-typed string manipulation functions
|
|
742
|
-
- constraining strings to be a string literal
|
|
743
|
-
- type utilities, such as when constructing parsers and ASTs
|
|
744
|
-
|
|
745
|
-
The implementation of this type is inspired by the trick mentioned in this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
|
|
746
|
-
|
|
747
|
-
@example
|
|
748
|
-
```
|
|
749
|
-
import type {IsStringLiteral} from 'type-fest';
|
|
750
|
-
|
|
751
|
-
type CapitalizedString<T extends string> = IsStringLiteral<T> extends true ? Capitalize<T> : string;
|
|
752
|
-
|
|
753
|
-
// https://github.com/yankeeinlondon/native-dash/blob/master/src/capitalize.ts
|
|
754
|
-
function capitalize<T extends Readonly<string>>(input: T): CapitalizedString<T> {
|
|
755
|
-
return (input.slice(0, 1).toUpperCase() + input.slice(1)) as CapitalizedString<T>;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
const output = capitalize('hello, world!');
|
|
759
|
-
//=> 'Hello, world!'
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
@example
|
|
763
|
-
```
|
|
764
|
-
// String types with infinite set of possible values return `false`.
|
|
765
|
-
|
|
766
|
-
import type {IsStringLiteral} from 'type-fest';
|
|
767
|
-
|
|
768
|
-
type AllUppercaseStrings = IsStringLiteral<Uppercase<string>>;
|
|
769
|
-
//=> false
|
|
770
|
-
|
|
771
|
-
type StringsStartingWithOn = IsStringLiteral<`on${string}`>;
|
|
772
|
-
//=> false
|
|
773
|
-
|
|
774
|
-
// This behaviour is particularly useful in string manipulation utilities, as infinite string types often require separate handling.
|
|
775
|
-
|
|
776
|
-
type Length<S extends string, Counter extends never[] = []> =
|
|
777
|
-
IsStringLiteral<S> extends false
|
|
778
|
-
? number // return `number` for infinite string types
|
|
779
|
-
: S extends `${string}${infer Tail}`
|
|
780
|
-
? Length<Tail, [...Counter, never]>
|
|
781
|
-
: Counter['length'];
|
|
782
|
-
|
|
783
|
-
type L1 = Length<Lowercase<string>>;
|
|
784
|
-
//=> number
|
|
785
|
-
|
|
786
|
-
type L2 = Length<`${number}`>;
|
|
787
|
-
//=> number
|
|
788
|
-
```
|
|
789
|
-
|
|
790
|
-
@category Type Guard
|
|
791
|
-
@category Utilities
|
|
792
|
-
*/
|
|
793
|
-
type IsStringLiteral<S> = IfNotAnyOrNever<S, {
|
|
794
|
-
ifNot: _IsStringLiteral<CollapseLiterals<S extends TagContainer<any> ? UnwrapTagged<S> : S>>;
|
|
795
|
-
ifAny: false;
|
|
796
|
-
ifNever: false;
|
|
797
|
-
}>;
|
|
798
|
-
type _IsStringLiteral<S> =
|
|
799
|
-
// If `T` is an infinite string type (e.g., `on${string}`), `Record<T, never>` produces an index signature,
|
|
800
|
-
// and since `{}` extends index signatures, the result becomes `false`.
|
|
801
|
-
S extends string ? {} extends Record<S, never> ? false : true : false;
|
|
802
|
-
//#endregion
|
|
803
|
-
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/trim.d.ts
|
|
804
|
-
/**
|
|
805
|
-
Remove spaces from the left side.
|
|
806
|
-
*/
|
|
807
|
-
type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
|
|
808
|
-
/**
|
|
809
|
-
Remove spaces from the right side.
|
|
810
|
-
*/
|
|
811
|
-
type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
|
|
812
|
-
/**
|
|
813
|
-
Remove leading and trailing spaces from a string.
|
|
814
|
-
|
|
815
|
-
@example
|
|
816
|
-
```
|
|
817
|
-
import type {Trim} from 'type-fest';
|
|
818
|
-
|
|
819
|
-
type Example = Trim<' foo '>;
|
|
820
|
-
//=> 'foo'
|
|
821
|
-
```
|
|
822
|
-
|
|
823
|
-
@category String
|
|
824
|
-
@category Template literal
|
|
825
|
-
*/
|
|
826
|
-
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/simplify.d.ts
|
|
711
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/simplify.d.ts
|
|
829
712
|
/**
|
|
830
713
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
831
714
|
|
|
@@ -886,7 +769,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
886
769
|
*/
|
|
887
770
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
888
771
|
//#endregion
|
|
889
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
772
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-equal.d.ts
|
|
890
773
|
/**
|
|
891
774
|
Returns a boolean for whether the two given types are equal.
|
|
892
775
|
|
|
@@ -917,7 +800,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
|
|
|
917
800
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
918
801
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
919
802
|
//#endregion
|
|
920
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
803
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
921
804
|
/**
|
|
922
805
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
923
806
|
|
|
@@ -1011,7 +894,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
1011
894
|
*/
|
|
1012
895
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
1013
896
|
//#endregion
|
|
1014
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
897
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
1015
898
|
/**
|
|
1016
899
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
1017
900
|
|
|
@@ -1059,7 +942,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
1059
942
|
*/
|
|
1060
943
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
1061
944
|
//#endregion
|
|
1062
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
945
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/merge.d.ts
|
|
1063
946
|
// Merges two objects without worrying about index signatures.
|
|
1064
947
|
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
1065
948
|
/**
|
|
@@ -1130,92 +1013,32 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
|
|
|
1130
1013
|
: never; // Should never happen
|
|
1131
1014
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
1132
1015
|
//#endregion
|
|
1133
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1016
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/trim.d.ts
|
|
1134
1017
|
/**
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
@example
|
|
1138
|
-
```
|
|
1139
|
-
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1140
|
-
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
|
|
1141
|
-
type SpecifiedOptions = {leavesOnly: true};
|
|
1142
|
-
|
|
1143
|
-
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1144
|
-
//=> {maxRecursionDepth: 10; leavesOnly: true}
|
|
1145
|
-
```
|
|
1146
|
-
|
|
1147
|
-
@example
|
|
1148
|
-
```
|
|
1149
|
-
// Complains if default values are not provided for optional options
|
|
1150
|
-
|
|
1151
|
-
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1152
|
-
type DefaultPathsOptions = {maxRecursionDepth: 10};
|
|
1153
|
-
type SpecifiedOptions = {};
|
|
1154
|
-
|
|
1155
|
-
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1156
|
-
// ~~~~~~~~~~~~~~~~~~~
|
|
1157
|
-
// Property 'leavesOnly' is missing in type 'DefaultPathsOptions' but required in type '{ maxRecursionDepth: number; leavesOnly: boolean; }'.
|
|
1158
|
-
```
|
|
1159
|
-
|
|
1160
|
-
@example
|
|
1161
|
-
```
|
|
1162
|
-
// Complains if an option's default type does not conform to the expected type
|
|
1163
|
-
|
|
1164
|
-
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1165
|
-
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: 'no'};
|
|
1166
|
-
type SpecifiedOptions = {};
|
|
1167
|
-
|
|
1168
|
-
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1169
|
-
// ~~~~~~~~~~~~~~~~~~~
|
|
1170
|
-
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
1171
|
-
```
|
|
1172
|
-
|
|
1173
|
-
@example
|
|
1174
|
-
```
|
|
1175
|
-
// Complains if an option's specified type does not conform to the expected type
|
|
1176
|
-
|
|
1177
|
-
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1178
|
-
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
|
|
1179
|
-
type SpecifiedOptions = {leavesOnly: 'yes'};
|
|
1180
|
-
|
|
1181
|
-
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1182
|
-
// ~~~~~~~~~~~~~~~~
|
|
1183
|
-
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
1184
|
-
```
|
|
1018
|
+
Remove spaces from the left side.
|
|
1185
1019
|
*/
|
|
1186
|
-
type
|
|
1187
|
-
) ? Result : never;
|
|
1188
|
-
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
1020
|
+
type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
|
|
1189
1021
|
/**
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1022
|
+
Remove spaces from the right side.
|
|
1023
|
+
*/
|
|
1024
|
+
type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
|
|
1025
|
+
/**
|
|
1026
|
+
Remove leading and trailing spaces from a string.
|
|
1195
1027
|
|
|
1196
1028
|
@example
|
|
1197
1029
|
```
|
|
1198
|
-
import type {
|
|
1199
|
-
|
|
1200
|
-
type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
|
|
1201
|
-
//=> string
|
|
1202
|
-
|
|
1203
|
-
type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
|
|
1204
|
-
//=> number
|
|
1205
|
-
|
|
1206
|
-
type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
|
|
1207
|
-
//=> `on${string}`
|
|
1208
|
-
|
|
1209
|
-
type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
|
|
1210
|
-
//=> 'click' | 'change' | `on${string}`
|
|
1030
|
+
import type {Trim} from 'type-fest';
|
|
1211
1031
|
|
|
1212
|
-
type
|
|
1213
|
-
//=>
|
|
1032
|
+
type Example = Trim<' foo '>;
|
|
1033
|
+
//=> 'foo'
|
|
1214
1034
|
```
|
|
1035
|
+
|
|
1036
|
+
@category String
|
|
1037
|
+
@category Template literal
|
|
1215
1038
|
*/
|
|
1216
|
-
type
|
|
1039
|
+
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
1217
1040
|
//#endregion
|
|
1218
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1041
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/some-extend.d.ts
|
|
1219
1042
|
/**
|
|
1220
1043
|
@see {@link SomeExtend}
|
|
1221
1044
|
*/
|
|
@@ -1311,7 +1134,7 @@ type _SomeExtend<TArray extends UnknownArray, Type, Options extends Required<Som
|
|
|
1311
1134
|
ifNever: false;
|
|
1312
1135
|
}>;
|
|
1313
1136
|
//#endregion
|
|
1314
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1137
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/or-all.d.ts
|
|
1315
1138
|
/**
|
|
1316
1139
|
Returns a boolean for whether any of the given elements is `true`.
|
|
1317
1140
|
|
|
@@ -1382,7 +1205,7 @@ Note: `OrAll<[]>` evaluates to `false` because there are no `true` elements in a
|
|
|
1382
1205
|
*/
|
|
1383
1206
|
type OrAll<T extends readonly boolean[]> = SomeExtend<T, true>;
|
|
1384
1207
|
//#endregion
|
|
1385
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1208
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/or.d.ts
|
|
1386
1209
|
/**
|
|
1387
1210
|
Returns a boolean for whether either of two given types is `true`.
|
|
1388
1211
|
|
|
@@ -1462,7 +1285,7 @@ type G = Or<never, never>;
|
|
|
1462
1285
|
*/
|
|
1463
1286
|
type Or<A extends boolean, B extends boolean> = OrAll<[A, B]>;
|
|
1464
1287
|
//#endregion
|
|
1465
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1288
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/string.d.ts
|
|
1466
1289
|
/**
|
|
1467
1290
|
Returns a boolean for whether the given string `S` starts with the given string `SearchString`.
|
|
1468
1291
|
|
|
@@ -1492,7 +1315,180 @@ This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/mi
|
|
|
1492
1315
|
*/
|
|
1493
1316
|
type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
|
|
1494
1317
|
//#endregion
|
|
1495
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1318
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/object.d.ts
|
|
1319
|
+
/**
|
|
1320
|
+
Merges user specified options with default options.
|
|
1321
|
+
|
|
1322
|
+
@example
|
|
1323
|
+
```
|
|
1324
|
+
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1325
|
+
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
|
|
1326
|
+
type SpecifiedOptions = {leavesOnly: true};
|
|
1327
|
+
|
|
1328
|
+
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1329
|
+
//=> {maxRecursionDepth: 10; leavesOnly: true}
|
|
1330
|
+
```
|
|
1331
|
+
|
|
1332
|
+
@example
|
|
1333
|
+
```
|
|
1334
|
+
// Complains if default values are not provided for optional options
|
|
1335
|
+
|
|
1336
|
+
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1337
|
+
type DefaultPathsOptions = {maxRecursionDepth: 10};
|
|
1338
|
+
type SpecifiedOptions = {};
|
|
1339
|
+
|
|
1340
|
+
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1341
|
+
// ~~~~~~~~~~~~~~~~~~~
|
|
1342
|
+
// Property 'leavesOnly' is missing in type 'DefaultPathsOptions' but required in type '{ maxRecursionDepth: number; leavesOnly: boolean; }'.
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
@example
|
|
1346
|
+
```
|
|
1347
|
+
// Complains if an option's default type does not conform to the expected type
|
|
1348
|
+
|
|
1349
|
+
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1350
|
+
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: 'no'};
|
|
1351
|
+
type SpecifiedOptions = {};
|
|
1352
|
+
|
|
1353
|
+
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1354
|
+
// ~~~~~~~~~~~~~~~~~~~
|
|
1355
|
+
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
@example
|
|
1359
|
+
```
|
|
1360
|
+
// Complains if an option's specified type does not conform to the expected type
|
|
1361
|
+
|
|
1362
|
+
type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
|
|
1363
|
+
type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
|
|
1364
|
+
type SpecifiedOptions = {leavesOnly: 'yes'};
|
|
1365
|
+
|
|
1366
|
+
type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
|
|
1367
|
+
// ~~~~~~~~~~~~~~~~
|
|
1368
|
+
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
1369
|
+
```
|
|
1370
|
+
*/
|
|
1371
|
+
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends (infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
1372
|
+
) ? Result : never;
|
|
1373
|
+
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
1374
|
+
/**
|
|
1375
|
+
Collapses literal types in a union into their corresponding primitive types, when possible. For example, `CollapseLiterals<'foo' | 'bar' | (string & {})>` returns `string`.
|
|
1376
|
+
|
|
1377
|
+
Note: This doesn't collapse literals within tagged types. For example, `CollapseLiterals<Tagged<'foo' | (string & {}), 'Tag'>>` returns `("foo" & Tag<"Tag", never>) | (string & Tag<"Tag", never>)` and not `string & Tag<"Tag", never>`.
|
|
1378
|
+
|
|
1379
|
+
Use-case: For collapsing unions created using {@link LiteralUnion}.
|
|
1380
|
+
|
|
1381
|
+
@example
|
|
1382
|
+
```
|
|
1383
|
+
import type {LiteralUnion} from 'type-fest';
|
|
1384
|
+
|
|
1385
|
+
type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
|
|
1386
|
+
//=> string
|
|
1387
|
+
|
|
1388
|
+
type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
|
|
1389
|
+
//=> number
|
|
1390
|
+
|
|
1391
|
+
type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
|
|
1392
|
+
//=> `on${string}`
|
|
1393
|
+
|
|
1394
|
+
type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
|
|
1395
|
+
//=> 'click' | 'change' | `on${string}`
|
|
1396
|
+
|
|
1397
|
+
type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined>;
|
|
1398
|
+
//=> string | null | undefined
|
|
1399
|
+
```
|
|
1400
|
+
*/
|
|
1401
|
+
type CollapseLiterals<T> = {} extends T ? T : T extends (infer U) & {} ? U : T;
|
|
1402
|
+
/**
|
|
1403
|
+
Returns the base type of a branded type.
|
|
1404
|
+
|
|
1405
|
+
@example
|
|
1406
|
+
```
|
|
1407
|
+
type Brand = {readonly __brand: unique symbol};
|
|
1408
|
+
|
|
1409
|
+
type A = UnwrapBrand<string & Brand>;
|
|
1410
|
+
//=> string
|
|
1411
|
+
|
|
1412
|
+
type B = UnwrapBrand<number & Brand>;
|
|
1413
|
+
//=> number
|
|
1414
|
+
|
|
1415
|
+
type C = UnwrapBrand<PropertyKey & Brand>;
|
|
1416
|
+
//=> PropertyKey
|
|
1417
|
+
|
|
1418
|
+
type D = UnwrapBrand<(1 | 200n | 'foo' | 'bar') & Brand>;
|
|
1419
|
+
//=> 1 | 200n | 'foo' | 'bar'
|
|
1420
|
+
```
|
|
1421
|
+
*/
|
|
1422
|
+
type UnwrapBrand<T> = IfNotAnyOrNever<T, {
|
|
1423
|
+
ifNot: _UnwrapBrand<T, Primitive>;
|
|
1424
|
+
}>;
|
|
1425
|
+
type _UnwrapBrand<T, Base> = T extends Primitive ? T extends (infer U) & Pick<T, Exclude<keyof T, KeysOfUnion<Base>>> ? U : T : T;
|
|
1426
|
+
//#endregion
|
|
1427
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-string-literal.d.ts
|
|
1428
|
+
/**
|
|
1429
|
+
Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
1430
|
+
|
|
1431
|
+
The implementation of this type is inspired by the trick mentioned in this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
|
|
1432
|
+
|
|
1433
|
+
@example
|
|
1434
|
+
```
|
|
1435
|
+
import type {IsStringLiteral} from 'type-fest';
|
|
1436
|
+
|
|
1437
|
+
type A = IsStringLiteral<'foo'>;
|
|
1438
|
+
//=> true
|
|
1439
|
+
|
|
1440
|
+
type B = IsStringLiteral<string>;
|
|
1441
|
+
//=> false
|
|
1442
|
+
|
|
1443
|
+
// String types with infinite set of possible values return `false`
|
|
1444
|
+
type C = IsStringLiteral<`on${string}`>;
|
|
1445
|
+
//=> false
|
|
1446
|
+
|
|
1447
|
+
type D = IsStringLiteral<Uppercase<string>>;
|
|
1448
|
+
//=> false
|
|
1449
|
+
|
|
1450
|
+
type E = IsStringLiteral<'foo' | 'bar' | 'baz'>;
|
|
1451
|
+
//=> true
|
|
1452
|
+
|
|
1453
|
+
type F = IsStringLiteral<'sm' | 'md' | 'lg' | `${number}px`>;
|
|
1454
|
+
//=> boolean
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
@example
|
|
1458
|
+
```
|
|
1459
|
+
import type {IsStringLiteral} from 'type-fest';
|
|
1460
|
+
|
|
1461
|
+
type StringLength<S extends string, Counter extends never[] = []> =
|
|
1462
|
+
IsStringLiteral<S> extends true
|
|
1463
|
+
? S extends `${string}${infer Tail}`
|
|
1464
|
+
? StringLength<Tail, [...Counter, never]>
|
|
1465
|
+
: Counter['length']
|
|
1466
|
+
: number; // return `number` for non-literal string types
|
|
1467
|
+
|
|
1468
|
+
type L1 = StringLength<'foobar'>;
|
|
1469
|
+
//=> 6
|
|
1470
|
+
|
|
1471
|
+
type L2 = StringLength<Lowercase<string>>;
|
|
1472
|
+
//=> number
|
|
1473
|
+
|
|
1474
|
+
type L3 = StringLength<`${number}`>;
|
|
1475
|
+
//=> number
|
|
1476
|
+
```
|
|
1477
|
+
|
|
1478
|
+
@category Type Guard
|
|
1479
|
+
@category Utilities
|
|
1480
|
+
*/
|
|
1481
|
+
type IsStringLiteral<S> = IfNotAnyOrNever<S, {
|
|
1482
|
+
ifNot: _IsStringLiteral<CollapseLiterals<UnwrapBrand<S>>>;
|
|
1483
|
+
ifAny: false;
|
|
1484
|
+
ifNever: false;
|
|
1485
|
+
}>;
|
|
1486
|
+
type _IsStringLiteral<S> =
|
|
1487
|
+
// If `S` is an infinite string type (e.g., `on${string}`), `Record<S, never>` produces an index signature,
|
|
1488
|
+
// and since `{}` extends index signatures, the result becomes `false`.
|
|
1489
|
+
S extends string ? {} extends Record<S, never> ? false : true : false;
|
|
1490
|
+
//#endregion
|
|
1491
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/all-extend.d.ts
|
|
1496
1492
|
/**
|
|
1497
1493
|
@see {@link AllExtend}
|
|
1498
1494
|
*/
|
|
@@ -1594,7 +1590,7 @@ type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllE
|
|
|
1594
1590
|
ifNever: false;
|
|
1595
1591
|
}>;
|
|
1596
1592
|
//#endregion
|
|
1597
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1593
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/except.d.ts
|
|
1598
1594
|
/**
|
|
1599
1595
|
Filter out keys from an object.
|
|
1600
1596
|
|
|
@@ -1694,7 +1690,7 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
1694
1690
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
1695
1691
|
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
1696
1692
|
//#endregion
|
|
1697
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1693
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/promisable.d.ts
|
|
1698
1694
|
/**
|
|
1699
1695
|
Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
|
1700
1696
|
|
|
@@ -1721,7 +1717,7 @@ await logger(() => Promise.resolve('bar'));
|
|
|
1721
1717
|
*/
|
|
1722
1718
|
type Promisable<T> = T | PromiseLike<T>;
|
|
1723
1719
|
//#endregion
|
|
1724
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1720
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-lowercase.d.ts
|
|
1725
1721
|
/**
|
|
1726
1722
|
Returns a boolean for whether the given string literal is lowercase.
|
|
1727
1723
|
|
|
@@ -1749,7 +1745,7 @@ Returns a boolean for whether an individual part of the string is lowercase.
|
|
|
1749
1745
|
*/
|
|
1750
1746
|
type IsLowercaseHelper<S extends string> = S extends Lowercase<string> ? true : S extends Uppercase<string> | Capitalize<string> | `${string}${Uppercase<string>}${string}` ? false : boolean;
|
|
1751
1747
|
//#endregion
|
|
1752
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1748
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-uppercase.d.ts
|
|
1753
1749
|
/**
|
|
1754
1750
|
Returns a boolean for whether the given string literal is uppercase.
|
|
1755
1751
|
|
|
@@ -1777,7 +1773,7 @@ Returns a boolean for whether an individual part of the string is uppercase.
|
|
|
1777
1773
|
*/
|
|
1778
1774
|
type IsUppercaseHelper<S extends string> = S extends Uppercase<string> ? true : S extends Lowercase<string> | Uncapitalize<string> | `${string}${Lowercase<string>}${string}` ? false : boolean;
|
|
1779
1775
|
//#endregion
|
|
1780
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1776
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/words.d.ts
|
|
1781
1777
|
type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
|
|
1782
1778
|
type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
|
|
1783
1779
|
/**
|
|
@@ -1893,7 +1889,7 @@ WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${CurrentWord
|
|
|
1893
1889
|
// No case change: concat word
|
|
1894
1890
|
WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
|
|
1895
1891
|
//#endregion
|
|
1896
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1892
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/delimiter-case.d.ts
|
|
1897
1893
|
type _DefaultDelimiterCaseOptions = Merge<_DefaultWordsOptions, {
|
|
1898
1894
|
splitOnNumbers: false;
|
|
1899
1895
|
}>;
|
|
@@ -1944,7 +1940,7 @@ const rawCliOptions: OddlyCasedProperties<SomeOptions> = {
|
|
|
1944
1940
|
type DelimiterCase<Value, Delimiter extends string, Options extends WordsOptions = {}> = Value extends string ? Delimiter extends string // For distributing `Delimiter`
|
|
1945
1941
|
? IsStringLiteral<Value> extends false ? Value : Lowercase<DelimiterCaseFromArray<Words<Value, ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>, Delimiter>> : never : Value;
|
|
1946
1942
|
//#endregion
|
|
1947
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1943
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/kebab-case.d.ts
|
|
1948
1944
|
/**
|
|
1949
1945
|
Convert a string literal to kebab-case.
|
|
1950
1946
|
|
|
@@ -1985,195 +1981,220 @@ const rawCliOptions: KebabCasedProperties<CliOptions> = {
|
|
|
1985
1981
|
type KebabCase<Value, Options extends WordsOptions = {}> = DelimiterCase<Value, '-', ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>;
|
|
1986
1982
|
//#endregion
|
|
1987
1983
|
//#region src/util/types/DeepOmit.d.ts
|
|
1988
|
-
type DeepOmit<T, TKey extends PropertyKey> = [T] extends [Date | Function | Primitive] ? T : [Record<string, unknown>] extends [T] ? T : T extends object ? T extends unknown[] ? T extends readonly unknown[] ? { [K in keyof T]: DeepOmit<T[K], TKey>; } : DeepOmit<T[number], TKey>[] : { [P in keyof T as P extends TKey ? never : P]: DeepOmit<T[P], TKey>; } : T;
|
|
1984
|
+
export type DeepOmit<T, TKey extends PropertyKey> = [T] extends [Date | Function | Primitive] ? T : [Record<string, unknown>] extends [T] ? T : T extends object ? T extends unknown[] ? T extends readonly unknown[] ? { [K in keyof T]: DeepOmit<T[K], TKey>; } : DeepOmit<T[number], TKey>[] : { [P in keyof T as P extends TKey ? never : P]: DeepOmit<T[P], TKey>; } : T;
|
|
1989
1985
|
//#endregion
|
|
1990
1986
|
//#region src/util/types/DeepOptionalUndefined.d.ts
|
|
1991
|
-
type DeepOptionalUndefined<T> = T extends Date | Function | Primitive ? T : T extends unknown[] ? { [K in keyof T]: DeepOptionalUndefined<T[K]>; } : T extends object ? { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalUndefined<T[K]>; } & { [K in keyof T as undefined extends T[K] ? never : K]: DeepOptionalUndefined<T[K]>; } extends (infer O) ? { [K in keyof O]: O[K]; } : never : T;
|
|
1987
|
+
export type DeepOptionalUndefined<T> = T extends Date | Function | Primitive ? T : T extends unknown[] ? { [K in keyof T]: DeepOptionalUndefined<T[K]>; } : T extends object ? { [K in keyof T as undefined extends T[K] ? K : never]?: DeepOptionalUndefined<T[K]>; } & { [K in keyof T as undefined extends T[K] ? never : K]: DeepOptionalUndefined<T[K]>; } extends (infer O) ? { [K in keyof O]: O[K]; } : never : T;
|
|
1992
1988
|
//#endregion
|
|
1993
1989
|
//#region src/models/shared/ToData.d.ts
|
|
1994
|
-
type ToData<T> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
|
|
1990
|
+
export type ToData<T> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
|
|
1995
1991
|
//#endregion
|
|
1996
1992
|
//#region src/models/shared/WithMetadata.d.ts
|
|
1997
|
-
interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
|
|
1993
|
+
export interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
|
|
1998
1994
|
new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
|
|
1999
1995
|
prototype: InstanceType<TBase> & ItemMetadata;
|
|
2000
1996
|
}
|
|
2001
1997
|
//#endregion
|
|
1998
|
+
//#region src/models/zod/UniqueArraySchemaKey.d.ts
|
|
1999
|
+
export type UniqueArraySchemaKey<TSchema extends z.ZodType> = TSchema extends z.ZodObject ? keyof TSchema["shape"] & string : keyof z.output<TSchema> & string;
|
|
2000
|
+
//#endregion
|
|
2001
|
+
//#region src/models/zod/CreateUniqueArraySchema.d.ts
|
|
2002
|
+
export type CreateUniqueArraySchema = (<TOutput extends object, TInput, TSchema extends z.ZodType<TOutput, TInput>>(schema: TSchema, key: UniqueArraySchemaKey<TSchema>) => z.ZodArray<TSchema>) & (<TOutput extends Primitive, TInput, TSchema extends z.ZodType<TOutput, TInput>>(schema: TSchema) => z.ZodArray<TSchema>);
|
|
2003
|
+
//#endregion
|
|
2002
2004
|
//#region src/services/app/constants.d.ts
|
|
2003
|
-
declare const MAX_READ_LIMIT = 1e3;
|
|
2004
|
-
declare const SITE_NAME = "Esposter";
|
|
2005
|
-
declare const KIBIBYTE: number;
|
|
2006
|
-
declare const
|
|
2007
|
-
declare const GIBIBYTE: number;
|
|
2005
|
+
export declare const MAX_READ_LIMIT = 1e3;
|
|
2006
|
+
export declare const SITE_NAME = "Esposter";
|
|
2007
|
+
export declare const KIBIBYTE: number;
|
|
2008
|
+
export declare const GIBIBYTE: number;
|
|
2008
2009
|
//#endregion
|
|
2009
2010
|
//#region src/services/error/createExponentialBackoff.d.ts
|
|
2010
|
-
declare const createExponentialBackoff: (baseDelayMs: number, maxDelayMs: number) => (<T>(operation: () => Promise<T>) => Promise<T>);
|
|
2011
|
+
export declare const createExponentialBackoff: (baseDelayMs: number, maxDelayMs: number) => (<T>(operation: () => Promise<T>) => Promise<T>);
|
|
2011
2012
|
//#endregion
|
|
2012
2013
|
//#region src/services/error/getResult.d.ts
|
|
2013
|
-
declare const getResult: <T>(fn: () => T) => Result<T, Error>;
|
|
2014
|
+
export declare const getResult: <T>(fn: () => T) => Result<T, Error>;
|
|
2014
2015
|
//#endregion
|
|
2015
2016
|
//#region src/services/error/getResultAsync.d.ts
|
|
2016
|
-
declare const getResultAsync: <T>(fn: () => Promise<T>) => ResultAsync<T, Error>;
|
|
2017
|
+
export declare const getResultAsync: <T>(fn: () => Promise<T>) => ResultAsync<T, Error>;
|
|
2017
2018
|
//#endregion
|
|
2018
2019
|
//#region src/services/error/toAppError.d.ts
|
|
2019
|
-
declare const toAppError: (error: unknown) => Error;
|
|
2020
|
+
export declare const toAppError: (error: unknown) => Error;
|
|
2020
2021
|
//#endregion
|
|
2021
2022
|
//#region src/services/error/withFinalizer.d.ts
|
|
2022
|
-
declare const withFinalizer: <T>(fn: () => T, finalizer?: () => void) => T;
|
|
2023
|
+
export declare const withFinalizer: <T>(fn: () => T, finalizer?: () => void) => T;
|
|
2023
2024
|
//#endregion
|
|
2024
2025
|
//#region src/services/error/withFinalizerAsync.d.ts
|
|
2025
|
-
declare const withFinalizerAsync: <T>(fn: () => Promisable<T>, finalizer?: () => Promisable<void>) => Promise<T>;
|
|
2026
|
+
export declare const withFinalizerAsync: <T>(fn: () => Promisable<T>, finalizer?: () => Promisable<void>) => Promise<T>;
|
|
2026
2027
|
//#endregion
|
|
2027
2028
|
//#region src/services/message/classifyMentions.d.ts
|
|
2028
|
-
declare const classifyMentions: (message: string) => ClassifiedMentions;
|
|
2029
|
+
export declare const classifyMentions: (message: string) => ClassifiedMentions;
|
|
2029
2030
|
//#endregion
|
|
2030
2031
|
//#region src/services/message/constants.d.ts
|
|
2031
|
-
declare const MENTION_ID_ATTRIBUTE = "data-id";
|
|
2032
|
-
declare const MENTION_ITEM_TYPE_ATTRIBUTE = "data-mention-type";
|
|
2033
|
-
declare const MENTION_LABEL_ATTRIBUTE = "data-label";
|
|
2034
|
-
declare const MENTION_TYPE_ATTRIBUTE = "data-type";
|
|
2035
|
-
declare const MENTION_TYPE = "mention";
|
|
2036
|
-
declare const MENTION_SELECTOR: string;
|
|
2037
|
-
declare const MENTION_HERE_ID = "@here";
|
|
2038
|
-
declare const MENTION_EVERYONE_ID = "@everyone";
|
|
2039
|
-
declare const CUSTOM_EMOJI_ID_ATTRIBUTE = "data-custom-emoji-id";
|
|
2040
|
-
declare const CUSTOM_EMOJI_NAME_ATTRIBUTE = "data-custom-emoji-name";
|
|
2041
|
-
declare const CUSTOM_EMOJI_TYPE = "customEmoji";
|
|
2032
|
+
export declare const MENTION_ID_ATTRIBUTE = "data-id";
|
|
2033
|
+
export declare const MENTION_ITEM_TYPE_ATTRIBUTE = "data-mention-type";
|
|
2034
|
+
export declare const MENTION_LABEL_ATTRIBUTE = "data-label";
|
|
2035
|
+
export declare const MENTION_TYPE_ATTRIBUTE = "data-type";
|
|
2036
|
+
export declare const MENTION_TYPE = "mention";
|
|
2037
|
+
export declare const MENTION_SELECTOR: string;
|
|
2038
|
+
export declare const MENTION_HERE_ID = "@here";
|
|
2039
|
+
export declare const MENTION_EVERYONE_ID = "@everyone";
|
|
2040
|
+
export declare const CUSTOM_EMOJI_ID_ATTRIBUTE = "data-custom-emoji-id";
|
|
2041
|
+
export declare const CUSTOM_EMOJI_NAME_ATTRIBUTE = "data-custom-emoji-name";
|
|
2042
|
+
export declare const CUSTOM_EMOJI_TYPE = "customEmoji";
|
|
2042
2043
|
//#endregion
|
|
2043
2044
|
//#region src/services/message/getMentions.d.ts
|
|
2044
|
-
declare const getMentions: (message: string) => HTMLElement[];
|
|
2045
|
+
export declare const getMentions: (message: string) => HTMLElement[];
|
|
2045
2046
|
//#endregion
|
|
2046
2047
|
//#region src/services/prettier/css.d.ts
|
|
2047
|
-
declare const css: typeof String.raw;
|
|
2048
|
+
export declare const css: typeof String.raw;
|
|
2048
2049
|
//#endregion
|
|
2049
2050
|
//#region src/services/prettier/html.d.ts
|
|
2050
|
-
declare const html: typeof String.raw;
|
|
2051
|
+
export declare const html: typeof String.raw;
|
|
2051
2052
|
//#endregion
|
|
2052
2053
|
//#region src/services/sanitizeHtml/sanitizeHtml.d.ts
|
|
2053
|
-
declare const sanitizeHtml: (...[html, options]: Parameters<typeof baseSanitizeHtml>) => string;
|
|
2054
|
+
export declare const sanitizeHtml: (...[html, options]: Parameters<typeof baseSanitizeHtml>) => string;
|
|
2054
2055
|
//#endregion
|
|
2055
2056
|
//#region src/services/sanitizeHtml/sanitizeTextHtml.d.ts
|
|
2056
|
-
declare const sanitizeTextHtml: (html: string) => string;
|
|
2057
|
+
export declare const sanitizeTextHtml: (html: string) => string;
|
|
2057
2058
|
//#endregion
|
|
2058
2059
|
//#region src/services/shared/applyItemMetadataMixin.d.ts
|
|
2059
|
-
declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
|
|
2060
|
+
export declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
|
|
2061
|
+
//#endregion
|
|
2062
|
+
//#region src/services/zod/createNormalizedStringSchema.d.ts
|
|
2063
|
+
export declare const createNormalizedStringSchema: (maxLength: number, schema?: z.ZodString) => z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
2064
|
+
//#endregion
|
|
2065
|
+
//#region src/services/zod/createUniqueArraySchema.d.ts
|
|
2066
|
+
export declare const createUniqueArraySchema: CreateUniqueArraySchema;
|
|
2060
2067
|
//#endregion
|
|
2061
2068
|
//#region src/util/array/chunk.d.ts
|
|
2062
|
-
declare const chunk: <T>(array: T[], size: number) => T[][];
|
|
2069
|
+
export declare const chunk: <T>(array: T[], size: number) => T[][];
|
|
2063
2070
|
//#endregion
|
|
2064
2071
|
//#region src/util/array/chunkBySerializedSize.d.ts
|
|
2065
|
-
declare const chunkBySerializedSize: <T>(items: T[], maxBytes: number, maxCount: number) => T[][];
|
|
2072
|
+
export declare const chunkBySerializedSize: <T>(items: T[], maxBytes: number, maxCount: number) => T[][];
|
|
2066
2073
|
//#endregion
|
|
2067
2074
|
//#region src/util/array/takeOne.d.ts
|
|
2068
|
-
declare const takeOne: TakeOne;
|
|
2075
|
+
export declare const takeOne: TakeOne;
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region src/util/date/checkIsSameDay.d.ts
|
|
2078
|
+
export declare const checkIsSameDay: (date: Date, otherDate: Date) => boolean;
|
|
2079
|
+
//#endregion
|
|
2080
|
+
//#region src/util/date/checkIsToday.d.ts
|
|
2081
|
+
export declare const checkIsToday: (date: Date) => boolean;
|
|
2082
|
+
//#endregion
|
|
2083
|
+
//#region src/util/date/checkIsYesterday.d.ts
|
|
2084
|
+
export declare const checkIsYesterday: (date: Date) => boolean;
|
|
2069
2085
|
//#endregion
|
|
2070
|
-
//#region src/util/
|
|
2071
|
-
declare const
|
|
2086
|
+
//#region src/util/date/getEndOfDay.d.ts
|
|
2087
|
+
export declare const getEndOfDay: (date: Date) => Date;
|
|
2088
|
+
//#endregion
|
|
2089
|
+
//#region src/util/date/getPlainDate.d.ts
|
|
2090
|
+
export declare const getPlainDate: (date: Date) => Temporal.PlainDate;
|
|
2091
|
+
//#endregion
|
|
2092
|
+
//#region src/util/date/getStartOfDay.d.ts
|
|
2093
|
+
export declare const getStartOfDay: (date: Date) => Date;
|
|
2094
|
+
//#endregion
|
|
2095
|
+
//#region src/util/date/getZonedDateTime.d.ts
|
|
2096
|
+
export declare const getZonedDateTime: (date: Date) => Temporal.ZonedDateTime;
|
|
2097
|
+
//#endregion
|
|
2098
|
+
//#region src/util/environment/checkIsServer.d.ts
|
|
2099
|
+
export declare const checkIsServer: () => boolean;
|
|
2072
2100
|
//#endregion
|
|
2073
2101
|
//#region src/util/function/noop.d.ts
|
|
2074
|
-
declare const noop: () => void;
|
|
2102
|
+
export declare const noop: () => void;
|
|
2075
2103
|
//#endregion
|
|
2076
2104
|
//#region src/util/id/constants.d.ts
|
|
2077
|
-
declare const ID_SEPARATOR = "|";
|
|
2078
|
-
declare const UUID_LENGTH = 36;
|
|
2105
|
+
export declare const ID_SEPARATOR = "|";
|
|
2106
|
+
export declare const UUID_LENGTH = 36;
|
|
2079
2107
|
//#endregion
|
|
2080
2108
|
//#region src/util/map/getOrCreate.d.ts
|
|
2081
|
-
declare const getOrCreate: <TKey, TValue>(map: Map<TKey, TValue>, key: TKey, create: () => TValue) => TValue;
|
|
2109
|
+
export declare const getOrCreate: <TKey, TValue>(map: Map<TKey, TValue>, key: TKey, create: () => TValue) => TValue;
|
|
2082
2110
|
//#endregion
|
|
2083
2111
|
//#region src/util/object/checkIsPlainObject.d.ts
|
|
2084
|
-
declare const checkIsPlainObject: (data: unknown) => data is object;
|
|
2112
|
+
export declare const checkIsPlainObject: (data: unknown) => data is object;
|
|
2085
2113
|
//#endregion
|
|
2086
2114
|
//#region src/util/object/getPropertyNames.d.ts
|
|
2087
|
-
declare const getPropertyNames: <T>() => PropertyNames<T>;
|
|
2115
|
+
export declare const getPropertyNames: <T>() => PropertyNames<T>;
|
|
2088
2116
|
//#endregion
|
|
2089
2117
|
//#region src/util/object/jsonDateParse.d.ts
|
|
2090
|
-
declare const jsonDateParse: <T = any>(text: string) => T;
|
|
2118
|
+
export declare const jsonDateParse: <T = any>(text: string) => T;
|
|
2091
2119
|
//#endregion
|
|
2092
2120
|
//#region src/util/types/MergeObjectsStrict.d.ts
|
|
2093
|
-
type MergeObjectsStrict<T extends object[]> = T extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K]; } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T extends [infer TFirst] ? TFirst : never;
|
|
2121
|
+
export type MergeObjectsStrict<T extends object[]> = T extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K]; } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T extends [infer TFirst] ? TFirst : never;
|
|
2094
2122
|
//#endregion
|
|
2095
2123
|
//#region src/util/object/mergeObjectsStrict.d.ts
|
|
2096
|
-
declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
|
|
2124
|
+
export declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
|
|
2097
2125
|
//#endregion
|
|
2098
2126
|
//#region src/util/promise/settleAll.d.ts
|
|
2099
|
-
declare const settleAll: <T>(tasks: (() => Promise<T>)[], concurrencyLimit?: number) => Promise<T[]>;
|
|
2127
|
+
export declare const settleAll: <T>(tasks: (() => Promise<T>)[], concurrencyLimit?: number) => Promise<T[]>;
|
|
2100
2128
|
//#endregion
|
|
2101
2129
|
//#region src/util/reactivity/getRawData.d.ts
|
|
2102
|
-
declare const getRawData: <T>(data: T) => T;
|
|
2130
|
+
export declare const getRawData: <T>(data: T) => T;
|
|
2103
2131
|
//#endregion
|
|
2104
2132
|
//#region src/util/reactivity/toRawDeep.d.ts
|
|
2105
|
-
declare const toRawDeep: <T extends object>(data: T) => T;
|
|
2133
|
+
export declare const toRawDeep: <T extends object>(data: T) => T;
|
|
2106
2134
|
//#endregion
|
|
2107
2135
|
//#region src/util/text/capitalize.d.ts
|
|
2108
|
-
declare const capitalize: (string: string) => string;
|
|
2136
|
+
export declare const capitalize: (string: string) => string;
|
|
2109
2137
|
//#endregion
|
|
2110
2138
|
//#region src/util/text/encodeUrlSubDelimiters.d.ts
|
|
2111
|
-
declare const encodeUrlSubDelimiters: (value: string) => string;
|
|
2139
|
+
export declare const encodeUrlSubDelimiters: (value: string) => string;
|
|
2112
2140
|
//#endregion
|
|
2113
2141
|
//#region src/util/text/getDecodedUriComponent.d.ts
|
|
2114
|
-
declare const getDecodedUriComponent: (value: string, fallback: string) => string;
|
|
2142
|
+
export declare const getDecodedUriComponent: (value: string, fallback: string) => string;
|
|
2115
2143
|
//#endregion
|
|
2116
2144
|
//#region src/util/text/normalizeString.d.ts
|
|
2117
|
-
declare const normalizeString: (value: null | string | undefined) => string;
|
|
2118
|
-
declare const createNormalizedStringSchema: (maxLength: number, schema?: z.ZodString) => z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
2145
|
+
export declare const normalizeString: (value: null | string | undefined) => string;
|
|
2119
2146
|
//#endregion
|
|
2120
2147
|
//#region src/util/text/streamToText.d.ts
|
|
2121
|
-
declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
|
|
2148
|
+
export declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
|
|
2122
2149
|
//#endregion
|
|
2123
2150
|
//#region src/util/text/toKebabCase.d.ts
|
|
2124
|
-
declare const toKebabCase: <T extends string>(string: T) => KebabCase<T>;
|
|
2151
|
+
export declare const toKebabCase: <T extends string>(string: T) => KebabCase<T>;
|
|
2125
2152
|
//#endregion
|
|
2126
2153
|
//#region src/util/text/truncate.d.ts
|
|
2127
|
-
declare const truncate: (string: string, length: number) => string;
|
|
2154
|
+
export declare const truncate: (string: string, length: number) => string;
|
|
2128
2155
|
//#endregion
|
|
2129
2156
|
//#region src/util/text/uncapitalize.d.ts
|
|
2130
|
-
declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
|
|
2157
|
+
export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
|
|
2131
2158
|
//#endregion
|
|
2132
2159
|
//#region src/util/time/hrtime.d.ts
|
|
2133
|
-
declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
|
|
2160
|
+
export declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
|
|
2134
2161
|
//#endregion
|
|
2135
2162
|
//#region src/util/time/now.d.ts
|
|
2136
|
-
declare const now: () => string;
|
|
2163
|
+
export declare const now: () => string;
|
|
2137
2164
|
//#endregion
|
|
2138
2165
|
//#region src/util/time/sleep.d.ts
|
|
2139
|
-
declare const sleep: (durationMs: number) => Promise<void>;
|
|
2166
|
+
export declare const sleep: (durationMs: number) => Promise<void>;
|
|
2140
2167
|
//#endregion
|
|
2141
2168
|
//#region src/util/types/BuildTuple.d.ts
|
|
2142
|
-
type BuildTuple<N extends number, T = unknown, R extends unknown[] = []> = R["length"] extends N ? R : BuildTuple<N, T, [...R, T]>;
|
|
2169
|
+
export type BuildTuple<N extends number, T = unknown, R extends unknown[] = []> = R["length"] extends N ? R : BuildTuple<N, T, [...R, T]>;
|
|
2143
2170
|
//#endregion
|
|
2144
2171
|
//#region src/util/types/FunctionProperties.d.ts
|
|
2145
|
-
type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never; };
|
|
2172
|
+
export type FunctionProperties<T> = { [K in keyof T]: T[K] extends Function ? K : never; };
|
|
2146
2173
|
//#endregion
|
|
2147
2174
|
//#region src/util/types/ExcludeFunctionProperties.d.ts
|
|
2148
|
-
type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
|
|
2175
|
+
export type ExcludeFunctionProperties<T> = Except<T, FunctionProperties<T>[keyof T]>;
|
|
2149
2176
|
//#endregion
|
|
2150
2177
|
//#region src/util/types/MapValue.d.ts
|
|
2151
|
-
type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
|
|
2178
|
+
export type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
|
|
2152
2179
|
//#endregion
|
|
2153
2180
|
//#region src/util/types/TupleSplit.d.ts
|
|
2154
|
-
type TupleSplit<T extends unknown[], N extends number> = T extends [...BuildTuple<N>, ...infer R] ? [T extends [...infer H, ...R] ? H : BuildTuple<N, T[number]>, R] : [T, []];
|
|
2181
|
+
export type TupleSplit<T extends unknown[], N extends number> = T extends [...BuildTuple<N>, ...infer R] ? [T extends [...infer H, ...R] ? H : BuildTuple<N, T[number]>, R] : [T, []];
|
|
2155
2182
|
//#endregion
|
|
2156
2183
|
//#region src/util/types/SkipFirst.d.ts
|
|
2157
|
-
type SkipFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
|
|
2184
|
+
export type SkipFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[1];
|
|
2158
2185
|
//#endregion
|
|
2159
2186
|
//#region src/util/types/TakeFirst.d.ts
|
|
2160
|
-
type TakeFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
|
|
2187
|
+
export type TakeFirst<T extends unknown[], N extends number> = TupleSplit<T, N>[0];
|
|
2161
2188
|
//#endregion
|
|
2162
2189
|
//#region src/util/types/TupleSlice.d.ts
|
|
2163
|
-
type TupleSlice<T extends unknown[], S extends number, E extends number = T["length"]> = E extends T["length"] ? SkipFirst<T, S> : SkipFirst<TakeFirst<T, E>, S>;
|
|
2190
|
+
export type TupleSlice<T extends unknown[], S extends number, E extends number = T["length"]> = E extends T["length"] ? SkipFirst<T, S> : SkipFirst<TakeFirst<T, E>, S>;
|
|
2164
2191
|
//#endregion
|
|
2165
2192
|
//#region src/util/validation/exhaustiveGuard.d.ts
|
|
2166
|
-
declare const exhaustiveGuard: (value: never) => never;
|
|
2193
|
+
export declare const exhaustiveGuard: (value: never) => never;
|
|
2167
2194
|
//#endregion
|
|
2168
|
-
//#region src/util/
|
|
2169
|
-
|
|
2170
|
-
type UniqueArraySchemaKey<TSchema extends z.ZodType> = TSchema extends z.ZodObject ? keyof TSchema["shape"] & string : keyof z.output<TSchema> & string;
|
|
2171
|
-
declare const createUniqueArraySchema: CreateUniqueArraySchema;
|
|
2195
|
+
//#region src/util/id/uuid/checkIsUuidV4.d.ts
|
|
2196
|
+
export declare const checkIsUuidV4: (uuid: string) => boolean;
|
|
2172
2197
|
//#endregion
|
|
2173
2198
|
//#region src/util/id/uuid/constants.d.ts
|
|
2174
|
-
declare const UUIDV4_REGEX: RegExp;
|
|
2175
|
-
//#endregion
|
|
2176
|
-
//#region src/util/id/uuid/uuidValidateV4.d.ts
|
|
2177
|
-
declare const uuidValidateV4: (uuid: string) => boolean;
|
|
2178
|
-
//#endregion
|
|
2179
|
-
export { AllSpecialValues, BuildTuple, CUSTOM_EMOJI_ID_ATTRIBUTE, CUSTOM_EMOJI_NAME_ATTRIBUTE, CUSTOM_EMOJI_TYPE, ClassifiedMentions, CreateUniqueArraySchema, DeepOmit, DeepOptionalUndefined, ExcludeFunctionProperties, ForbiddenError, FunctionProperties, GIBIBYTE, GetArrayProps, GetObjectProps, GetPaths, GetPrimitiveProps, GetProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KIBIBYTE, KnownKeys, MAX_READ_LIMIT, MEGABYTE, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_SELECTOR, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MentionType, MergeObjectsStrict, NotFoundError, NotInitializedError, Operation, PropertyNames, RoutePath, SITE_NAME, Serializable, SkipFirst, TakeFirst, TakeOne, ToData, TupleSlice, TupleSplit, UUIDV4_REGEX, UUID_LENGTH, UniqueArraySchemaKey, WithMetadata, WordFilteredError, applyItemMetadataMixin, capitalize, checkIsPlainObject, chunk, chunkBySerializedSize, classifyMentions, createExponentialBackoff, createItemEntityTypeSchema, createNormalizedStringSchema, createUniqueArraySchema, css, encodeUrlSubDelimiters, exhaustiveGuard, getDecodedUriComponent, getIsServer, getMentions, getOrCreate, getPropertyNames, getRawData, getResult, getResultAsync, hrtime, html, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, noop, normalizeString, now, sanitizeHtml, sanitizeTextHtml, settleAll, sleep, streamToText, takeOne, toAppError, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4, withFinalizer, withFinalizerAsync };
|
|
2199
|
+
export declare const UUIDV4_REGEX: RegExp;
|
|
2200
|
+
//#endregion
|