@esposter/shared 4.3.1 → 4.3.3
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 +0 -414
- package/dist/index.js +130 -260
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
import { Result, ResultAsync } from "neverthrow";
|
|
3
3
|
import { HTMLElement } from "node-html-parser";
|
|
4
4
|
import { DefaultTreeAdapterTypes, html as html$1 } from "parse5";
|
|
5
|
-
//#region src/models/error/ForbiddenError.d.ts
|
|
6
5
|
export declare class ForbiddenError extends Error {
|
|
7
6
|
constructor(message: string);
|
|
8
7
|
}
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/models/shared/Operation.d.ts
|
|
11
8
|
export declare enum Operation {
|
|
12
9
|
Create = "Create",
|
|
13
10
|
Delete = "Delete",
|
|
@@ -16,37 +13,23 @@ export declare enum Operation {
|
|
|
16
13
|
Unshift = "Unshift",
|
|
17
14
|
Update = "Update"
|
|
18
15
|
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/models/error/InvalidOperationError.d.ts
|
|
21
16
|
export declare class InvalidOperationError extends Error {
|
|
22
17
|
constructor(operation: Operation, name: string, message: string);
|
|
23
18
|
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/models/error/NotFoundError.d.ts
|
|
26
19
|
export declare class NotFoundError<T extends string = string> extends Error {
|
|
27
20
|
constructor(name: T, id: string);
|
|
28
21
|
}
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/models/error/NotInitializedError.d.ts
|
|
31
22
|
export declare class NotInitializedError<T extends string = string> extends Error {
|
|
32
23
|
constructor(name: T);
|
|
33
24
|
}
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/models/error/WordFilteredError.d.ts
|
|
36
25
|
export declare class WordFilteredError extends Error {
|
|
37
26
|
constructor(message: string);
|
|
38
27
|
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/models/eventEmitter/EventListenerEntry.d.ts
|
|
41
28
|
export interface EventListenerEntry<TEventMap> {
|
|
42
29
|
isOnce: boolean;
|
|
43
30
|
listener: TEventMap[keyof TEventMap];
|
|
44
31
|
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/models/eventEmitter/EventListenerMap.d.ts
|
|
47
32
|
export type EventListenerMap<TEventMap> = { [TEvent in keyof TEventMap]: (...args: never[]) => void; };
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/models/eventEmitter/TypedEventEmitter.d.ts
|
|
50
33
|
export declare class TypedEventEmitter<TEventMap extends EventListenerMap<TEventMap>> {
|
|
51
34
|
#private;
|
|
52
35
|
emit<TEvent extends keyof TEventMap>(event: TEvent, ...args: Parameters<TEventMap[TEvent]>): boolean;
|
|
@@ -55,75 +38,47 @@ export declare class TypedEventEmitter<TEventMap extends EventListenerMap<TEvent
|
|
|
55
38
|
once<TEvent extends keyof TEventMap>(event: TEvent, listener: TEventMap[TEvent]): void;
|
|
56
39
|
removeAllListeners(event?: keyof TEventMap): void;
|
|
57
40
|
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/models/history/History.d.ts
|
|
60
41
|
export interface History<T> {
|
|
61
42
|
future: T[];
|
|
62
43
|
limit: number;
|
|
63
44
|
past: T[];
|
|
64
45
|
}
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/models/history/HistoryStep.d.ts
|
|
67
46
|
export interface HistoryStep<T> {
|
|
68
47
|
entry?: T;
|
|
69
48
|
history: History<T>;
|
|
70
49
|
}
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/models/indexedDb/DatabaseStoreSchema.d.ts
|
|
73
50
|
export interface DatabaseStoreSchema {
|
|
74
51
|
indexes: Record<string, IDBValidKey>;
|
|
75
52
|
key: IDBValidKey;
|
|
76
53
|
value: unknown;
|
|
77
54
|
}
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/models/indexedDb/DatabaseSchema.d.ts
|
|
80
55
|
export type DatabaseSchema = Record<string, DatabaseStoreSchema>;
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region src/models/indexedDb/DatabaseStoreName.d.ts
|
|
83
56
|
export type DatabaseStoreName<TSchema extends DatabaseSchema> = [LiteralKeys<TSchema>] extends [never] ? string : LiteralKeys<TSchema>;
|
|
84
57
|
type LiteralKeys<TSchema> = keyof { [TKey in keyof TSchema as string extends TKey ? never : TKey]: TKey; } & string;
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/models/indexedDb/DatabaseIndexName.d.ts
|
|
87
58
|
export type DatabaseIndexName<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>> = string extends keyof TSchema[TStoreName]["indexes"] ? string : keyof TSchema[TStoreName]["indexes"] & string;
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/models/indexedDb/DatabaseIndexCreator.d.ts
|
|
90
59
|
export interface DatabaseIndexCreator<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>> {
|
|
91
60
|
createIndex: (name: DatabaseIndexName<TSchema, TStoreName>, keyPath: string | string[], options?: IDBIndexParameters) => void;
|
|
92
61
|
}
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/models/indexedDb/DatabaseIndexKey.d.ts
|
|
95
62
|
export type DatabaseIndexKey<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TIndexName extends DatabaseIndexName<TSchema, TStoreName>> = TSchema[TStoreName]["indexes"][TIndexName];
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region src/models/indexedDb/DatabaseIndex.d.ts
|
|
98
63
|
export interface DatabaseIndex<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TIndexName extends DatabaseIndexName<TSchema, TStoreName>> {
|
|
99
64
|
getAll: (query?: DatabaseIndexKey<TSchema, TStoreName, TIndexName> | IDBKeyRange | null, count?: number) => Promise<TSchema[TStoreName]["value"][]>;
|
|
100
65
|
getAllKeys: (query?: DatabaseIndexKey<TSchema, TStoreName, TIndexName> | IDBKeyRange | null, count?: number) => Promise<TSchema[TStoreName]["key"][]>;
|
|
101
66
|
}
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/models/indexedDb/DatabaseObjectStoreReader.d.ts
|
|
104
67
|
export interface DatabaseObjectStoreReader<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>> {
|
|
105
68
|
get: (key: TSchema[TStoreName]["key"]) => Promise<TSchema[TStoreName]["value"] | undefined>;
|
|
106
69
|
getAll: (query?: IDBKeyRange | null | TSchema[TStoreName]["key"], count?: number) => Promise<TSchema[TStoreName]["value"][]>;
|
|
107
70
|
getAllKeys: (query?: IDBKeyRange | null | TSchema[TStoreName]["key"], count?: number) => Promise<TSchema[TStoreName]["key"][]>;
|
|
108
71
|
index: <TIndexName extends DatabaseIndexName<TSchema, TStoreName>>(name: TIndexName) => DatabaseIndex<TSchema, TStoreName, TIndexName>;
|
|
109
72
|
}
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region src/models/indexedDb/DatabaseObjectStoreWriter.d.ts
|
|
112
73
|
export interface DatabaseObjectStoreWriter<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>> {
|
|
113
74
|
delete: (query: IDBKeyRange | TSchema[TStoreName]["key"]) => Promise<void>;
|
|
114
75
|
put: (value: TSchema[TStoreName]["value"], key?: TSchema[TStoreName]["key"]) => Promise<TSchema[TStoreName]["key"]>;
|
|
115
76
|
}
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/models/indexedDb/DatabaseObjectStore.d.ts
|
|
118
77
|
export type DatabaseObjectStore<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TMode extends IDBTransactionMode> = DatabaseObjectStoreReader<TSchema, TStoreName> & (TMode extends "readonly" ? unknown : DatabaseObjectStoreWriter<TSchema, TStoreName> & (TMode extends "versionchange" ? DatabaseIndexCreator<TSchema, TStoreName> : unknown));
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region src/models/indexedDb/DatabaseTransaction.d.ts
|
|
121
78
|
export interface DatabaseTransaction<TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TMode extends IDBTransactionMode> {
|
|
122
79
|
done: Promise<void>;
|
|
123
80
|
objectStore: <TName extends TStoreName>(name: TName) => DatabaseObjectStore<TSchema, TName, TMode>;
|
|
124
81
|
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/models/indexedDb/Database.d.ts
|
|
127
82
|
export interface Database<TSchema extends DatabaseSchema = DatabaseSchema> {
|
|
128
83
|
close: () => void;
|
|
129
84
|
delete: <TStoreName extends DatabaseStoreName<TSchema>>(storeName: TStoreName, query: IDBKeyRange | TSchema[TStoreName]["key"]) => Promise<void>;
|
|
@@ -134,21 +89,15 @@ export interface Database<TSchema extends DatabaseSchema = DatabaseSchema> {
|
|
|
134
89
|
put: <TStoreName extends DatabaseStoreName<TSchema>>(storeName: TStoreName, value: TSchema[TStoreName]["value"], key?: TSchema[TStoreName]["key"]) => Promise<TSchema[TStoreName]["key"]>;
|
|
135
90
|
transaction: <TStoreName extends DatabaseStoreName<TSchema>, TMode extends IDBTransactionMode = "readonly">(storeNames: readonly TStoreName[] | TStoreName, mode?: TMode, options?: IDBTransactionOptions) => DatabaseTransaction<TSchema, TStoreName, TMode>;
|
|
136
91
|
}
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/models/indexedDb/UpgradeDatabase.d.ts
|
|
139
92
|
export interface UpgradeDatabase<TSchema extends DatabaseSchema = DatabaseSchema> extends Database<TSchema> {
|
|
140
93
|
createObjectStore: <TStoreName extends DatabaseStoreName<TSchema>>(name: TStoreName, options?: IDBObjectStoreParameters) => DatabaseObjectStore<TSchema, TStoreName, "versionchange">;
|
|
141
94
|
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/models/indexedDb/DatabaseOpenOptions.d.ts
|
|
144
95
|
export interface DatabaseOpenOptions<TSchema extends DatabaseSchema = DatabaseSchema> {
|
|
145
96
|
blocked?: (currentVersion: number, blockedVersion: null | number) => void;
|
|
146
97
|
blocking?: (currentVersion: number, blockedVersion: null | number) => void;
|
|
147
98
|
terminated?: () => void;
|
|
148
99
|
upgrade?: (database: UpgradeDatabase<TSchema>, oldVersion: number, newVersion: null | number, transaction: DatabaseTransaction<TSchema, DatabaseStoreName<TSchema>, "versionchange">) => void;
|
|
149
100
|
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/models/jsonPatch/JsonPatchOperationType.d.ts
|
|
152
101
|
export declare enum JsonPatchOperationType {
|
|
153
102
|
Add = "add",
|
|
154
103
|
Copy = "copy",
|
|
@@ -157,8 +106,6 @@ export declare enum JsonPatchOperationType {
|
|
|
157
106
|
Replace = "replace",
|
|
158
107
|
Test = "test"
|
|
159
108
|
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/models/jsonPatch/JsonPatchOperation.d.ts
|
|
162
109
|
export type JsonPatchOperation = JsonPatchFromOperation | JsonPatchRemoveOperation | JsonPatchValueOperation;
|
|
163
110
|
interface JsonPatchFromOperation {
|
|
164
111
|
from: string;
|
|
@@ -174,44 +121,30 @@ interface JsonPatchValueOperation {
|
|
|
174
121
|
path: string;
|
|
175
122
|
value: unknown;
|
|
176
123
|
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/models/jsonPatch/ApplyPatchesResult.d.ts
|
|
179
124
|
export interface ApplyPatchesResult<T> {
|
|
180
125
|
document: T;
|
|
181
126
|
inverses: JsonPatchOperation[];
|
|
182
127
|
}
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region src/models/message/MentionType.d.ts
|
|
185
128
|
export declare enum MentionType {
|
|
186
129
|
Role = "role",
|
|
187
130
|
User = "user"
|
|
188
131
|
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/models/mime/MimeDatabaseEntry.d.ts
|
|
191
132
|
export interface MimeDatabaseEntry {
|
|
192
133
|
charset?: string;
|
|
193
134
|
compressible?: boolean;
|
|
194
135
|
extensions?: string[];
|
|
195
136
|
source?: string;
|
|
196
137
|
}
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/models/object/ObjectMethod.d.ts
|
|
199
138
|
export declare enum ObjectMethod {
|
|
200
139
|
ToString = "toString",
|
|
201
140
|
ValueOf = "valueOf"
|
|
202
141
|
}
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/models/profanity/ProfanityOptions.d.ts
|
|
205
142
|
export interface ProfanityOptions {
|
|
206
143
|
isWholeWord: boolean;
|
|
207
144
|
}
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region src/models/reactivity/MaybeReactive.d.ts
|
|
210
145
|
export interface MaybeReactive {
|
|
211
146
|
__v_raw?: unknown;
|
|
212
147
|
}
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region src/models/router/RoutePath.d.ts
|
|
215
148
|
export declare const RoutePath: {
|
|
216
149
|
readonly About: "/about";
|
|
217
150
|
readonly Achievements: "/achievements";
|
|
@@ -251,11 +184,7 @@ export declare const RoutePath: {
|
|
|
251
184
|
readonly View: (type: string, id: string) => string;
|
|
252
185
|
};
|
|
253
186
|
export type RoutePath = typeof RoutePath;
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region src/models/sanitizeHtml/AttributesTransformer.d.ts
|
|
256
187
|
export type AttributesTransformer = (attributes: Record<string, string>) => Record<string, string>;
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/models/sanitizeHtml/SanitizeHtmlOptions.d.ts
|
|
259
188
|
export interface SanitizeHtmlOptions {
|
|
260
189
|
allowedAttributes?: Record<string, string[]>;
|
|
261
190
|
allowedClasses?: Record<string, string[]>;
|
|
@@ -263,8 +192,6 @@ export interface SanitizeHtmlOptions {
|
|
|
263
192
|
allowedTags?: string[];
|
|
264
193
|
transformAttributes?: Record<string, AttributesTransformer>;
|
|
265
194
|
}
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region src/models/sanitizeHtml/SanitizePolicy.d.ts
|
|
268
195
|
export interface SanitizePolicy {
|
|
269
196
|
allowedAttributes: Record<string, string[]>;
|
|
270
197
|
allowedClasses: Record<string, string[]>;
|
|
@@ -273,31 +200,23 @@ export interface SanitizePolicy {
|
|
|
273
200
|
allowedTags: string[];
|
|
274
201
|
transformAttributes: Record<string, AttributesTransformer>;
|
|
275
202
|
}
|
|
276
|
-
//#endregion
|
|
277
|
-
//#region src/models/shared/ItemEntityType.d.ts
|
|
278
203
|
export interface ItemEntityType<T extends string> {
|
|
279
204
|
type: T;
|
|
280
205
|
}
|
|
281
206
|
export declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
|
|
282
207
|
type: T;
|
|
283
208
|
}>;
|
|
284
|
-
//#endregion
|
|
285
|
-
//#region src/models/shared/ItemMetadata.d.ts
|
|
286
209
|
export declare class ItemMetadata {
|
|
287
210
|
createdAt: Date;
|
|
288
211
|
deletedAt: Date | null;
|
|
289
212
|
updatedAt: Date;
|
|
290
213
|
}
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/primitive.d.ts
|
|
293
214
|
/**
|
|
294
215
|
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
295
216
|
|
|
296
217
|
@category Type
|
|
297
218
|
*/
|
|
298
219
|
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/basic.d.ts
|
|
301
220
|
/**
|
|
302
221
|
Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
|
|
303
222
|
|
|
@@ -307,8 +226,6 @@ type Class<T, Arguments extends unknown[] = any[]> = {
|
|
|
307
226
|
prototype: Pick<T, keyof T>;
|
|
308
227
|
new (...arguments_: Arguments): T;
|
|
309
228
|
};
|
|
310
|
-
//#endregion
|
|
311
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/union-to-intersection.d.ts
|
|
312
229
|
/**
|
|
313
230
|
Convert a union type to an intersection type.
|
|
314
231
|
|
|
@@ -341,8 +258,6 @@ never
|
|
|
341
258
|
) extends ((mergedIntersection: infer Intersection) => void) ?
|
|
342
259
|
// The `& Union` is to ensure result of `UnionToIntersection<A | B>` is always assignable to `A | B`
|
|
343
260
|
Intersection & Union : never;
|
|
344
|
-
//#endregion
|
|
345
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/keys-of-union.d.ts
|
|
346
261
|
/**
|
|
347
262
|
Create a union of all keys from a given type, even those exclusive to specific union members.
|
|
348
263
|
|
|
@@ -383,8 +298,6 @@ type AllKeys = KeysOfUnion<Union>;
|
|
|
383
298
|
type KeysOfUnion<ObjectType> =
|
|
384
299
|
// Hack to fix https://github.com/sindresorhus/type-fest/issues/1008
|
|
385
300
|
keyof UnionToIntersection<ObjectType extends unknown ? Record<keyof ObjectType, never> : never>;
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-any.d.ts
|
|
388
301
|
/**
|
|
389
302
|
Returns a boolean for whether the given type is `any`.
|
|
390
303
|
|
|
@@ -414,8 +327,6 @@ const anyA = get(anyObject, 'a');
|
|
|
414
327
|
@category Utilities
|
|
415
328
|
*/
|
|
416
329
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
417
|
-
//#endregion
|
|
418
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
419
330
|
/**
|
|
420
331
|
Returns a boolean for whether the given key is an optional key of type.
|
|
421
332
|
|
|
@@ -457,8 +368,6 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
457
368
|
@category Utilities
|
|
458
369
|
*/
|
|
459
370
|
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;
|
|
460
|
-
//#endregion
|
|
461
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
462
371
|
/**
|
|
463
372
|
Extract all optional keys from the given type.
|
|
464
373
|
|
|
@@ -495,8 +404,6 @@ const update2: UpdateOperation<User> = {
|
|
|
495
404
|
type OptionalKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
496
405
|
? (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`
|
|
497
406
|
: never; // Should never happen
|
|
498
|
-
//#endregion
|
|
499
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
500
407
|
/**
|
|
501
408
|
Extract all required keys from the given type.
|
|
502
409
|
|
|
@@ -529,8 +436,6 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
529
436
|
*/
|
|
530
437
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
531
438
|
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
532
|
-
//#endregion
|
|
533
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-never.d.ts
|
|
534
439
|
/**
|
|
535
440
|
Returns a boolean for whether the given type is `never`.
|
|
536
441
|
|
|
@@ -585,8 +490,6 @@ type B = IsTrueFixed<never>;
|
|
|
585
490
|
@category Utilities
|
|
586
491
|
*/
|
|
587
492
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
588
|
-
//#endregion
|
|
589
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/if.d.ts
|
|
590
493
|
/**
|
|
591
494
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
592
495
|
|
|
@@ -680,8 +583,6 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
680
583
|
@category Utilities
|
|
681
584
|
*/
|
|
682
585
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/unknown-array.d.ts
|
|
685
586
|
/**
|
|
686
587
|
Represents an array with `unknown` value.
|
|
687
588
|
|
|
@@ -707,8 +608,6 @@ type C = IsArray<string>;
|
|
|
707
608
|
@category Array
|
|
708
609
|
*/
|
|
709
610
|
type UnknownArray = readonly unknown[];
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/internal/type.d.ts
|
|
712
611
|
/**
|
|
713
612
|
Returns a boolean for whether A is false.
|
|
714
613
|
|
|
@@ -775,8 +674,6 @@ type IfNotAnyOrNever<T, Cases extends {
|
|
|
775
674
|
Indicates the value of `exactOptionalPropertyTypes` compiler option.
|
|
776
675
|
*/
|
|
777
676
|
type IsExactOptionalPropertyTypesEnabled = [(string | undefined)?] extends [string?] ? false : true;
|
|
778
|
-
//#endregion
|
|
779
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/internal/array.d.ts
|
|
780
677
|
/**
|
|
781
678
|
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.
|
|
782
679
|
|
|
@@ -824,8 +721,6 @@ TArray extends readonly [unknown, ...unknown[]] ? First : If<IsExactOptionalProp
|
|
|
824
721
|
TArray extends readonly [...infer Rest, infer Last] ? _CollapseRestElement<Rest, ForwardAccumulator, [Last, ...BackwardAccumulator]> // Accumulate elements that are present after the rest element.
|
|
825
722
|
: TArray extends readonly [] ? [...ForwardAccumulator, ...BackwardAccumulator] : [...ForwardAccumulator, TArray[number], ...BackwardAccumulator] // Add the rest element between the accumulated elements.
|
|
826
723
|
: never; // Should never happen
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/internal/characters.d.ts
|
|
829
724
|
type Whitespace = '\t' // '\t'
|
|
830
725
|
| '\n' // '\n'
|
|
831
726
|
| '\v' // '\v'
|
|
@@ -835,8 +730,6 @@ type Whitespace = '\t' // '\t'
|
|
|
835
730
|
| '
' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | ' ' | '
' | '
' | ' ' | ' ' | ' ' | '';
|
|
836
731
|
type WordSeparators = '-' | '_' | Whitespace;
|
|
837
732
|
type AsciiPunctuation = '!' | '"' | '#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~';
|
|
838
|
-
//#endregion
|
|
839
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/simplify.d.ts
|
|
840
733
|
/**
|
|
841
734
|
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.
|
|
842
735
|
|
|
@@ -896,8 +789,6 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
896
789
|
@category Object
|
|
897
790
|
*/
|
|
898
791
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
899
|
-
//#endregion
|
|
900
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-equal.d.ts
|
|
901
792
|
/**
|
|
902
793
|
Returns a boolean for whether the two given types are equal.
|
|
903
794
|
|
|
@@ -927,8 +818,6 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
927
818
|
type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
|
|
928
819
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
929
820
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
930
|
-
//#endregion
|
|
931
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
932
821
|
/**
|
|
933
822
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
934
823
|
|
|
@@ -1021,8 +910,6 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
1021
910
|
@category Object
|
|
1022
911
|
*/
|
|
1023
912
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
1024
|
-
//#endregion
|
|
1025
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
1026
913
|
/**
|
|
1027
914
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
1028
915
|
|
|
@@ -1069,8 +956,6 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
1069
956
|
@category Object
|
|
1070
957
|
*/
|
|
1071
958
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
1072
|
-
//#endregion
|
|
1073
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/merge.d.ts
|
|
1074
959
|
// Merges two objects without worrying about index signatures.
|
|
1075
960
|
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
1076
961
|
/**
|
|
@@ -1140,8 +1025,6 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
|
|
|
1140
1025
|
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
1141
1026
|
: never; // Should never happen
|
|
1142
1027
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
1143
|
-
//#endregion
|
|
1144
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/trim.d.ts
|
|
1145
1028
|
/**
|
|
1146
1029
|
Remove spaces from the left side.
|
|
1147
1030
|
*/
|
|
@@ -1165,8 +1048,6 @@ type Example = Trim<' foo '>;
|
|
|
1165
1048
|
@category Template literal
|
|
1166
1049
|
*/
|
|
1167
1050
|
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
1168
|
-
//#endregion
|
|
1169
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/some-extend.d.ts
|
|
1170
1051
|
/**
|
|
1171
1052
|
@see {@link SomeExtend}
|
|
1172
1053
|
*/
|
|
@@ -1262,8 +1143,6 @@ type SomeExtend<TArray extends UnknownArray, Type, Options extends SomeExtendOpt
|
|
|
1262
1143
|
type _SomeExtend<TArray extends UnknownArray, Type, Options extends Required<SomeExtendOptions>> = TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true ?
|
|
1263
1144
|
// If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, return `true`.
|
|
1264
1145
|
true : _SomeExtend<Rest, Type, Options> : First extends Type ? true : _SomeExtend<Rest, Type, Options> : false;
|
|
1265
|
-
//#endregion
|
|
1266
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/or-all.d.ts
|
|
1267
1146
|
/**
|
|
1268
1147
|
Returns a boolean for whether any of the given elements is `true`.
|
|
1269
1148
|
|
|
@@ -1333,8 +1212,6 @@ Note: `OrAll<[]>` evaluates to `false` because there are no `true` elements in a
|
|
|
1333
1212
|
@see {@link AndAll}
|
|
1334
1213
|
*/
|
|
1335
1214
|
type OrAll<T extends readonly boolean[]> = SomeExtend<T, true>;
|
|
1336
|
-
//#endregion
|
|
1337
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/or.d.ts
|
|
1338
1215
|
/**
|
|
1339
1216
|
Returns a boolean for whether either of two given types is `true`.
|
|
1340
1217
|
|
|
@@ -1413,8 +1290,6 @@ type G = Or<never, never>;
|
|
|
1413
1290
|
@see {@link Xor}
|
|
1414
1291
|
*/
|
|
1415
1292
|
type Or<A extends boolean, B extends boolean> = OrAll<[A, B]>;
|
|
1416
|
-
//#endregion
|
|
1417
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/internal/string.d.ts
|
|
1418
1293
|
/**
|
|
1419
1294
|
Returns a boolean for whether the given string `S` starts with the given string `SearchString`.
|
|
1420
1295
|
|
|
@@ -1443,8 +1318,6 @@ Returns a boolean for whether the string is numeric.
|
|
|
1443
1318
|
This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
|
|
1444
1319
|
*/
|
|
1445
1320
|
type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
|
|
1446
|
-
//#endregion
|
|
1447
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/internal/object.d.ts
|
|
1448
1321
|
/**
|
|
1449
1322
|
Merges user specified options with default options.
|
|
1450
1323
|
|
|
@@ -1552,8 +1425,6 @@ type UnwrapBrand<T> = IfNotAnyOrNever<T, {
|
|
|
1552
1425
|
ifNot: _UnwrapBrand<T, Primitive>;
|
|
1553
1426
|
}>;
|
|
1554
1427
|
type _UnwrapBrand<T, Base> = T extends Primitive ? T extends (infer U) & Pick<T, Exclude<keyof T, KeysOfUnion<Base>>> ? U : T : T;
|
|
1555
|
-
//#endregion
|
|
1556
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-string-literal.d.ts
|
|
1557
1428
|
/**
|
|
1558
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).
|
|
1559
1430
|
|
|
@@ -1616,8 +1487,6 @@ type _IsStringLiteral<S> =
|
|
|
1616
1487
|
// If `S` is an infinite string type (e.g., `on${string}`), `Record<S, never>` produces an index signature,
|
|
1617
1488
|
// and since `{}` extends index signatures, the result becomes `false`.
|
|
1618
1489
|
S extends string ? {} extends Record<S, never> ? false : true : false;
|
|
1619
|
-
//#endregion
|
|
1620
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/all-extend.d.ts
|
|
1621
1490
|
/**
|
|
1622
1491
|
@see {@link AllExtend}
|
|
1623
1492
|
*/
|
|
@@ -1719,8 +1588,6 @@ type AllExtend<TArray extends UnknownArray, Type, Options extends AllExtendOptio
|
|
|
1719
1588
|
type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllExtendOptions>> = TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true ?
|
|
1720
1589
|
// If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, recurse further.
|
|
1721
1590
|
_AllExtend<Rest, Type, Options> : false : First extends Type ? _AllExtend<Rest, Type, Options> : false : true;
|
|
1722
|
-
//#endregion
|
|
1723
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/promisable.d.ts
|
|
1724
1591
|
/**
|
|
1725
1592
|
Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
|
1726
1593
|
|
|
@@ -1746,8 +1613,6 @@ await logger(() => Promise.resolve('bar'));
|
|
|
1746
1613
|
@category Async
|
|
1747
1614
|
*/
|
|
1748
1615
|
type Promisable<T> = T | PromiseLike<T>;
|
|
1749
|
-
//#endregion
|
|
1750
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-lowercase.d.ts
|
|
1751
1616
|
/**
|
|
1752
1617
|
Returns a boolean for whether the given string literal is lowercase.
|
|
1753
1618
|
|
|
@@ -1774,8 +1639,6 @@ type _IsLowercase<S extends string, Accumulator extends boolean[] = []> = S exte
|
|
|
1774
1639
|
Returns a boolean for whether an individual part of the string is lowercase.
|
|
1775
1640
|
*/
|
|
1776
1641
|
type IsLowercaseHelper<S extends string> = S extends Lowercase<string> ? true : S extends Uppercase<string> | Capitalize<string> | `${string}${Uppercase<string>}${string}` ? false : boolean;
|
|
1777
|
-
//#endregion
|
|
1778
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/is-uppercase.d.ts
|
|
1779
1642
|
/**
|
|
1780
1643
|
Returns a boolean for whether the given string literal is uppercase.
|
|
1781
1644
|
|
|
@@ -1802,8 +1665,6 @@ type _IsUppercase<S extends string, Accumulator extends boolean[] = []> = S exte
|
|
|
1802
1665
|
Returns a boolean for whether an individual part of the string is uppercase.
|
|
1803
1666
|
*/
|
|
1804
1667
|
type IsUppercaseHelper<S extends string> = S extends Uppercase<string> ? true : S extends Lowercase<string> | Uncapitalize<string> | `${string}${Lowercase<string>}${string}` ? false : boolean;
|
|
1805
|
-
//#endregion
|
|
1806
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/words.d.ts
|
|
1807
1668
|
type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
|
|
1808
1669
|
type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
|
|
1809
1670
|
/**
|
|
@@ -1918,8 +1779,6 @@ WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${CurrentWord
|
|
|
1918
1779
|
[true, true] extends [IsUppercase<LastCharacter>, IsLowercase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] :
|
|
1919
1780
|
// No case change: concat word
|
|
1920
1781
|
WordsImplementation<RemainingCharacters, Options, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
|
|
1921
|
-
//#endregion
|
|
1922
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/delimiter-case.d.ts
|
|
1923
1782
|
type _DefaultDelimiterCaseOptions = Merge<_DefaultWordsOptions, {
|
|
1924
1783
|
splitOnNumbers: false;
|
|
1925
1784
|
}>;
|
|
@@ -1969,8 +1828,6 @@ const rawCliOptions: OddlyCasedProperties<SomeOptions> = {
|
|
|
1969
1828
|
*/
|
|
1970
1829
|
type DelimiterCase<Value, Delimiter extends string, Options extends WordsOptions = {}> = Value extends string ? Delimiter extends string // For distributing `Delimiter`
|
|
1971
1830
|
? IsStringLiteral<Value> extends false ? Value : Lowercase<DelimiterCaseFromArray<Words<Value, ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>, Delimiter>> : never : Value;
|
|
1972
|
-
//#endregion
|
|
1973
|
-
//#region ../../node_modules/.pnpm/type-fest@5.10.0/node_modules/type-fest/source/kebab-case.d.ts
|
|
1974
1831
|
/**
|
|
1975
1832
|
Convert a string literal to kebab-case.
|
|
1976
1833
|
|
|
@@ -2009,157 +1866,69 @@ const rawCliOptions: KebabCasedProperties<CliOptions> = {
|
|
|
2009
1866
|
@category Template literal
|
|
2010
1867
|
*/
|
|
2011
1868
|
type KebabCase<Value, Options extends WordsOptions = {}> = DelimiterCase<Value, '-', ApplyDefaultOptions<WordsOptions, _DefaultDelimiterCaseOptions, Options>>;
|
|
2012
|
-
//#endregion
|
|
2013
|
-
//#region src/models/shared/ItemMetadataClass.d.ts
|
|
2014
1869
|
export interface ItemMetadataClass<TBase extends Class<object>> {
|
|
2015
1870
|
new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
|
|
2016
1871
|
prototype: InstanceType<TBase> & ItemMetadata;
|
|
2017
1872
|
}
|
|
2018
|
-
//#endregion
|
|
2019
|
-
//#region src/models/shared/Serializable.d.ts
|
|
2020
1873
|
export declare abstract class Serializable {
|
|
2021
1874
|
toJSON(): this;
|
|
2022
1875
|
}
|
|
2023
|
-
//#endregion
|
|
2024
|
-
//#region src/models/shared/TakeOne.d.ts
|
|
2025
1876
|
export interface TakeOne {
|
|
2026
1877
|
<T extends readonly unknown[]>(values: T, index?: number): T[number];
|
|
2027
1878
|
<T extends object>(values: T, index: keyof T): T[keyof T];
|
|
2028
1879
|
}
|
|
2029
|
-
//#endregion
|
|
2030
|
-
//#region src/util/types/FunctionLike.d.ts
|
|
2031
1880
|
export type FunctionLike = ((...args: never) => unknown) | (abstract new (...args: never) => unknown);
|
|
2032
|
-
//#endregion
|
|
2033
|
-
//#region src/util/types/DeepOmit.d.ts
|
|
2034
1881
|
export type DeepOmit<T, TKey extends PropertyKey> = T extends DeepOmitKeptValue ? T : T extends readonly unknown[] ? { [K in keyof T]: DeepOmit<T[K], TKey>; } : T extends object ? [keyof T] extends [never] ? T : { [P in keyof T as P extends symbol ? never : P extends TKey ? never : P]: DeepOmit<T[P], TKey>; } : T;
|
|
2035
1882
|
type DeepOmitKeptValue = ArrayBufferView | Blob | Date | FunctionLike | Map<unknown, unknown> | Primitive | Promise<unknown> | RegExp | Set<unknown>;
|
|
2036
|
-
//#endregion
|
|
2037
|
-
//#region src/util/types/DeepOptionalUndefined.d.ts
|
|
2038
1883
|
export type DeepOptionalUndefined<T> = T extends Date | FunctionLike | 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;
|
|
2039
|
-
//#endregion
|
|
2040
|
-
//#region src/models/shared/ToData.d.ts
|
|
2041
1884
|
export type ToData<T> = DeepOptionalUndefined<DeepOmit<T, "toJSON">>;
|
|
2042
|
-
//#endregion
|
|
2043
|
-
//#region src/models/text/DedentOptions.d.ts
|
|
2044
1885
|
export interface DedentOptions {
|
|
2045
1886
|
alignValues?: boolean;
|
|
2046
1887
|
escapeSpecialCharacters?: boolean;
|
|
2047
1888
|
trimWhitespace?: boolean;
|
|
2048
1889
|
}
|
|
2049
|
-
//#endregion
|
|
2050
|
-
//#region src/models/text/Dedent.d.ts
|
|
2051
1890
|
export interface Dedent {
|
|
2052
1891
|
(strings: string | TemplateStringsArray, ...values: unknown[]): string;
|
|
2053
1892
|
withOptions: (options: DedentOptions) => Dedent;
|
|
2054
1893
|
}
|
|
2055
|
-
//#endregion
|
|
2056
|
-
//#region src/models/zod/UniqueArraySchemaKey.d.ts
|
|
2057
1894
|
export type UniqueArraySchemaKey<TSchema extends z.ZodType> = TSchema extends z.ZodObject ? keyof TSchema["shape"] & string : keyof z.output<TSchema> & string;
|
|
2058
|
-
//#endregion
|
|
2059
|
-
//#region src/models/zod/CreateUniqueArraySchema.d.ts
|
|
2060
1895
|
export type CreateUniqueArraySchema = (<TOutput extends object, TInput, TSchema extends z.ZodType<TOutput, TInput>>(schema: TSchema, key: readonly UniqueArraySchemaKey<TSchema>[] | UniqueArraySchemaKey<TSchema>) => z.ZodArray<TSchema>) & (<TOutput extends Primitive, TInput, TSchema extends z.ZodType<TOutput, TInput>>(schema: TSchema) => z.ZodArray<TSchema>);
|
|
2061
|
-
//#endregion
|
|
2062
|
-
//#region src/services/app/constants.d.ts
|
|
2063
1896
|
export declare const MAX_READ_LIMIT = 1e3;
|
|
2064
1897
|
export declare const SITE_NAME = "Esposter";
|
|
2065
1898
|
export declare const KIBIBYTE: number;
|
|
2066
1899
|
export declare const GIBIBYTE: number;
|
|
2067
|
-
//#endregion
|
|
2068
|
-
//#region src/services/error/getResult.d.ts
|
|
2069
1900
|
export declare const getResult: <T>(callback: () => T) => Result<T, Error>;
|
|
2070
|
-
//#endregion
|
|
2071
|
-
//#region src/services/error/getResultAsync.d.ts
|
|
2072
1901
|
export declare const getResultAsync: <T>(callback: () => Promise<T>) => ResultAsync<T, Error>;
|
|
2073
|
-
//#endregion
|
|
2074
|
-
//#region src/services/error/reportFinalizerError.d.ts
|
|
2075
1902
|
export declare const reportFinalizerError: <T, E>(callbackResult: Result<T, E>, finalizerError: unknown) => void;
|
|
2076
|
-
//#endregion
|
|
2077
|
-
//#region src/services/error/toAppError.d.ts
|
|
2078
1903
|
export declare const toAppError: (error: unknown) => Error;
|
|
2079
|
-
//#endregion
|
|
2080
|
-
//#region src/services/error/withFinalizer.d.ts
|
|
2081
1904
|
export declare const withFinalizer: <T>(callback: () => T, finalizer?: () => void) => T;
|
|
2082
|
-
//#endregion
|
|
2083
|
-
//#region src/services/error/withFinalizerAsync.d.ts
|
|
2084
1905
|
export declare const withFinalizerAsync: <T>(callback: () => Promisable<T>, finalizer?: () => Promisable<void>) => Promise<T>;
|
|
2085
|
-
//#endregion
|
|
2086
|
-
//#region src/services/history/createHistory.d.ts
|
|
2087
1906
|
export declare const createHistory: <T>(limit: number) => History<T>;
|
|
2088
|
-
//#endregion
|
|
2089
|
-
//#region src/services/history/pushHistory.d.ts
|
|
2090
1907
|
export declare const pushHistory: <T>(history: History<T>, entry: T) => History<T>;
|
|
2091
|
-
//#endregion
|
|
2092
|
-
//#region src/services/history/redoHistory.d.ts
|
|
2093
1908
|
export declare const redoHistory: <T>(history: History<T>) => HistoryStep<T>;
|
|
2094
|
-
//#endregion
|
|
2095
|
-
//#region src/services/history/undoHistory.d.ts
|
|
2096
1909
|
export declare const undoHistory: <T>(history: History<T>) => HistoryStep<T>;
|
|
2097
|
-
//#endregion
|
|
2098
|
-
//#region src/services/indexedDb/getRequestError.d.ts
|
|
2099
1910
|
export declare const getRequestError: (request: IDBRequest) => DOMException;
|
|
2100
|
-
//#endregion
|
|
2101
|
-
//#region src/services/indexedDb/getTransactionDone.d.ts
|
|
2102
1911
|
export declare const getTransactionDone: (transaction: IDBTransaction) => Promise<void>;
|
|
2103
|
-
//#endregion
|
|
2104
|
-
//#region src/services/indexedDb/getTransactionObjectStore.d.ts
|
|
2105
1912
|
export declare const getTransactionObjectStore: <TSchema extends DatabaseSchema, TMode extends IDBTransactionMode>(transaction: IDBTransaction) => <TStoreName extends DatabaseStoreName<TSchema>>(name: TStoreName) => DatabaseObjectStore<TSchema, TStoreName, TMode>;
|
|
2106
|
-
//#endregion
|
|
2107
|
-
//#region src/services/indexedDb/openDatabase.d.ts
|
|
2108
1913
|
export declare const openDatabase: <TSchema extends DatabaseSchema = DatabaseSchema>(name: string, version: number, options?: DatabaseOpenOptions<TSchema>) => Promise<Database<TSchema>>;
|
|
2109
|
-
//#endregion
|
|
2110
|
-
//#region src/services/indexedDb/requestToPromise.d.ts
|
|
2111
1914
|
export declare const requestToPromise: <TResult>(request: IDBRequest) => Promise<TResult>;
|
|
2112
|
-
//#endregion
|
|
2113
|
-
//#region src/services/indexedDb/wrapDatabase.d.ts
|
|
2114
1915
|
export declare const wrapDatabase: <TSchema extends DatabaseSchema = DatabaseSchema>(database: IDBDatabase) => Database<TSchema>;
|
|
2115
|
-
//#endregion
|
|
2116
|
-
//#region src/services/indexedDb/wrapIndex.d.ts
|
|
2117
1916
|
export declare const wrapIndex: <TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TIndexName extends DatabaseIndexName<TSchema, TStoreName>>(index: IDBIndex) => DatabaseIndex<TSchema, TStoreName, TIndexName>;
|
|
2118
|
-
//#endregion
|
|
2119
|
-
//#region src/services/indexedDb/wrapObjectStore.d.ts
|
|
2120
1917
|
export declare const wrapObjectStore: <TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TMode extends IDBTransactionMode>(objectStore: IDBObjectStore) => DatabaseObjectStore<TSchema, TStoreName, TMode>;
|
|
2121
|
-
//#endregion
|
|
2122
|
-
//#region src/services/indexedDb/wrapTransaction.d.ts
|
|
2123
1918
|
export declare const wrapTransaction: <TSchema extends DatabaseSchema, TStoreName extends DatabaseStoreName<TSchema>, TMode extends IDBTransactionMode>(transaction: IDBTransaction) => DatabaseTransaction<TSchema, TStoreName, TMode>;
|
|
2124
|
-
//#endregion
|
|
2125
|
-
//#region src/services/indexedDb/wrapUpgradeDatabase.d.ts
|
|
2126
1919
|
export declare const wrapUpgradeDatabase: <TSchema extends DatabaseSchema = DatabaseSchema>(database: IDBDatabase) => UpgradeDatabase<TSchema>;
|
|
2127
|
-
//#endregion
|
|
2128
|
-
//#region src/services/indexedDb/wrapUpgradeTransaction.d.ts
|
|
2129
1920
|
export declare const wrapUpgradeTransaction: <TSchema extends DatabaseSchema>(transaction: IDBTransaction) => DatabaseTransaction<TSchema, DatabaseStoreName<TSchema>, "versionchange">;
|
|
2130
|
-
//#endregion
|
|
2131
|
-
//#region src/services/jsonPatch/addJsonValue.d.ts
|
|
2132
1921
|
export declare const addJsonValue: (document: unknown, path: string, value: unknown) => ApplyPatchesResult<unknown>;
|
|
2133
|
-
//#endregion
|
|
2134
|
-
//#region src/services/jsonPatch/applyPatch.d.ts
|
|
2135
1922
|
export declare const applyPatch: (document: unknown, operation: JsonPatchOperation) => ApplyPatchesResult<unknown>;
|
|
2136
|
-
//#endregion
|
|
2137
|
-
//#region src/services/jsonPatch/applyPatches.d.ts
|
|
2138
1923
|
export declare const applyPatches: <T>(document: T, operations: JsonPatchOperation[]) => ApplyPatchesResult<T>;
|
|
2139
|
-
//#endregion
|
|
2140
|
-
//#region src/services/jsonPatch/constants.d.ts
|
|
2141
1924
|
export declare const APPEND_SEGMENT = "-";
|
|
2142
1925
|
export declare const JSON_POINTER_REGEX: RegExp;
|
|
2143
|
-
//#endregion
|
|
2144
|
-
//#region src/services/jsonPatch/parseArrayIndex.d.ts
|
|
2145
1926
|
export declare const parseArrayIndex: (segment: string, maxIndex: number) => number | undefined;
|
|
2146
|
-
//#endregion
|
|
2147
|
-
//#region src/services/jsonPatch/parseJsonPointer.d.ts
|
|
2148
1927
|
export declare const parseJsonPointer: (pointer: string) => string[];
|
|
2149
|
-
//#endregion
|
|
2150
|
-
//#region src/services/jsonPatch/readJsonValue.d.ts
|
|
2151
1928
|
export declare const readJsonValue: (document: unknown, segments: string[]) => unknown;
|
|
2152
|
-
//#endregion
|
|
2153
|
-
//#region src/services/jsonPatch/removeJsonValue.d.ts
|
|
2154
1929
|
export declare const removeJsonValue: (document: unknown, path: string) => ApplyPatchesResult<unknown>;
|
|
2155
|
-
//#endregion
|
|
2156
|
-
//#region src/services/jsonPatch/toJsonPointer.d.ts
|
|
2157
1930
|
export declare const toJsonPointer: (segments: string[]) => string;
|
|
2158
|
-
//#endregion
|
|
2159
|
-
//#region src/services/jsonPatch/updateJsonValue.d.ts
|
|
2160
1931
|
export declare const updateJsonValue: (document: unknown, segments: string[], update: (value: unknown) => unknown) => unknown;
|
|
2161
|
-
//#endregion
|
|
2162
|
-
//#region src/services/message/constants.d.ts
|
|
2163
1932
|
export declare const MENTION_ID_ATTRIBUTE = "data-id";
|
|
2164
1933
|
export declare const MENTION_ITEM_TYPE_ATTRIBUTE = "data-mention-type";
|
|
2165
1934
|
export declare const MENTION_LABEL_ATTRIBUTE = "data-label";
|
|
@@ -2172,14 +1941,8 @@ export declare const CUSTOM_EMOJI_ID_ATTRIBUTE = "data-custom-emoji-id";
|
|
|
2172
1941
|
export declare const CUSTOM_EMOJI_NAME_ATTRIBUTE = "data-custom-emoji-name";
|
|
2173
1942
|
export declare const SPOILER_ATTRIBUTE = "data-spoiler";
|
|
2174
1943
|
export declare const SPOILER_SELECTOR: string;
|
|
2175
|
-
//#endregion
|
|
2176
|
-
//#region src/services/message/getMentions.d.ts
|
|
2177
1944
|
export declare const getMentions: (message: string) => HTMLElement[];
|
|
2178
|
-
//#endregion
|
|
2179
|
-
//#region src/services/mime/charset.d.ts
|
|
2180
1945
|
export declare const charset: (type: string) => false | string;
|
|
2181
|
-
//#endregion
|
|
2182
|
-
//#region src/services/mime/constants.d.ts
|
|
2183
1946
|
export declare const MEDIA_TYPE_REGEX: RegExp;
|
|
2184
1947
|
export declare const PATH_SEPARATOR_REGEX: RegExp;
|
|
2185
1948
|
export declare const TEXT_MEDIA_TYPE_REGEX: RegExp;
|
|
@@ -2191,53 +1954,21 @@ export declare const SourceScoreMap: ReadonlyMap<string, number>;
|
|
|
2191
1954
|
export declare const DEFAULT_SOURCE_SCORE = 30;
|
|
2192
1955
|
export declare const TypeScoreMap: ReadonlyMap<string, number>;
|
|
2193
1956
|
export declare const DEFAULT_TYPE_SCORE = 0;
|
|
2194
|
-
//#endregion
|
|
2195
|
-
//#region src/services/mime/contentType.d.ts
|
|
2196
1957
|
export declare const contentType: (value: string) => false | string;
|
|
2197
|
-
//#endregion
|
|
2198
|
-
//#region src/services/mime/extension.d.ts
|
|
2199
1958
|
export declare const extension: (type: string) => false | string;
|
|
2200
|
-
//#endregion
|
|
2201
|
-
//#region src/services/mime/getExtensionMimeTypeMap.d.ts
|
|
2202
1959
|
export declare const getExtensionMimeTypeMap: () => ReadonlyMap<string, string>;
|
|
2203
|
-
//#endregion
|
|
2204
|
-
//#region src/services/mime/getMediaType.d.ts
|
|
2205
1960
|
export declare const getMediaType: (value: string) => string;
|
|
2206
|
-
//#endregion
|
|
2207
|
-
//#region src/services/mime/getMimeScore.d.ts
|
|
2208
1961
|
export declare const getMimeScore: (mimeType: string, source?: string) => number;
|
|
2209
|
-
//#endregion
|
|
2210
|
-
//#region src/services/mime/getMimeTypeEntryMap.d.ts
|
|
2211
1962
|
export declare const getMimeTypeEntryMap: () => ReadonlyMap<string, MimeDatabaseEntry>;
|
|
2212
|
-
//#endregion
|
|
2213
|
-
//#region src/services/mime/lookup.d.ts
|
|
2214
1963
|
export declare const lookup: (path: string) => false | string;
|
|
2215
|
-
//#endregion
|
|
2216
|
-
//#region src/services/prettier/css.d.ts
|
|
2217
1964
|
export declare const css: typeof String.raw;
|
|
2218
|
-
//#endregion
|
|
2219
|
-
//#region src/services/prettier/html.d.ts
|
|
2220
1965
|
export declare const html: typeof String.raw;
|
|
2221
|
-
//#endregion
|
|
2222
|
-
//#region src/services/profanity/checkContainsProfanity.d.ts
|
|
2223
1966
|
export declare const checkContainsProfanity: (text: unknown, { isWholeWord }?: Partial<ProfanityOptions>) => boolean;
|
|
2224
|
-
//#endregion
|
|
2225
|
-
//#region src/services/profanity/englishProfaneWords.d.ts
|
|
2226
1967
|
export declare const englishProfaneWords: readonly string[];
|
|
2227
|
-
//#endregion
|
|
2228
|
-
//#region src/services/sanitizeHtml/checkIsAllowedUrl.d.ts
|
|
2229
1968
|
export declare const checkIsAllowedUrl: (url: string, allowedSchemes: string[]) => boolean;
|
|
2230
|
-
//#endregion
|
|
2231
|
-
//#region src/services/sanitizeHtml/checkIsUnsafeUrlCharacter.d.ts
|
|
2232
1969
|
export declare const checkIsUnsafeUrlCharacter: (character: string) => boolean;
|
|
2233
|
-
//#endregion
|
|
2234
|
-
//#region src/services/sanitizeHtml/checkIsWhitespaceCharacter.d.ts
|
|
2235
1970
|
export declare const checkIsWhitespaceCharacter: (character: string) => boolean;
|
|
2236
|
-
//#endregion
|
|
2237
|
-
//#region src/services/sanitizeHtml/collectText.d.ts
|
|
2238
1971
|
export declare const collectText: (nodes: DefaultTreeAdapterTypes.ChildNode[], depth: number) => string;
|
|
2239
|
-
//#endregion
|
|
2240
|
-
//#region src/services/sanitizeHtml/constants.d.ts
|
|
2241
1972
|
export declare const HTML_NAMESPACE: html$1.NS;
|
|
2242
1973
|
export declare const DEFAULT_ALLOWED_TAGS: string[];
|
|
2243
1974
|
export declare const DEFAULT_LINK_ATTRIBUTES: string[];
|
|
@@ -2253,155 +1984,63 @@ export declare const SRCSET_DESCRIPTOR_REGEX: RegExp;
|
|
|
2253
1984
|
export declare const ESCAPED_TEXT_CHARACTERS_REGEX: RegExp;
|
|
2254
1985
|
export declare const ESCAPED_ATTRIBUTE_CHARACTERS_REGEX: RegExp;
|
|
2255
1986
|
export declare const SANITIZER_ADVISORY_WATCH_SINCE = "2026-10-21";
|
|
2256
|
-
//#endregion
|
|
2257
|
-
//#region src/services/sanitizeHtml/escapeAttribute.d.ts
|
|
2258
1987
|
export declare const escapeAttribute: (value: string) => string;
|
|
2259
|
-
//#endregion
|
|
2260
|
-
//#region src/services/sanitizeHtml/escapeCharacters.d.ts
|
|
2261
1988
|
export declare const escapeCharacters: (value: string, charactersRegex: RegExp, entities: Record<string, string>) => string;
|
|
2262
|
-
//#endregion
|
|
2263
|
-
//#region src/services/sanitizeHtml/escapeText.d.ts
|
|
2264
1989
|
export declare const escapeText: (text: string) => string;
|
|
2265
|
-
//#endregion
|
|
2266
|
-
//#region src/services/sanitizeHtml/filterAttributes.d.ts
|
|
2267
1990
|
export declare const filterAttributes: (element: DefaultTreeAdapterTypes.Element, policy: SanitizePolicy) => Record<string, string>;
|
|
2268
|
-
//#endregion
|
|
2269
|
-
//#region src/services/sanitizeHtml/filterClasses.d.ts
|
|
2270
1991
|
export declare const filterClasses: (value: string, patterns: string[] | undefined) => string | undefined;
|
|
2271
|
-
//#endregion
|
|
2272
|
-
//#region src/services/sanitizeHtml/filterHtml.d.ts
|
|
2273
1992
|
export declare const filterHtml: (html: string, policy: SanitizePolicy) => string;
|
|
2274
|
-
//#endregion
|
|
2275
|
-
//#region src/services/sanitizeHtml/filterSrcset.d.ts
|
|
2276
1993
|
export declare const filterSrcset: (value: string, allowedSchemes: string[]) => string | undefined;
|
|
2277
|
-
//#endregion
|
|
2278
|
-
//#region src/services/sanitizeHtml/filterStyle.d.ts
|
|
2279
1994
|
export declare const filterStyle: (value: string, rules: Record<string, RegExp[]> | undefined) => string | undefined;
|
|
2280
|
-
//#endregion
|
|
2281
|
-
//#region src/services/sanitizeHtml/getChildNodes.d.ts
|
|
2282
1995
|
export declare const getChildNodes: (element: DefaultTreeAdapterTypes.Element) => DefaultTreeAdapterTypes.ChildNode[];
|
|
2283
|
-
//#endregion
|
|
2284
|
-
//#region src/services/sanitizeHtml/matchesClassPattern.d.ts
|
|
2285
1996
|
export declare const matchesClassPattern: (className: string, pattern: string) => boolean;
|
|
2286
|
-
//#endregion
|
|
2287
|
-
//#region src/services/sanitizeHtml/renderNode.d.ts
|
|
2288
1997
|
export declare const renderNode: (node: DefaultTreeAdapterTypes.ChildNode, policy: SanitizePolicy, depth: number) => string;
|
|
2289
|
-
//#endregion
|
|
2290
|
-
//#region src/services/sanitizeHtml/sanitizeHtml.d.ts
|
|
2291
1998
|
export declare const sanitizeHtml: (html: string, options?: SanitizeHtmlOptions) => string;
|
|
2292
|
-
//#endregion
|
|
2293
|
-
//#region src/services/sanitizeHtml/sanitizeTextHtml.d.ts
|
|
2294
1999
|
export declare const sanitizeTextHtml: (html: string) => string;
|
|
2295
|
-
//#endregion
|
|
2296
|
-
//#region src/services/shared/applyItemMetadataMixin.d.ts
|
|
2297
2000
|
export declare const applyItemMetadataMixin: <TBase extends Class<object>>(Base: TBase) => ItemMetadataClass<TBase>;
|
|
2298
|
-
//#endregion
|
|
2299
|
-
//#region src/services/zod/createNormalizedStringSchema.d.ts
|
|
2300
2001
|
export declare const createNormalizedStringSchema: (maxLength: number, schema?: z.ZodString) => z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
2301
|
-
//#endregion
|
|
2302
|
-
//#region src/services/zod/createUniqueArraySchema.d.ts
|
|
2303
2002
|
export declare const createUniqueArraySchema: CreateUniqueArraySchema;
|
|
2304
|
-
//#endregion
|
|
2305
|
-
//#region src/services/zstd/constants.d.ts
|
|
2306
2003
|
export declare const DEFAULT_COMPRESSION_LEVEL = 12;
|
|
2307
2004
|
export declare const MIN_WINDOW_LOG = 10;
|
|
2308
2005
|
export declare const MAX_WINDOW_LOG = 27;
|
|
2309
|
-
//#endregion
|
|
2310
|
-
//#region src/services/zstd/getWindowLog.d.ts
|
|
2311
2006
|
export declare const getWindowLog: (dictionaryByteCount: number, inputByteCount: number) => number;
|
|
2312
|
-
//#endregion
|
|
2313
|
-
//#region src/test/constants.d.ts
|
|
2314
2007
|
export declare const ALL_SPECIAL_VALUES: {
|
|
2315
2008
|
isPlainObject: boolean;
|
|
2316
2009
|
value: unknown;
|
|
2317
2010
|
}[];
|
|
2318
|
-
//#endregion
|
|
2319
|
-
//#region src/util/array/chunk.d.ts
|
|
2320
2011
|
export declare const chunk: <T>(array: T[], size: number) => T[][];
|
|
2321
|
-
//#endregion
|
|
2322
|
-
//#region src/util/array/chunkBySerializedSize.d.ts
|
|
2323
2012
|
export declare const chunkBySerializedSize: <T>(items: T[], maxBytes: number, maxCount: number) => T[][];
|
|
2324
|
-
//#endregion
|
|
2325
|
-
//#region src/util/array/takeOne.d.ts
|
|
2326
2013
|
export declare const takeOne: TakeOne;
|
|
2327
|
-
//#endregion
|
|
2328
|
-
//#region src/util/array/takeRandom.d.ts
|
|
2329
2014
|
export declare const takeRandom: <T>(values: readonly T[], random: () => number) => T;
|
|
2330
|
-
//#endregion
|
|
2331
|
-
//#region src/util/date/getEndOfDay.d.ts
|
|
2332
2015
|
export declare const getEndOfDay: (date: Date) => Date;
|
|
2333
|
-
//#endregion
|
|
2334
|
-
//#region src/util/date/getZonedDateTime.d.ts
|
|
2335
2016
|
export declare const getZonedDateTime: (date: Date) => Temporal.ZonedDateTime;
|
|
2336
|
-
//#endregion
|
|
2337
|
-
//#region src/util/dom/checkIsNestedControl.d.ts
|
|
2338
2017
|
export declare const checkIsNestedControl: (event: MouseEvent) => boolean;
|
|
2339
|
-
//#endregion
|
|
2340
|
-
//#region src/util/dom/checkIsNestedInteraction.d.ts
|
|
2341
2018
|
export declare const checkIsNestedInteraction: (event: MouseEvent) => boolean;
|
|
2342
|
-
//#endregion
|
|
2343
|
-
//#region src/util/dom/downloadFile.d.ts
|
|
2344
2019
|
export declare const downloadFile: (filename: string, blobPart: BlobPart, type: string) => void;
|
|
2345
|
-
//#endregion
|
|
2346
|
-
//#region src/util/dom/downloadUrl.d.ts
|
|
2347
2020
|
export declare const downloadUrl: (url: string, filename: string) => void;
|
|
2348
|
-
//#endregion
|
|
2349
|
-
//#region src/util/environment/checkIsServer.d.ts
|
|
2350
2021
|
export declare const checkIsServer: () => boolean;
|
|
2351
|
-
//#endregion
|
|
2352
|
-
//#region src/util/function/getSynchronizedFunction.d.ts
|
|
2353
2022
|
export declare const getSynchronizedFunction: <TArgs extends unknown[]>(asyncFunction: (...args: TArgs) => Promise<unknown>) => ((...args: TArgs) => void);
|
|
2354
2023
|
export declare const waitForSynchronizedFunctions: () => Promise<void>;
|
|
2355
|
-
//#endregion
|
|
2356
|
-
//#region src/util/function/noop.d.ts
|
|
2357
2024
|
export declare const noop: () => void;
|
|
2358
|
-
//#endregion
|
|
2359
|
-
//#region src/util/id/constants.d.ts
|
|
2360
2025
|
export declare const ID_SEPARATOR = "|";
|
|
2361
|
-
//#endregion
|
|
2362
|
-
//#region src/util/id/uuid/constants.d.ts
|
|
2363
2026
|
export declare const UUIDV4_REGEX: RegExp;
|
|
2364
|
-
//#endregion
|
|
2365
|
-
//#region src/util/map/getOrCreate.d.ts
|
|
2366
2027
|
export declare const getOrCreate: <TKey, TValue>(map: Map<TKey, TValue>, key: TKey, create: () => TValue) => TValue;
|
|
2367
|
-
//#endregion
|
|
2368
|
-
//#region src/util/object/checkIsCustomMethod.d.ts
|
|
2369
2028
|
export declare const checkIsCustomMethod: (value: object, methodName: ObjectMethod) => boolean;
|
|
2370
|
-
//#endregion
|
|
2371
|
-
//#region src/util/object/checkIsDeepEqual.d.ts
|
|
2372
2029
|
export declare const checkIsDeepEqual: (first: unknown, second: unknown) => boolean;
|
|
2373
|
-
//#endregion
|
|
2374
|
-
//#region src/util/object/checkIsPlainObject.d.ts
|
|
2375
2030
|
export declare const checkIsPlainObject: (data: unknown) => data is Record<string, unknown>;
|
|
2376
|
-
//#endregion
|
|
2377
|
-
//#region src/util/object/checkIsSameBytes.d.ts
|
|
2378
2031
|
export declare const checkIsSameBytes: (first: ArrayBuffer | ArrayBufferView | SharedArrayBuffer, second: ArrayBuffer | ArrayBufferView | SharedArrayBuffer) => boolean;
|
|
2379
|
-
//#endregion
|
|
2380
|
-
//#region src/util/object/checkIsSameValueZero.d.ts
|
|
2381
2032
|
export declare const checkIsSameValueZero: (first: unknown, second: unknown) => boolean;
|
|
2382
|
-
//#endregion
|
|
2383
|
-
//#region src/util/object/clonePlainDeep.d.ts
|
|
2384
2033
|
export declare const clonePlainDeep: <T>(data: T) => T;
|
|
2385
|
-
//#endregion
|
|
2386
|
-
//#region src/util/object/getEnumerableKeys.d.ts
|
|
2387
2034
|
export declare const getEnumerableKeys: (value: object) => PropertyKey[];
|
|
2388
|
-
//#endregion
|
|
2389
|
-
//#region src/util/types/GetArrayProps.d.ts
|
|
2390
2035
|
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) | {
|
|
2391
2036
|
path: R extends true ? "length" : `${P}.length`;
|
|
2392
2037
|
value: T["length"];
|
|
2393
2038
|
};
|
|
2394
|
-
//#endregion
|
|
2395
|
-
//#region src/util/types/KnownKeys.d.ts
|
|
2396
2039
|
export type KnownKeys<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K]; };
|
|
2397
|
-
//#endregion
|
|
2398
|
-
//#region src/util/types/GetObjectProps.d.ts
|
|
2399
2040
|
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 FunctionLike ? never : (D extends [unknown, ...infer Rest] ? GetProperties<T[K], R extends true ? `${K}` : `${P}.${K}`, Rest, false> : never) | {
|
|
2400
2041
|
path: R extends true ? `${K}` : `${P}.${K}`;
|
|
2401
2042
|
value: T[K];
|
|
2402
2043
|
}; }[keyof KnownKeys<T> & (number | string)];
|
|
2403
|
-
//#endregion
|
|
2404
|
-
//#region src/util/types/GetPrimitiveProps.d.ts
|
|
2405
2044
|
export type GetPrimitiveProps<T, P extends string, D extends unknown[], R extends boolean> = T extends string ? {
|
|
2406
2045
|
path: R extends true ? "length" : `${P}.length`;
|
|
2407
2046
|
value: number;
|
|
@@ -2409,85 +2048,32 @@ export type GetPrimitiveProps<T, P extends string, D extends unknown[], R extend
|
|
|
2409
2048
|
path: R extends true ? "description" : `${P}.description`;
|
|
2410
2049
|
value: string | undefined;
|
|
2411
2050
|
} : never;
|
|
2412
|
-
//#endregion
|
|
2413
|
-
//#region src/util/types/GetProperties.d.ts
|
|
2414
2051
|
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;
|
|
2415
|
-
//#endregion
|
|
2416
|
-
//#region src/util/types/GetPaths.d.ts
|
|
2417
2052
|
export type GetPaths<T> = GetProperties<T> extends (infer U) ? (U extends {
|
|
2418
2053
|
path: infer Path;
|
|
2419
2054
|
} ? Path : never) : never;
|
|
2420
|
-
//#endregion
|
|
2421
|
-
//#region src/util/types/PropertyNames.d.ts
|
|
2422
2055
|
export type PropertyNames<T> = { [P in GetPaths<T>]: P; };
|
|
2423
|
-
//#endregion
|
|
2424
|
-
//#region src/util/object/getPropertyNames.d.ts
|
|
2425
2056
|
export declare const getPropertyNames: <T>() => PropertyNames<T>;
|
|
2426
|
-
//#endregion
|
|
2427
|
-
//#region src/util/object/jsonDateParse.d.ts
|
|
2428
2057
|
export declare const jsonDateParse: <T = any>(text: string) => T;
|
|
2429
|
-
//#endregion
|
|
2430
|
-
//#region src/util/types/MergeObjectsStrict.d.ts
|
|
2431
2058
|
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;
|
|
2432
|
-
//#endregion
|
|
2433
|
-
//#region src/util/object/mergeObjectsStrict.d.ts
|
|
2434
2059
|
export declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
|
|
2435
|
-
//#endregion
|
|
2436
|
-
//#region src/util/object/omitDeep.d.ts
|
|
2437
2060
|
export declare const omitDeep: <T, TKey extends string>(value: T, ...keys: TKey[]) => DeepOmit<T, TKey>;
|
|
2438
|
-
//#endregion
|
|
2439
|
-
//#region src/util/promise/createEvictingPromiseCache.d.ts
|
|
2440
2061
|
export declare const createEvictingPromiseCache: <TArguments extends unknown[], TValue>(getKey: (...args: TArguments) => string, load: (...args: TArguments) => Promise<TValue>) => ((...args: TArguments) => Promise<TValue>);
|
|
2441
|
-
//#endregion
|
|
2442
|
-
//#region src/util/promise/settleAll.d.ts
|
|
2443
2062
|
export declare const settleAll: <T>(tasks: (() => Promise<T>)[], concurrencyLimit?: number) => Promise<T[]>;
|
|
2444
|
-
//#endregion
|
|
2445
|
-
//#region src/util/reactivity/getRawData.d.ts
|
|
2446
2063
|
export declare const getRawData: <T>(data: T) => T;
|
|
2447
|
-
//#endregion
|
|
2448
|
-
//#region src/util/reactivity/toRawDeep.d.ts
|
|
2449
2064
|
export declare const toRawDeep: <T extends object>(data: T) => T;
|
|
2450
|
-
//#endregion
|
|
2451
|
-
//#region src/util/text/capitalize.d.ts
|
|
2452
2065
|
export declare const capitalize: (string: string) => string;
|
|
2453
|
-
//#endregion
|
|
2454
|
-
//#region src/util/text/dedent.d.ts
|
|
2455
2066
|
export declare const dedent: Dedent;
|
|
2456
|
-
//#endregion
|
|
2457
|
-
//#region src/util/text/encodeUrlSubDelimiters.d.ts
|
|
2458
2067
|
export declare const encodeUrlSubDelimiters: (value: string) => string;
|
|
2459
|
-
//#endregion
|
|
2460
|
-
//#region src/util/text/getDecodedUriComponent.d.ts
|
|
2461
2068
|
export declare const getDecodedUriComponent: (value: string, fallback: string) => string;
|
|
2462
|
-
//#endregion
|
|
2463
|
-
//#region src/util/text/normalizeString.d.ts
|
|
2464
2069
|
export declare const normalizeString: (value: string | undefined) => string;
|
|
2465
|
-
//#endregion
|
|
2466
|
-
//#region src/util/text/streamToText.d.ts
|
|
2467
2070
|
export declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>;
|
|
2468
|
-
//#endregion
|
|
2469
|
-
//#region src/util/text/toKebabCase.d.ts
|
|
2470
2071
|
export declare const toKebabCase: <T extends string>(string: T) => KebabCase<T>;
|
|
2471
|
-
//#endregion
|
|
2472
|
-
//#region src/util/text/truncate.d.ts
|
|
2473
2072
|
export declare const truncate: (string: string, length: number) => string;
|
|
2474
|
-
//#endregion
|
|
2475
|
-
//#region src/util/text/uncapitalize.d.ts
|
|
2476
2073
|
export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
|
|
2477
|
-
//#endregion
|
|
2478
|
-
//#region src/util/time/constants.d.ts
|
|
2479
2074
|
export declare const MILLISECONDS_PER_SECOND = 1e3;
|
|
2480
|
-
//#endregion
|
|
2481
|
-
//#region src/util/time/hrtime.d.ts
|
|
2482
2075
|
export declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
|
|
2483
|
-
//#endregion
|
|
2484
|
-
//#region src/util/time/now.d.ts
|
|
2485
2076
|
export declare const now: () => string;
|
|
2486
|
-
//#endregion
|
|
2487
|
-
//#region src/util/time/sleep.d.ts
|
|
2488
2077
|
export declare const sleep: (durationMs: number) => Promise<void>;
|
|
2489
|
-
//#endregion
|
|
2490
|
-
//#region src/util/validation/exhaustiveGuard.d.ts
|
|
2491
2078
|
export declare const exhaustiveGuard: (value: never) => never;
|
|
2492
|
-
//#endregion
|
|
2493
2079
|
export {};
|