@h3ravel/arquebus 0.6.6 → 0.6.8
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/README.md +5 -4
- package/bin/index.cjs +270 -425
- package/bin/{index.js → index.mjs} +230 -409
- package/bin/seeders-C0schOjT.mjs +3 -0
- package/bin/seeders-D-v59HCz.cjs +3 -0
- package/dist/browser/index.cjs +4 -12
- package/dist/browser/index.d.cts +203 -203
- package/dist/browser/{index.d.ts → index.d.mts} +203 -203
- package/dist/browser/{index.js → index.mjs} +4 -11
- package/dist/index.cjs +21 -59
- package/dist/index.d.cts +133 -133
- package/dist/{index.d.ts → index.d.mts} +133 -133
- package/dist/{index.js → index.mjs} +21 -54
- package/dist/inspector/index.cjs +15 -46
- package/dist/inspector/{index.js → index.mjs} +15 -43
- package/dist/migrations/{chunk-PECeCxCb.js → chunk-BD38OWEx.mjs} +1 -1
- package/dist/migrations/index.cjs +20 -57
- package/dist/migrations/index.d.cts +186 -186
- package/dist/migrations/{index.d.ts → index.d.mts} +186 -186
- package/dist/migrations/{index.js → index.mjs} +22 -54
- package/dist/seeders/index.cjs +1 -5
- package/dist/seeders/index.d.cts +184 -184
- package/dist/seeders/{index.d.ts → index.d.mts} +184 -184
- package/dist/seeders/{index.js → index.mjs} +2 -3
- package/dist/stubs/seeder-js.stub +4 -4
- package/dist/stubs/seeder-ts.stub +5 -0
- package/package.json +5 -4
- package/bin/seeders-8GJzfIIN.js +0 -3
- package/bin/seeders-ByeSoCAQ.cjs +0 -131
- package/bin/seeders-CltigymO.js +0 -79
- package/bin/seeders-_xJ6VGVS.cjs +0 -3
- /package/bin/{index.d.ts → index.d.mts} +0 -0
- /package/dist/inspector/{index.d.ts → index.d.mts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -3,23 +3,23 @@ import Knex$1, { Knex } from "knex";
|
|
|
3
3
|
import * as dayjs0 from "dayjs";
|
|
4
4
|
|
|
5
5
|
//#region src/collection.d.ts
|
|
6
|
-
declare class Collection<I extends Model$1 | Model$2> extends Collection$1<I> implements ICollection<I> {
|
|
6
|
+
declare class Collection<I$1 extends Model$1 | Model$2> extends Collection$1<I$1> implements ICollection<I$1> {
|
|
7
7
|
private newConstructor;
|
|
8
|
-
getConstructor<T extends typeof Collection<I>>(this: InstanceType<T>): T;
|
|
9
|
-
load(...relations: (string[] | I[] | string | I)[]): Promise<Collection<I>>;
|
|
10
|
-
loadAggregate<I>(relations: I, column: string, action?: string | null | TFunction): Promise<this>;
|
|
11
|
-
loadCount(relations: I): Promise<this>;
|
|
12
|
-
loadMax(relation: I, column: string): Promise<this>;
|
|
13
|
-
loadMin(relation: I, column: string): Promise<this>;
|
|
14
|
-
loadSum(relation: I, column: string): Promise<this>;
|
|
15
|
-
loadAvg(relation: I, column: string): Promise<this>;
|
|
8
|
+
getConstructor<T$1 extends typeof Collection<I$1>>(this: InstanceType<T$1>): T$1;
|
|
9
|
+
load(...relations: (string[] | I$1[] | string | I$1)[]): Promise<Collection<I$1>>;
|
|
10
|
+
loadAggregate<I$1>(relations: I$1, column: string, action?: string | null | TFunction): Promise<this>;
|
|
11
|
+
loadCount(relations: I$1): Promise<this>;
|
|
12
|
+
loadMax(relation: I$1, column: string): Promise<this>;
|
|
13
|
+
loadMin(relation: I$1, column: string): Promise<this>;
|
|
14
|
+
loadSum(relation: I$1, column: string): Promise<this>;
|
|
15
|
+
loadAvg(relation: I$1, column: string): Promise<this>;
|
|
16
16
|
mapThen(callback: () => void): Promise<void[]>;
|
|
17
17
|
modelKeys(): any[];
|
|
18
|
-
contains<K, V>(key: keyof I | K | TFunction, value?: V): boolean;
|
|
18
|
+
contains<K$1, V>(key: keyof I$1 | K$1 | TFunction, value?: V): boolean;
|
|
19
19
|
diff(items: ICollection<any> | any[]): any;
|
|
20
20
|
except(keys: any[]): any;
|
|
21
|
-
intersect(items: I[]): any;
|
|
22
|
-
unique(key?: TFunction | keyof I, _strict?: boolean): any;
|
|
21
|
+
intersect(items: I$1[]): any;
|
|
22
|
+
unique(key?: TFunction | keyof I$1, _strict?: boolean): any;
|
|
23
23
|
find(key: any, defaultValue?: null): any;
|
|
24
24
|
fresh(...args: any[]): Promise<any>;
|
|
25
25
|
makeVisible(attributes: any): this;
|
|
@@ -28,24 +28,24 @@ declare class Collection<I extends Model$1 | Model$2> extends Collection$1<I> im
|
|
|
28
28
|
only(keys: any[]): any;
|
|
29
29
|
getDictionary(items?: ICollection<any> | any[]): TGeneric;
|
|
30
30
|
toQuery(): any;
|
|
31
|
-
toData(): (I | {
|
|
31
|
+
toData(): (I$1 | {
|
|
32
32
|
[x: string]: any;
|
|
33
33
|
[x: number]: any;
|
|
34
34
|
[x: symbol]: any;
|
|
35
35
|
})[];
|
|
36
|
-
toJSON(): (I | {
|
|
36
|
+
toJSON(): (I$1 | {
|
|
37
37
|
[x: string]: any;
|
|
38
38
|
[x: number]: any;
|
|
39
39
|
[x: symbol]: any;
|
|
40
40
|
})[];
|
|
41
41
|
toJson(...args: any[]): string;
|
|
42
|
-
[Symbol.iterator]: () => Iterator<I>;
|
|
42
|
+
[Symbol.iterator]: () => Iterator<I$1>;
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/paginator.d.ts
|
|
46
|
-
declare class Paginator<T extends Model$1, K extends IPaginatorParams = IPaginatorParams> implements IPaginator<T, K> {
|
|
46
|
+
declare class Paginator<T$1 extends Model$1, K$1 extends IPaginatorParams = IPaginatorParams> implements IPaginator<T$1, K$1> {
|
|
47
47
|
static formatter: (paginator: IPaginator<any>) => any | null;
|
|
48
|
-
_items: Collection<T>;
|
|
48
|
+
_items: Collection<T$1>;
|
|
49
49
|
_total: number;
|
|
50
50
|
_perPage: number;
|
|
51
51
|
_lastPage: number;
|
|
@@ -53,15 +53,15 @@ declare class Paginator<T extends Model$1, K extends IPaginatorParams = IPaginat
|
|
|
53
53
|
hasMore: boolean;
|
|
54
54
|
options: TGeneric;
|
|
55
55
|
static setFormatter(formatter?: ((paginator: IPaginator<any> | null) => any) | null): void;
|
|
56
|
-
constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
|
|
57
|
-
setItems(items: T[]): void;
|
|
56
|
+
constructor(items: T$1[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
|
|
57
|
+
setItems(items: T$1[]): void;
|
|
58
58
|
firstItem(): number | null;
|
|
59
59
|
lastItem(): number | null;
|
|
60
60
|
hasMorePages(): boolean;
|
|
61
|
-
get(index: number): T | null;
|
|
61
|
+
get(index: number): T$1 | null;
|
|
62
62
|
count(): number;
|
|
63
|
-
items(): Collection<T>;
|
|
64
|
-
map(callback: (value: T, index: number) => T): Collection<T>;
|
|
63
|
+
items(): Collection<T$1>;
|
|
64
|
+
map(callback: (value: T$1, index: number) => T$1): Collection<T$1>;
|
|
65
65
|
currentPage(): number;
|
|
66
66
|
onFirstPage(): boolean;
|
|
67
67
|
perPage(): number;
|
|
@@ -80,26 +80,26 @@ declare class Scope<M extends Model$1 = Model$1> implements IScope {
|
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/builder.d.ts
|
|
82
82
|
declare const Inference$2: {
|
|
83
|
-
new <M extends Model$1 | Model$2 = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
|
|
83
|
+
new <M extends Model$1 | Model$2 = Model$1, R$1 = IModel | ICollection<M>>(): IBuilder<M, R$1>;
|
|
84
84
|
};
|
|
85
|
-
declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>> extends Inference$2 {
|
|
86
|
-
query: IBuilder<M, R>;
|
|
85
|
+
declare class Builder<M extends Model$1 = Model$1, R$1 = IModel | ICollection<M>> extends Inference$2 {
|
|
86
|
+
query: IBuilder<M, R$1>;
|
|
87
87
|
connection: any;
|
|
88
88
|
model: M;
|
|
89
89
|
actions: any[];
|
|
90
|
-
localMacros: TGeneric<(...args: any[]) => any, keyof Omit<IBuilder<M, R>, number>>;
|
|
90
|
+
localMacros: TGeneric<(...args: any[]) => any, keyof Omit<IBuilder<M, R$1>, number>>;
|
|
91
91
|
eagerLoad: TGeneric<(...args: any[]) => any>;
|
|
92
|
-
globalScopes: TGeneric<Scope<M> | ((arg: Builder<M, R>) => Builder<M, R>)>;
|
|
93
|
-
onDeleteCallback?: (builder: Builder<M, R>) => Promise<boolean | number>;
|
|
94
|
-
constructor(query: IBuilder<M, R>);
|
|
95
|
-
asProxy(): Builder<M, R>;
|
|
92
|
+
globalScopes: TGeneric<Scope<M> | ((arg: Builder<M, R$1>) => Builder<M, R$1>)>;
|
|
93
|
+
onDeleteCallback?: (builder: Builder<M, R$1>) => Promise<boolean | number>;
|
|
94
|
+
constructor(query: IBuilder<M, R$1>);
|
|
95
|
+
asProxy(): Builder<M, R$1>;
|
|
96
96
|
orWhere(...args: any[]): this;
|
|
97
97
|
chunk<C extends TFunction>(count: number, callback: C): Promise<boolean>;
|
|
98
98
|
enforceOrderBy(this: any): void;
|
|
99
99
|
clone(this: any): any;
|
|
100
100
|
forPage(this: any, page: number, perPage?: number): any;
|
|
101
101
|
insert(...args: Parameters<typeof this.query.insert>): Promise<any>;
|
|
102
|
-
update<T extends TGeneric>(values: T): Promise<any>;
|
|
102
|
+
update<T$1 extends TGeneric>(values: T$1): Promise<any>;
|
|
103
103
|
increment(column: string, amount?: number, extra?: {}): Promise<any>;
|
|
104
104
|
decrement(column: string, amount?: number, extra?: {}): Promise<any>;
|
|
105
105
|
addUpdatedAtColumn(values: TGeneric<string>): TGeneric<string>;
|
|
@@ -108,7 +108,7 @@ declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>>
|
|
|
108
108
|
forceDelete(): Promise<number | boolean>;
|
|
109
109
|
create(attributes?: {}): Promise<any>;
|
|
110
110
|
newModelInstance(attributes?: {}): any;
|
|
111
|
-
getQuery(): IBuilder<M, R>;
|
|
111
|
+
getQuery(): IBuilder<M, R$1>;
|
|
112
112
|
getModel(): M;
|
|
113
113
|
setModel<MO extends Model$1>(model: MO): this;
|
|
114
114
|
qualifyColumn(column: string): string;
|
|
@@ -284,11 +284,11 @@ interface IStatement {
|
|
|
284
284
|
nulls: boolean;
|
|
285
285
|
bool: 'and' | 'or' | 'not';
|
|
286
286
|
}
|
|
287
|
-
interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
|
|
288
|
-
query: IBuilder<M, R>;
|
|
287
|
+
interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R$1 = M[] | M> {
|
|
288
|
+
query: IBuilder<M, R$1>;
|
|
289
289
|
schema: SchemaBuilder;
|
|
290
290
|
_statements: IStatement[];
|
|
291
|
-
table(name: string): IQueryBuilder<M, R>;
|
|
291
|
+
table(name: string): IQueryBuilder<M, R$1>;
|
|
292
292
|
select: SelectMethod<this>;
|
|
293
293
|
addSelect: AddSelectMethod<this>;
|
|
294
294
|
columns: SelectMethod<this>;
|
|
@@ -297,7 +297,7 @@ interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
|
|
|
297
297
|
returning: ReturningMethod<this>;
|
|
298
298
|
distinctOn: SelectMethod<this>;
|
|
299
299
|
as: AsMethod<this>;
|
|
300
|
-
asProxy(): IQueryBuilder<M, R>;
|
|
300
|
+
asProxy(): IQueryBuilder<M, R$1>;
|
|
301
301
|
where: WhereMethod<this>;
|
|
302
302
|
firstOrFail: FirstOrFailMethod<this>;
|
|
303
303
|
forceDelete: ForceDeleteMethod;
|
|
@@ -389,7 +389,7 @@ interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
|
|
|
389
389
|
transaction(callback?: TFunction): Promise<Knex.Transaction> | undefined;
|
|
390
390
|
destroy(callback: TFunction): Promise<number>;
|
|
391
391
|
destroy(): Promise<number>;
|
|
392
|
-
clone(): IQueryBuilder<M, R>;
|
|
392
|
+
clone(): IQueryBuilder<M, R$1>;
|
|
393
393
|
raw: Knex.RawQueryBuilder<TGeneric, M>;
|
|
394
394
|
get(columns?: string[]): Promise<any>;
|
|
395
395
|
first(columns?: string[]): Promise<M | null | undefined>;
|
|
@@ -415,19 +415,19 @@ interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
|
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/query-builder.d.ts
|
|
417
417
|
declare const Inference$1: {
|
|
418
|
-
new <M extends Model$1 = Model$1, R = M[] | M>(): IQueryBuilder<M, R>;
|
|
418
|
+
new <M extends Model$1 = Model$1, R$1 = M[] | M>(): IQueryBuilder<M, R$1>;
|
|
419
419
|
};
|
|
420
|
-
declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inference$1<M, R> {
|
|
420
|
+
declare class QueryBuilder<M extends Model$1 = Model$1, R$1 = M[] | M> extends Inference$1<M, R$1> {
|
|
421
421
|
model: M;
|
|
422
422
|
schema: SchemaBuilder;
|
|
423
|
-
connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
|
|
423
|
+
connector: IQueryBuilder<M, R$1> & Knex.QueryBuilder & {
|
|
424
424
|
_statements: any[];
|
|
425
425
|
_single: any;
|
|
426
426
|
} & Knex;
|
|
427
427
|
constructor(config: TConfig | null, connector: TFunction);
|
|
428
428
|
asProxy(): any;
|
|
429
429
|
beginTransaction(): Promise<Knex.Transaction<any, any[]>>;
|
|
430
|
-
table<X extends M>(table: string): IQueryBuilder<X, R>;
|
|
430
|
+
table<X extends M>(table: string): IQueryBuilder<X, R$1>;
|
|
431
431
|
transaction(callback?: TFunction): Promise<Knex.Transaction> | undefined;
|
|
432
432
|
find(id: string | number, columns?: string[]): Promise<any>;
|
|
433
433
|
get(_columns?: string[]): Promise<any>;
|
|
@@ -443,7 +443,7 @@ declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inf
|
|
|
443
443
|
max(column: string): Promise<number>;
|
|
444
444
|
sum(column: string): Promise<number>;
|
|
445
445
|
avg(column: string): Promise<number>;
|
|
446
|
-
clone(): IQueryBuilder<M, R>;
|
|
446
|
+
clone(): IQueryBuilder<M, R$1>;
|
|
447
447
|
delete(): Promise<number | boolean>;
|
|
448
448
|
insert(...args: Parameters<typeof this.connector.insert>): Promise<unknown>;
|
|
449
449
|
update(...args: Parameters<typeof this.connector.update>): Promise<number>;
|
|
@@ -619,14 +619,14 @@ interface IModel {
|
|
|
619
619
|
dateFormat: string;
|
|
620
620
|
visible: string[];
|
|
621
621
|
hidden: string[];
|
|
622
|
-
query<T extends {
|
|
622
|
+
query<T$1 extends {
|
|
623
623
|
prototype: unknown;
|
|
624
|
-
}>(this: T, client?: AnyQueryBuilder | null): IBuilder<Model$1>;
|
|
625
|
-
on<T extends {
|
|
624
|
+
}>(this: T$1, client?: AnyQueryBuilder | null): IBuilder<Model$1>;
|
|
625
|
+
on<T$1 extends {
|
|
626
626
|
prototype: unknown;
|
|
627
|
-
}>(this: T, connection: string | null): IBuilder<Model$1>;
|
|
627
|
+
}>(this: T$1, connection: string | null): IBuilder<Model$1>;
|
|
628
628
|
boot(): void;
|
|
629
|
-
make<T extends IModel>(this: new () => T, attributes?: TGeneric): T;
|
|
629
|
+
make<T$1 extends IModel>(this: new () => T$1, attributes?: TGeneric): T$1;
|
|
630
630
|
addHook(hook: Hook, callback: TFunction): void;
|
|
631
631
|
creating(callback: TFunction): void;
|
|
632
632
|
created(callback: TFunction): void;
|
|
@@ -666,8 +666,8 @@ interface IModel {
|
|
|
666
666
|
fill(attributes: any): this;
|
|
667
667
|
setAppends(appends: string[]): this;
|
|
668
668
|
append(key: string | string[]): this;
|
|
669
|
-
getRelation<T extends Model$1>(relation: string): T | ICollection<T> | null | undefined;
|
|
670
|
-
setRelation<T extends Model$1>(relation: string, value: T | ICollection<T> | null): this;
|
|
669
|
+
getRelation<T$1 extends Model$1>(relation: string): T$1 | ICollection<T$1> | null | undefined;
|
|
670
|
+
setRelation<T$1 extends Model$1>(relation: string, value: T$1 | ICollection<T$1> | null): this;
|
|
671
671
|
unsetRelation(relation: string): this;
|
|
672
672
|
relationLoaded(relation: string): boolean;
|
|
673
673
|
makeVisible(attributes: string | string[]): this;
|
|
@@ -714,45 +714,45 @@ interface IModel {
|
|
|
714
714
|
push(): Promise<boolean>;
|
|
715
715
|
is(model: this): boolean;
|
|
716
716
|
isNot(model: this): boolean;
|
|
717
|
-
related<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
|
|
718
|
-
getRelated<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
|
|
719
|
-
hasOne<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasOne<T>;
|
|
720
|
-
hasMany<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasMany<T>;
|
|
721
|
-
belongsTo<T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo<T>;
|
|
722
|
-
belongsToMany<T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T>;
|
|
717
|
+
related<T$1 extends RelationNames<this>>(relation: T$1): ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T$1>>}`>;
|
|
718
|
+
getRelated<T$1 extends RelationNames<this>>(relation: T$1): ReturnTypeOfMethod<ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T$1>>}`>, any>;
|
|
719
|
+
hasOne<T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, localKey?: string): HasOne<T$1>;
|
|
720
|
+
hasMany<T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, localKey?: string): HasMany<T$1>;
|
|
721
|
+
belongsTo<T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo<T$1>;
|
|
722
|
+
belongsToMany<T$1 extends Model$1>(model: new () => T$1, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T$1>;
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
725
|
//#region types/utils.d.ts
|
|
726
|
-
interface ICollection<T extends Model$1 | Model$2> extends Collection$1<T> {
|
|
727
|
-
items?: T[];
|
|
728
|
-
load(...relations: T[]): Promise<ICollection<T>>;
|
|
729
|
-
loadAggregate(relations: T | T[], column: string, action?: string | null): Promise<this>;
|
|
730
|
-
loadCount(relation: T, column: string): Promise<this>;
|
|
731
|
-
loadMax(relation: T, column: string): Promise<this>;
|
|
732
|
-
loadMin(relation: T, column: string): Promise<this>;
|
|
733
|
-
loadSum(relation: T, column: string): Promise<this>;
|
|
734
|
-
loadAvg(relation: T, column: string): Promise<this>;
|
|
726
|
+
interface ICollection<T$1 extends Model$1 | Model$2> extends Collection$1<T$1> {
|
|
727
|
+
items?: T$1[];
|
|
728
|
+
load(...relations: T$1[]): Promise<ICollection<T$1>>;
|
|
729
|
+
loadAggregate(relations: T$1 | T$1[], column: string, action?: string | null): Promise<this>;
|
|
730
|
+
loadCount(relation: T$1, column: string): Promise<this>;
|
|
731
|
+
loadMax(relation: T$1, column: string): Promise<this>;
|
|
732
|
+
loadMin(relation: T$1, column: string): Promise<this>;
|
|
733
|
+
loadSum(relation: T$1, column: string): Promise<this>;
|
|
734
|
+
loadAvg(relation: T$1, column: string): Promise<this>;
|
|
735
735
|
mapThen(callback: () => void): Promise<any>;
|
|
736
736
|
modelKeys(): string[] | number[];
|
|
737
737
|
contains(key: IModel | any, operator?: any, value?: any): boolean;
|
|
738
|
-
diff(items: ICollection<T> | any[]): ICollection<T>;
|
|
739
|
-
except(keys: any[]): ICollection<T>;
|
|
740
|
-
intersect(items: T[]): ICollection<T>;
|
|
741
|
-
unique(key?: any, strict?: boolean): ICollection<T>;
|
|
738
|
+
diff(items: ICollection<T$1> | any[]): ICollection<T$1>;
|
|
739
|
+
except(keys: any[]): ICollection<T$1>;
|
|
740
|
+
intersect(items: T$1[]): ICollection<T$1>;
|
|
741
|
+
unique(key?: any, strict?: boolean): ICollection<T$1>;
|
|
742
742
|
find(key: any, defaultValue?: any): any;
|
|
743
|
-
fresh(withs?: any[]): Promise<ICollection<T>>;
|
|
743
|
+
fresh(withs?: any[]): Promise<ICollection<T$1>>;
|
|
744
744
|
makeVisible(attributes: string | string[]): this;
|
|
745
745
|
makeHidden(attributes: string | string[]): this;
|
|
746
746
|
append(attributes: string[]): this;
|
|
747
747
|
only(keys: null | any[]): this;
|
|
748
748
|
getDictionary(items?: any[]): TGeneric;
|
|
749
|
-
toQuery(): IBuilder<T, any>;
|
|
749
|
+
toQuery(): IBuilder<T$1, any>;
|
|
750
750
|
toData(): any;
|
|
751
751
|
toJSON(): any;
|
|
752
752
|
toJson(): string;
|
|
753
753
|
toString(): string;
|
|
754
754
|
[key: string]: any;
|
|
755
|
-
[Symbol.iterator]: () => Iterator<T>;
|
|
755
|
+
[Symbol.iterator]: () => Iterator<T$1>;
|
|
756
756
|
}
|
|
757
757
|
interface IPaginatorParams {
|
|
758
758
|
current_page: number;
|
|
@@ -763,47 +763,47 @@ interface IPaginatorParams {
|
|
|
763
763
|
count: number;
|
|
764
764
|
paginated?: boolean;
|
|
765
765
|
}
|
|
766
|
-
interface IPaginator<T extends Model$1 | Model$2, K extends IPaginatorParams = IPaginatorParams> {
|
|
766
|
+
interface IPaginator<T$1 extends Model$1 | Model$2, K$1 extends IPaginatorParams = IPaginatorParams> {
|
|
767
767
|
formatter?(paginator: IPaginator<any>): any | null;
|
|
768
768
|
setFormatter?(formatter: (paginator: IPaginator<any>) => any | null): void;
|
|
769
|
-
setItems(items: T[] | Collection<T>): void;
|
|
769
|
+
setItems(items: T$1[] | Collection<T$1>): void;
|
|
770
770
|
hasMorePages(): boolean;
|
|
771
|
-
get(index: number): T | null;
|
|
771
|
+
get(index: number): T$1 | null;
|
|
772
772
|
count(): number;
|
|
773
|
-
items(): Collection<T>;
|
|
774
|
-
map(callback: (value: T, index: number) => T): Collection<T>;
|
|
773
|
+
items(): Collection<T$1>;
|
|
774
|
+
map(callback: (value: T$1, index: number) => T$1): Collection<T$1>;
|
|
775
775
|
currentPage(): number;
|
|
776
776
|
perPage(): number;
|
|
777
777
|
lastPage(): number;
|
|
778
778
|
firstItem(): number | null;
|
|
779
779
|
lastItem(): number | null;
|
|
780
780
|
total(): number;
|
|
781
|
-
toData<U = K>(): U;
|
|
782
|
-
toJSON<U = K>(): U;
|
|
781
|
+
toData<U$1 = K$1>(): U$1;
|
|
782
|
+
toJSON<U$1 = K$1>(): U$1;
|
|
783
783
|
toJson(): string;
|
|
784
784
|
[Symbol.iterator]?(): {
|
|
785
785
|
next: () => {
|
|
786
|
-
value: T;
|
|
786
|
+
value: T$1;
|
|
787
787
|
done: boolean;
|
|
788
788
|
};
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
//#endregion
|
|
792
792
|
//#region types/builder.d.ts
|
|
793
|
-
type BaseBuilder<M extends Model$1 | Model$2, R = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
|
|
793
|
+
type BaseBuilder<M extends Model$1 | Model$2, R$1 = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R$1>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
|
|
794
794
|
interface IScope {
|
|
795
795
|
apply(builder: Builder<any>, model: Model$1): void;
|
|
796
796
|
}
|
|
797
|
-
interface IBuilder<M extends Model$1 | Model$2, R = ICollection<M> | IModel> extends BaseBuilder<M, R> {
|
|
798
|
-
connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
|
|
797
|
+
interface IBuilder<M extends Model$1 | Model$2, R$1 = ICollection<M> | IModel> extends BaseBuilder<M, R$1> {
|
|
798
|
+
connector: IQueryBuilder<M, R$1> & Knex.QueryBuilder & {
|
|
799
799
|
_statements: any[];
|
|
800
800
|
_single: any;
|
|
801
801
|
} & Knex;
|
|
802
|
-
asProxy(): IQueryBuilder<M, R>;
|
|
802
|
+
asProxy(): IQueryBuilder<M, R$1>;
|
|
803
803
|
chunk(count: number, callback: (rows: ICollection<M>) => any): Promise<boolean>;
|
|
804
804
|
enforceOrderBy(): void;
|
|
805
805
|
idOf(id: string | number): this;
|
|
806
|
-
clone(): IBuilder<M, R>;
|
|
806
|
+
clone(): IBuilder<M, R$1>;
|
|
807
807
|
forPage(page: number, perPage?: number): this;
|
|
808
808
|
insert(...attributes: any[]): Promise<any>;
|
|
809
809
|
update(attributes: any): Promise<any>;
|
|
@@ -883,8 +883,8 @@ type FieldExpression = string;
|
|
|
883
883
|
type TableRef<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
|
|
884
884
|
type Selection<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
|
|
885
885
|
type QBOrCallback<QB extends AnyQueryBuilder> = AnyQueryBuilder | CallbackVoid<QB>;
|
|
886
|
-
interface CallbackVoid<T> {
|
|
887
|
-
(this: T, arg: T): void;
|
|
886
|
+
interface CallbackVoid<T$1> {
|
|
887
|
+
(this: T$1, arg: T$1): void;
|
|
888
888
|
}
|
|
889
889
|
type Raw = Knex.Raw;
|
|
890
890
|
type OrderByDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
|
|
@@ -892,11 +892,11 @@ interface OrderByDescriptor {
|
|
|
892
892
|
column: ColumnRef;
|
|
893
893
|
order?: OrderByDirection;
|
|
894
894
|
}
|
|
895
|
-
type AnyQueryBuilder<M extends Model$1 = any, R = any> = IQueryBuilder<M, R> | IBuilder<M, R>;
|
|
896
|
-
type Expression<T> = T | Raw | AnyQueryBuilder;
|
|
895
|
+
type AnyQueryBuilder<M extends Model$1 = any, R$1 = any> = IQueryBuilder<M, R$1> | IBuilder<M, R$1>;
|
|
896
|
+
type Expression<T$1> = T$1 | Raw | AnyQueryBuilder;
|
|
897
897
|
type ColumnRefOrOrderByDescriptor = ColumnRef | OrderByDescriptor;
|
|
898
|
-
interface RawInterface<R> {
|
|
899
|
-
(sql: string, ...bindings: any[]): R;
|
|
898
|
+
interface RawInterface<R$1> {
|
|
899
|
+
(sql: string, ...bindings: any[]): R$1;
|
|
900
900
|
}
|
|
901
901
|
interface BaseSetOperations<QB extends AnyQueryBuilder> {
|
|
902
902
|
(callbackOrBuilder: QBOrCallback<QB>, wrap?: boolean): QB;
|
|
@@ -910,7 +910,7 @@ interface GroupByMethod<QB extends AnyQueryBuilder> {
|
|
|
910
910
|
(columns: ColumnRef[]): QB;
|
|
911
911
|
}
|
|
912
912
|
type WithRelationType = {
|
|
913
|
-
[key: string]: <T extends IBuilder<any>>(builder: T) => T | void;
|
|
913
|
+
[key: string]: <T$1 extends IBuilder<any>>(builder: T$1) => T$1 | void;
|
|
914
914
|
} | string | string[];
|
|
915
915
|
interface SetOperationsMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
|
|
916
916
|
(...callbacksOrBuilders: QBOrCallback<QB>[]): QB;
|
|
@@ -1021,7 +1021,7 @@ declare class arquebus<M extends Model$1 = Model$1> {
|
|
|
1021
1021
|
connections: Record<string, TConfig>;
|
|
1022
1022
|
models: Record<string, typeof Model$1>;
|
|
1023
1023
|
constructor();
|
|
1024
|
-
getConstructor<T extends typeof arquebus>(this: InstanceType<T>): T;
|
|
1024
|
+
getConstructor<T$1 extends typeof arquebus>(this: InstanceType<T$1>): T$1;
|
|
1025
1025
|
static getInstance(): arquebus<Model$1>;
|
|
1026
1026
|
/**
|
|
1027
1027
|
* Initialize a new database connection
|
|
@@ -1044,7 +1044,7 @@ declare class arquebus<M extends Model$1 = Model$1> {
|
|
|
1044
1044
|
static getConnectorFactory(): typeof Knex$1;
|
|
1045
1045
|
static addConnection(config: TConfig | TBaseConfig, name?: string): void;
|
|
1046
1046
|
static beginTransaction(connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>>;
|
|
1047
|
-
static transaction<A, R>(callback: TFunction<A[], R>, connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>> | undefined;
|
|
1047
|
+
static transaction<A, R$1>(callback: TFunction<A[], R$1>, connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>> | undefined;
|
|
1048
1048
|
static table(name: string, connection?: null): IQueryBuilder<Model$1, Model$1 | Model$1[]>;
|
|
1049
1049
|
static schema(connection?: null): SchemaBuilder;
|
|
1050
1050
|
static destroyAll(): Promise<void>;
|
|
@@ -1087,14 +1087,14 @@ declare const BaseModel$1: (new (...args: any[]) => any) & {
|
|
|
1087
1087
|
dateFormat: string;
|
|
1088
1088
|
visible: string[] & any[];
|
|
1089
1089
|
hidden: string[] & any[];
|
|
1090
|
-
query: <T extends {
|
|
1090
|
+
query: <T$1 extends {
|
|
1091
1091
|
prototype: unknown;
|
|
1092
|
-
}>(this: T, client?: AnyQueryBuilder | null) => IBuilder<Model$1>;
|
|
1093
|
-
on: <T extends {
|
|
1092
|
+
}>(this: T$1, client?: AnyQueryBuilder | null) => IBuilder<Model$1>;
|
|
1093
|
+
on: <T$1 extends {
|
|
1094
1094
|
prototype: unknown;
|
|
1095
|
-
}>(this: T, connection: string | null) => IBuilder<Model$1>;
|
|
1095
|
+
}>(this: T$1, connection: string | null) => IBuilder<Model$1>;
|
|
1096
1096
|
boot: () => void;
|
|
1097
|
-
make: <T extends IModel>(this: new () => T, attributes?: TGeneric) => T;
|
|
1097
|
+
make: <T$1 extends IModel>(this: new () => T$1, attributes?: TGeneric) => T$1;
|
|
1098
1098
|
addHook: (hook: Hook, callback: TFunction) => void;
|
|
1099
1099
|
creating: (callback: TFunction) => void;
|
|
1100
1100
|
created: (callback: TFunction) => void;
|
|
@@ -1939,8 +1939,8 @@ declare const BaseModel$1: (new (...args: any[]) => any) & {
|
|
|
1939
1939
|
uniqueIds(): never[];
|
|
1940
1940
|
setUniqueIds(): void;
|
|
1941
1941
|
});
|
|
1942
|
-
getRelation: <T extends Model$1>(relation: string) => T | ICollection<T> | null | undefined;
|
|
1943
|
-
setRelation: <T extends Model$1>(relation: string, value: T | ICollection<T> | null) => (new () => IModel) & IModel & {
|
|
1942
|
+
getRelation: <T$1 extends Model$1>(relation: string) => T$1 | ICollection<T$1> | null | undefined;
|
|
1943
|
+
setRelation: <T$1 extends Model$1>(relation: string, value: T$1 | ICollection<T$1> | null) => (new () => IModel) & IModel & {
|
|
1944
1944
|
[x: string]: any;
|
|
1945
1945
|
timestamps: boolean;
|
|
1946
1946
|
dateFormat: string;
|
|
@@ -3830,7 +3830,7 @@ declare const BaseModel$1: (new (...args: any[]) => any) & {
|
|
|
3830
3830
|
uniqueIds(): never[];
|
|
3831
3831
|
setUniqueIds(): void;
|
|
3832
3832
|
}) => boolean;
|
|
3833
|
-
related: <T extends never>(relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
|
|
3833
|
+
related: <T$1 extends never>(relation: T$1) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
|
|
3834
3834
|
[x: string]: any;
|
|
3835
3835
|
timestamps: boolean;
|
|
3836
3836
|
dateFormat: string;
|
|
@@ -3910,8 +3910,8 @@ declare const BaseModel$1: (new (...args: any[]) => any) & {
|
|
|
3910
3910
|
usesUniqueIds(): boolean;
|
|
3911
3911
|
uniqueIds(): never[];
|
|
3912
3912
|
setUniqueIds(): void;
|
|
3913
|
-
}, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
|
|
3914
|
-
getRelated: <T extends never>(relation: T) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
|
|
3913
|
+
}, `relation${Capitalize<SnakeToCamelCase<T$1>>}`>;
|
|
3914
|
+
getRelated: <T$1 extends never>(relation: T$1) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
|
|
3915
3915
|
[x: string]: any;
|
|
3916
3916
|
timestamps: boolean;
|
|
3917
3917
|
dateFormat: string;
|
|
@@ -3991,11 +3991,11 @@ declare const BaseModel$1: (new (...args: any[]) => any) & {
|
|
|
3991
3991
|
usesUniqueIds(): boolean;
|
|
3992
3992
|
uniqueIds(): never[];
|
|
3993
3993
|
setUniqueIds(): void;
|
|
3994
|
-
}, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
|
|
3995
|
-
hasOne: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasOne<T>;
|
|
3996
|
-
hasMany: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasMany<T>;
|
|
3997
|
-
belongsTo: <T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T>;
|
|
3998
|
-
belongsToMany: <T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T>;
|
|
3994
|
+
}, `relation${Capitalize<SnakeToCamelCase<T$1>>}`>, any>;
|
|
3995
|
+
hasOne: <T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, localKey?: string) => HasOne<T$1>;
|
|
3996
|
+
hasMany: <T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, localKey?: string) => HasMany<T$1>;
|
|
3997
|
+
belongsTo: <T$1 extends Model$1>(model: new () => T$1, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T$1>;
|
|
3998
|
+
belongsToMany: <T$1 extends Model$1>(model: new () => T$1, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T$1>;
|
|
3999
3999
|
original: TGeneric;
|
|
4000
4000
|
casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
|
|
4001
4001
|
changes: TGeneric;
|
|
@@ -4536,7 +4536,7 @@ declare class Model$1 extends BaseModel$1 {
|
|
|
4536
4536
|
static init(attributes?: {}): Model$1;
|
|
4537
4537
|
static extend(plugin: TFunction, options: TGeneric): void;
|
|
4538
4538
|
static make(attributes?: TGeneric): Model$1;
|
|
4539
|
-
getConstructor<T extends typeof Model$1>(this: InstanceType<T>): T;
|
|
4539
|
+
getConstructor<T$1 extends typeof Model$1>(this: InstanceType<T$1>): T$1;
|
|
4540
4540
|
bootIfNotBooted(this: any): void;
|
|
4541
4541
|
static booting(): void;
|
|
4542
4542
|
static boot(): void;
|
|
@@ -4564,12 +4564,12 @@ declare class Model$1 extends BaseModel$1 {
|
|
|
4564
4564
|
callNamedScope(scope: string, parameters: any[]): any;
|
|
4565
4565
|
setTable(table: string): this;
|
|
4566
4566
|
newCollection(this: any, models?: never[]): Collection<Model$1>;
|
|
4567
|
-
load<R extends WithRelationType>(this: any, ...relations: R[]): Promise<any>;
|
|
4568
|
-
loadAggregate<R extends WithRelationType>(relations: R[], column: string, callback?: TFunction | string | null): Promise<this>;
|
|
4569
|
-
loadCount<R extends WithRelationType>(...relations: R[]): Promise<this>;
|
|
4570
|
-
loadMax<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
|
|
4571
|
-
loadMin<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
|
|
4572
|
-
loadSum<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
|
|
4567
|
+
load<R$1 extends WithRelationType>(this: any, ...relations: R$1[]): Promise<any>;
|
|
4568
|
+
loadAggregate<R$1 extends WithRelationType>(relations: R$1[], column: string, callback?: TFunction | string | null): Promise<this>;
|
|
4569
|
+
loadCount<R$1 extends WithRelationType>(...relations: R$1[]): Promise<this>;
|
|
4570
|
+
loadMax<R$1 extends WithRelationType>(relations: R$1[], column: string): Promise<this>;
|
|
4571
|
+
loadMin<R$1 extends WithRelationType>(relations: R$1[], column: string): Promise<this>;
|
|
4572
|
+
loadSum<R$1 extends WithRelationType>(relations: R$1[], column: string): Promise<this>;
|
|
4573
4573
|
increment(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise<any>;
|
|
4574
4574
|
decrement(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise<any>;
|
|
4575
4575
|
incrementOrDecrement(column: string, amount: number, extra: TGeneric, method: string, options: TGeneric): Promise<any>;
|
|
@@ -4618,47 +4618,47 @@ declare class Pivot extends Model$1 {
|
|
|
4618
4618
|
}
|
|
4619
4619
|
//#endregion
|
|
4620
4620
|
//#region types/generics.d.ts
|
|
4621
|
-
type TGeneric<V = any, K extends string = string> = Record<K, V>;
|
|
4622
|
-
type XGeneric<V = TGeneric, T = any> = {
|
|
4623
|
-
[key: string]: T;
|
|
4621
|
+
type TGeneric<V = any, K$1 extends string = string> = Record<K$1, V>;
|
|
4622
|
+
type XGeneric<V = TGeneric, T$1 = any> = {
|
|
4623
|
+
[key: string]: T$1;
|
|
4624
4624
|
} & V;
|
|
4625
4625
|
type Hook = 'creating' | 'created' | 'updating' | 'updated' | 'saving' | 'saved' | 'deleting' | 'deleted' | 'restoring' | 'restored' | 'trashed' | 'forceDeleted';
|
|
4626
4626
|
type TFunction<TArgs extends any[] = any[], TReturn = any> = (...args: TArgs) => TReturn;
|
|
4627
4627
|
type PrimitiveValue = string | number | boolean | Date | string[] | number[] | boolean[] | Date[] | null | Buffer;
|
|
4628
|
-
type ReturnTypeOfMethod<T, K extends keyof T> = T[K] extends ((...args: any[]) => infer R) ? R : never;
|
|
4628
|
+
type ReturnTypeOfMethod<T$1, K$1 extends keyof T$1> = T$1[K$1] extends ((...args: any[]) => infer R) ? R : never;
|
|
4629
4629
|
type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<SnakeToCamelCase<U>>}` : S;
|
|
4630
4630
|
type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToSnakeCase<U>}` : `${Uncapitalize<T>}_${CamelToSnakeCase<U>}` : S;
|
|
4631
|
-
type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? K : never }[keyof T];
|
|
4632
|
-
type RelationNames<T> = FunctionPropertyNames<T> extends infer R ? R extends `relation${infer P}` ? P extends 'sToData' | 'loaded' ? never : CamelToSnakeCase<P> : never : never;
|
|
4633
|
-
type MixinConstructor<T = TGeneric> = new (...args: any[]) => T;
|
|
4631
|
+
type FunctionPropertyNames<T$1> = { [K in keyof T$1]: T$1[K] extends ((...args: any[]) => any) ? K : never }[keyof T$1];
|
|
4632
|
+
type RelationNames<T$1> = FunctionPropertyNames<T$1> extends infer R ? R extends `relation${infer P}` ? P extends 'sToData' | 'loaded' ? never : CamelToSnakeCase<P> : never : never;
|
|
4633
|
+
type MixinConstructor<T$1 = TGeneric> = new (...args: any[]) => T$1;
|
|
4634
4634
|
//#endregion
|
|
4635
4635
|
//#region src/browser/collection.d.ts
|
|
4636
|
-
declare class Collection$2<I extends Model$2> extends Collection$1<I> {
|
|
4636
|
+
declare class Collection$2<I$1 extends Model$2> extends Collection$1<I$1> {
|
|
4637
4637
|
mapThen(callback: TFunction): Promise<any[]>;
|
|
4638
4638
|
modelKeys(): any[];
|
|
4639
|
-
contains<K, V>(key: keyof I | K | TFunction, value?: V): boolean;
|
|
4639
|
+
contains<K$1, V>(key: keyof I$1 | K$1 | TFunction, value?: V): boolean;
|
|
4640
4640
|
diff(items: ICollection<any> | any[]): any;
|
|
4641
4641
|
except(keys: any[]): any;
|
|
4642
|
-
intersect(items: I[]): any;
|
|
4643
|
-
unique(key?: TFunction | keyof I, _strict?: boolean): any;
|
|
4642
|
+
intersect(items: I$1[]): any;
|
|
4643
|
+
unique(key?: TFunction | keyof I$1, _strict?: boolean): any;
|
|
4644
4644
|
find(key: any, defaultValue?: null): any;
|
|
4645
4645
|
makeVisible(attributes: any): this;
|
|
4646
4646
|
makeHidden(attributes: any): this;
|
|
4647
4647
|
append(attributes: any): this;
|
|
4648
4648
|
only(keys: any[]): any;
|
|
4649
4649
|
getDictionary(items?: ICollection<any> | any[]): TGeneric;
|
|
4650
|
-
toData(): (I | {
|
|
4650
|
+
toData(): (I$1 | {
|
|
4651
4651
|
[x: string]: any;
|
|
4652
4652
|
[x: number]: any;
|
|
4653
4653
|
[x: symbol]: any;
|
|
4654
4654
|
})[];
|
|
4655
|
-
toJSON(): (I | {
|
|
4655
|
+
toJSON(): (I$1 | {
|
|
4656
4656
|
[x: string]: any;
|
|
4657
4657
|
[x: number]: any;
|
|
4658
4658
|
[x: symbol]: any;
|
|
4659
4659
|
})[];
|
|
4660
4660
|
toJson(...args: any[]): string;
|
|
4661
|
-
[Symbol.iterator]: () => Iterator<I>;
|
|
4661
|
+
[Symbol.iterator]: () => Iterator<I$1>;
|
|
4662
4662
|
}
|
|
4663
4663
|
//#endregion
|
|
4664
4664
|
//#region src/browser/model.d.ts
|
|
@@ -5038,16 +5038,16 @@ declare class InvalidArgumentError extends BaseError {}
|
|
|
5038
5038
|
/**
|
|
5039
5039
|
* Helper type to extract instance type from constructor or mixin function
|
|
5040
5040
|
*/
|
|
5041
|
-
type Constructor<T = TGeneric> = MixinConstructor<T>;
|
|
5041
|
+
type Constructor<T$1 = TGeneric> = MixinConstructor<T$1>;
|
|
5042
5042
|
type Mixin<TBase extends Constructor> = (Base: TBase) => Constructor;
|
|
5043
5043
|
/**
|
|
5044
5044
|
* Helper type to convert union to intersection
|
|
5045
5045
|
*/
|
|
5046
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
5046
|
+
type UnionToIntersection<U$1> = (U$1 extends any ? (k: U$1) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
5047
5047
|
/**
|
|
5048
5048
|
* Helper type to get static side of a constructor
|
|
5049
5049
|
*/
|
|
5050
|
-
type Static<T> = { [K in keyof T]: T[K] };
|
|
5050
|
+
type Static<T$1> = { [K in keyof T$1]: T$1[K] };
|
|
5051
5051
|
/**
|
|
5052
5052
|
* Compose function that merges multiple classes and mixins
|
|
5053
5053
|
*
|
|
@@ -5111,7 +5111,7 @@ declare const getAttrName: (attrMethod: string) => string;
|
|
|
5111
5111
|
* @param callback
|
|
5112
5112
|
* @returns
|
|
5113
5113
|
*/
|
|
5114
|
-
declare const tap: <I>(instance: I, callback: (ins: I) => Promise<I> | I) => Promise<I> | I;
|
|
5114
|
+
declare const tap: <I$1>(instance: I$1, callback: (ins: I$1) => Promise<I$1> | I$1) => Promise<I$1> | I$1;
|
|
5115
5115
|
declare const compose: typeof compose$1;
|
|
5116
5116
|
declare const flatten: <A = any>(arr: A[]) => (A extends readonly (infer InnerArr)[] ? InnerArr : A)[];
|
|
5117
5117
|
declare const flattenDeep: (arr: any) => any;
|