@ember-data/model 5.4.0-alpha.32 → 5.4.0-alpha.34
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/addon/-private.js +1 -1
- package/addon/{has-many-Qm5aUQol.js → has-many-Mz5PIxmL.js} +10 -0
- package/addon/{has-many-Qm5aUQol.js.map → has-many-Mz5PIxmL.js.map} +1 -1
- package/addon/index.js +1 -1
- package/addon/model-eXqU5A13.js.map +1 -1
- package/package.json +19 -19
- package/unstable-preview-types/-private/attr.d.ts +170 -168
- package/unstable-preview-types/-private/attr.type-test.d.ts +3 -1
- package/unstable-preview-types/-private/belongs-to.d.ts +179 -178
- package/unstable-preview-types/-private/belongs-to.d.ts.map +1 -1
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts +3 -1
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts +7 -5
- package/unstable-preview-types/-private/errors.d.ts +288 -286
- package/unstable-preview-types/-private/has-many.d.ts +168 -167
- package/unstable-preview-types/-private/has-many.d.ts.map +1 -1
- package/unstable-preview-types/-private/has-many.type-test.d.ts +3 -1
- package/unstable-preview-types/-private/hooks.d.ts +12 -10
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts +60 -58
- package/unstable-preview-types/-private/many-array.d.ts +192 -189
- package/unstable-preview-types/-private/many-array.d.ts.map +1 -1
- package/unstable-preview-types/-private/model-for-mixin.d.ts +5 -3
- package/unstable-preview-types/-private/model-methods.d.ts +32 -30
- package/unstable-preview-types/-private/model.d.ts +103 -100
- package/unstable-preview-types/-private/model.type-test.d.ts +3 -1
- package/unstable-preview-types/-private/notify-changes.d.ts +7 -5
- package/unstable-preview-types/-private/promise-belongs-to.d.ts +45 -43
- package/unstable-preview-types/-private/promise-many-array.d.ts +127 -125
- package/unstable-preview-types/-private/promise-proxy-base.d.ts +35 -32
- package/unstable-preview-types/-private/record-state.d.ts +86 -84
- package/unstable-preview-types/-private/references/belongs-to.d.ts +471 -469
- package/unstable-preview-types/-private/references/has-many.d.ts +486 -484
- package/unstable-preview-types/-private/schema-provider.d.ts +25 -23
- package/unstable-preview-types/-private/util.d.ts +10 -8
- package/unstable-preview-types/-private.d.ts +11 -9
- package/unstable-preview-types/hooks.d.ts +4 -2
- package/unstable-preview-types/index.d.ts +74 -45
- package/unstable-preview-types/migration-support.d.ts +10 -8
|
@@ -1,101 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import type {
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
10
|
-
import type
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
declare module '@ember-data/model/-private/model' {
|
|
2
|
+
import type EmberObject from '@ember/object';
|
|
3
|
+
|
|
4
|
+
import type { Errors } from '@ember-data/model/-private/errors';
|
|
5
|
+
import type Store from '@ember-data/store';
|
|
6
|
+
|
|
7
|
+
import type { AttributeSchema, RelationshipSchema, RelationshipsSchema } from '@warp-drive/core-types/schema';
|
|
8
|
+
import type { JsonApiError } from '@ember-data/store/-types/q/record-data-json-api';
|
|
9
|
+
import type HasManyReference from '@ember-data/model/-private/references/has-many';
|
|
10
|
+
import type BelongsToReference from '@ember-data/model/-private/references/belongs-to';
|
|
11
|
+
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
12
|
+
import type { LegacySupport } from '@ember-data/model/-private/legacy-relationships-support';
|
|
13
|
+
import type { Cache } from '@warp-drive/core-types/cache';
|
|
14
|
+
import type RecordState from '@ember-data/model/-private/record-state';
|
|
15
|
+
|
|
16
|
+
export type ModelCreateArgs = {
|
|
17
|
+
_createProps: Record<string, unknown>;
|
|
18
|
+
// TODO @deprecate consider deprecating accessing record properties during init which the below is necessary for
|
|
19
|
+
_secretInit: {
|
|
20
|
+
identifier: StableRecordIdentifier;
|
|
21
|
+
cache: Cache;
|
|
22
|
+
store: Store;
|
|
23
|
+
cb: (record: Model, cache: Cache, identifier: StableRecordIdentifier, store: Store) => void;
|
|
24
|
+
};
|
|
23
25
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export type
|
|
98
|
-
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
26
|
+
|
|
27
|
+
class Model extends EmberObject {
|
|
28
|
+
store: Store;
|
|
29
|
+
errors: Errors;
|
|
30
|
+
currentState: RecordState;
|
|
31
|
+
adapterError?: Error;
|
|
32
|
+
toString(): string;
|
|
33
|
+
save(): Promise<this>;
|
|
34
|
+
hasMany<T extends keyof this & string>(key: T): HasManyReference<this, T>;
|
|
35
|
+
belongsTo<T extends keyof this & string>(key: T): BelongsToReference<this, T>;
|
|
36
|
+
eachRelationship<T extends Model, K extends keyof T & string>(
|
|
37
|
+
callback: (this: T, key: K, meta: RelationshipSchema) => void,
|
|
38
|
+
binding?: T
|
|
39
|
+
): void;
|
|
40
|
+
eachAttribute<T extends Model, K extends keyof T & string>(
|
|
41
|
+
callback: (this: T, key: K, meta: AttributeSchema) => void,
|
|
42
|
+
binding?: T
|
|
43
|
+
): void;
|
|
44
|
+
invalidErrorsChanged(errors: JsonApiError[]): void;
|
|
45
|
+
rollbackAttributes(): void;
|
|
46
|
+
changedAttributes(): Record<string, [unknown, unknown]>;
|
|
47
|
+
id: string;
|
|
48
|
+
isValid: boolean;
|
|
49
|
+
isSaving: boolean;
|
|
50
|
+
isNew: boolean;
|
|
51
|
+
isEmpty: boolean;
|
|
52
|
+
isDeleted: boolean;
|
|
53
|
+
hasDirtyAttributes: boolean;
|
|
54
|
+
isLoaded: boolean;
|
|
55
|
+
isLoading: boolean;
|
|
56
|
+
isReloading: boolean;
|
|
57
|
+
dirtyType: string;
|
|
58
|
+
deleteRecord(): void;
|
|
59
|
+
unloadRecord(): void;
|
|
60
|
+
serialize(): Record<string, unknown>;
|
|
61
|
+
|
|
62
|
+
static modelName: string;
|
|
63
|
+
static fields: Map<keyof this & string, 'attribute' | 'belongsTo' | 'hasMany'>;
|
|
64
|
+
static attributes: Map<keyof this & string, AttributeSchema>;
|
|
65
|
+
static relationshipsByName: Map<keyof this & string, RelationshipSchema>;
|
|
66
|
+
static eachAttribute<K extends keyof this & string>(
|
|
67
|
+
callback: (this: ModelSchema<this>, key: K, attribute: AttributeSchema) => void,
|
|
68
|
+
binding?: T
|
|
69
|
+
): void;
|
|
70
|
+
static eachRelationship<K extends keyof this & string>(
|
|
71
|
+
callback: (this: ModelSchema<this>, key: K, relationship: RelationshipSchema) => void,
|
|
72
|
+
binding?: T
|
|
73
|
+
): void;
|
|
74
|
+
static eachTransformedAttribute<K extends keyof this & string>(
|
|
75
|
+
callback: (this: ModelSchema<this>, key: K, type: string | null) => void,
|
|
76
|
+
binding?: T
|
|
77
|
+
): void;
|
|
78
|
+
|
|
79
|
+
static toString(): string;
|
|
80
|
+
static isModel: true;
|
|
81
|
+
static relationshipsObject: RelationshipsSchema;
|
|
82
|
+
static extend(...mixins: unknown[]): typeof Model;
|
|
83
|
+
static create(createArgs: ModelCreateArgs): Model;
|
|
84
|
+
static __isMixin?: true;
|
|
85
|
+
static __mixin?: unknown;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface Model {
|
|
89
|
+
constructor: typeof Model;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { Model };
|
|
93
|
+
|
|
94
|
+
export type StaticModel = typeof Model;
|
|
95
|
+
|
|
96
|
+
export const LEGACY_SUPPORT: Map<StableRecordIdentifier | Model, LegacySupport>;
|
|
97
|
+
|
|
98
|
+
export type ModelFactory = { class: StaticModel };
|
|
99
|
+
export type FactoryCache = Record<string, ModelFactory>;
|
|
100
|
+
// we put this on the store for interop because it's used by modelFor and
|
|
101
|
+
// instantiateRecord as well.
|
|
102
|
+
export type ModelStore = Store & { _modelFactoryCache: FactoryCache };
|
|
103
|
+
|
|
104
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
|
|
1
|
+
declare module '@ember-data/model/-private/notify-changes' {
|
|
2
|
+
import type Store from '@ember-data/store';
|
|
3
|
+
import type { NotificationType } from '@ember-data/store/-private/managers/notification-manager';
|
|
4
|
+
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
5
|
+
import type { Model } from '@ember-data/model/-private/model';
|
|
6
|
+
export default function notifyChanges(identifier: StableRecordIdentifier, value: NotificationType, key: string | undefined, record: Model, store: Store): void;
|
|
7
|
+
}
|
|
6
8
|
//# sourceMappingURL=notify-changes.d.ts.map
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="ember-source/types" />
|
|
3
|
-
|
|
4
|
-
import type
|
|
5
|
-
import type
|
|
6
|
-
import type
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
declare module '@ember-data/model/-private/promise-belongs-to' {
|
|
2
|
+
/// <reference types="ember-source/types" />
|
|
3
|
+
/// <reference types="ember-source/types" />
|
|
4
|
+
import type PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
|
|
5
|
+
import type ObjectProxy from '@ember/object/proxy';
|
|
6
|
+
import type Store from '@ember-data/store';
|
|
7
|
+
import type { OpaqueRecordInstance } from '@ember-data/store/-types/q/record-instance';
|
|
8
|
+
import type { TypeFromInstanceOrString } from '@warp-drive/core-types/record';
|
|
9
|
+
import type { LegacySupport } from '@ember-data/model/-private/legacy-relationships-support';
|
|
10
|
+
export interface BelongsToProxyMeta<T = unknown> {
|
|
11
|
+
key: string;
|
|
12
|
+
store: Store;
|
|
13
|
+
legacySupport: LegacySupport;
|
|
14
|
+
modelName: TypeFromInstanceOrString<T>;
|
|
15
|
+
}
|
|
16
|
+
export interface BelongsToProxyCreateArgs<T = unknown> {
|
|
17
|
+
promise: Promise<T | null>;
|
|
18
|
+
content?: T | null;
|
|
19
|
+
_belongsToState: BelongsToProxyMeta<T>;
|
|
20
|
+
}
|
|
21
|
+
interface PromiseObjectType<T> extends PromiseProxyMixin<T | null>, ObjectProxy<T> {
|
|
22
|
+
new <PT>(...args: unknown[]): PromiseObjectType<PT>;
|
|
23
|
+
}
|
|
24
|
+
declare class PromiseObjectType<T> {
|
|
25
|
+
}
|
|
26
|
+
declare const Extended: PromiseObjectType<OpaqueRecordInstance>;
|
|
27
|
+
/**
|
|
28
|
+
@module @ember-data/model
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
A PromiseBelongsTo is a PromiseObject that also proxies certain method calls
|
|
32
|
+
to the underlying belongsTo model.
|
|
33
|
+
Right now we proxy:
|
|
34
|
+
* `reload()`
|
|
35
|
+
@class PromiseBelongsTo
|
|
36
|
+
@extends PromiseObject
|
|
37
|
+
@private
|
|
38
|
+
*/
|
|
39
|
+
declare class PromiseBelongsTo<T = unknown> extends Extended<T> {
|
|
40
|
+
_belongsToState: BelongsToProxyMeta<T>;
|
|
41
|
+
get id(): string | null;
|
|
42
|
+
get meta(): void;
|
|
43
|
+
reload(options: Record<string, unknown>): Promise<this>;
|
|
44
|
+
}
|
|
45
|
+
export { PromiseBelongsTo };
|
|
14
46
|
}
|
|
15
|
-
export interface BelongsToProxyCreateArgs<T = unknown> {
|
|
16
|
-
promise: Promise<T | null>;
|
|
17
|
-
content?: T | null;
|
|
18
|
-
_belongsToState: BelongsToProxyMeta<T>;
|
|
19
|
-
}
|
|
20
|
-
interface PromiseObjectType<T> extends PromiseProxyMixin<T | null>, ObjectProxy<T> {
|
|
21
|
-
new <PT>(...args: unknown[]): PromiseObjectType<PT>;
|
|
22
|
-
}
|
|
23
|
-
declare class PromiseObjectType<T> {
|
|
24
|
-
}
|
|
25
|
-
declare const Extended: PromiseObjectType<OpaqueRecordInstance>;
|
|
26
|
-
/**
|
|
27
|
-
@module @ember-data/model
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
A PromiseBelongsTo is a PromiseObject that also proxies certain method calls
|
|
31
|
-
to the underlying belongsTo model.
|
|
32
|
-
Right now we proxy:
|
|
33
|
-
* `reload()`
|
|
34
|
-
@class PromiseBelongsTo
|
|
35
|
-
@extends PromiseObject
|
|
36
|
-
@private
|
|
37
|
-
*/
|
|
38
|
-
declare class PromiseBelongsTo<T = unknown> extends Extended<T> {
|
|
39
|
-
_belongsToState: BelongsToProxyMeta<T>;
|
|
40
|
-
get id(): string | null;
|
|
41
|
-
get meta(): void;
|
|
42
|
-
reload(options: Record<string, unknown>): Promise<this>;
|
|
43
|
-
}
|
|
44
|
-
export { PromiseBelongsTo };
|
|
45
47
|
//# sourceMappingURL=promise-belongs-to.d.ts.map
|
|
@@ -1,127 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
declare module '@ember-data/model/-private/promise-many-array' {
|
|
2
|
+
import type { BaseFinderOptions } from '@ember-data/store/-types/q/store';
|
|
3
|
+
import type ManyArray from '@ember-data/model/-private/many-array';
|
|
4
|
+
export interface HasManyProxyCreateArgs<T = unknown> {
|
|
5
|
+
promise: Promise<ManyArray<T>>;
|
|
6
|
+
content?: ManyArray<T>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
@module @ember-data/model
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
This class is returned as the result of accessing an async hasMany relationship
|
|
13
|
+
on an instance of a Model extending from `@ember-data/model`.
|
|
14
|
+
|
|
15
|
+
A PromiseManyArray is an iterable proxy that allows templates to consume related
|
|
16
|
+
ManyArrays and update once their contents are no longer pending.
|
|
17
|
+
|
|
18
|
+
In your JS code you should resolve the promise first.
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
const comments = await post.comments;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
@class PromiseManyArray
|
|
25
|
+
@public
|
|
26
|
+
*/
|
|
27
|
+
export default class PromiseManyArray<T = unknown> {
|
|
28
|
+
promise: Promise<ManyArray<T>> | null;
|
|
29
|
+
isDestroyed: boolean;
|
|
30
|
+
content: ManyArray<T> | null;
|
|
31
|
+
constructor(promise: Promise<ManyArray<T>>, content?: ManyArray<T>);
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve the length of the content
|
|
34
|
+
* @property length
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
get length(): number;
|
|
38
|
+
/**
|
|
39
|
+
* Iterate the proxied content. Called by the glimmer iterator in #each
|
|
40
|
+
* We do not guarantee that forEach will always be available. This
|
|
41
|
+
* may eventually be made to use Symbol.Iterator once glimmer supports it.
|
|
42
|
+
*
|
|
43
|
+
* @method forEach
|
|
44
|
+
* @param cb
|
|
45
|
+
* @return
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
forEach(cb: (item: T, index: number, array: T[]) => void): void;
|
|
49
|
+
/**
|
|
50
|
+
* Reload the relationship
|
|
51
|
+
* @method reload
|
|
52
|
+
* @public
|
|
53
|
+
* @param options
|
|
54
|
+
* @return
|
|
55
|
+
*/
|
|
56
|
+
reload(options: Omit<BaseFinderOptions, ''>): this;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the loading promise is still pending
|
|
59
|
+
*
|
|
60
|
+
* @property {boolean} isPending
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
isPending: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the loading promise rejected
|
|
66
|
+
*
|
|
67
|
+
* @property {boolean} isRejected
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
isRejected: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the loading promise succeeded
|
|
73
|
+
*
|
|
74
|
+
* @property {boolean} isFulfilled
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
isFulfilled: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the loading promise completed (resolved or rejected)
|
|
80
|
+
*
|
|
81
|
+
* @property {boolean} isSettled
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
isSettled: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* chain this promise
|
|
87
|
+
*
|
|
88
|
+
* @method then
|
|
89
|
+
* @public
|
|
90
|
+
* @param success
|
|
91
|
+
* @param fail
|
|
92
|
+
* @return Promise
|
|
93
|
+
*/
|
|
94
|
+
then(s: Parameters<Promise<ManyArray<T>>['then']>[0], f?: Parameters<Promise<ManyArray<T>>['then']>[1]): Promise<unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* catch errors thrown by this promise
|
|
97
|
+
* @method catch
|
|
98
|
+
* @public
|
|
99
|
+
* @param callback
|
|
100
|
+
* @return Promise
|
|
101
|
+
*/
|
|
102
|
+
catch(cb: Parameters<Promise<ManyArray<T>>['catch']>[0]): Promise<unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* run cleanup after this promise completes
|
|
105
|
+
*
|
|
106
|
+
* @method finally
|
|
107
|
+
* @public
|
|
108
|
+
* @param callback
|
|
109
|
+
* @return Promise
|
|
110
|
+
*/
|
|
111
|
+
finally(cb: Parameters<Promise<ManyArray<T>>['finally']>[0]): Promise<ManyArray<T>>;
|
|
112
|
+
destroy(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Retrieve the links for this relationship
|
|
115
|
+
* @property links
|
|
116
|
+
* @public
|
|
117
|
+
*/
|
|
118
|
+
get links(): import("@warp-drive/core-types/spec/raw").Links | null | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Retrieve the meta for this relationship
|
|
121
|
+
* @property meta
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
get meta(): Record<string, unknown> | null | undefined;
|
|
125
|
+
_update(promise: Promise<ManyArray<T>>, content?: ManyArray<T>): void;
|
|
126
|
+
static create<T>({ promise, content }: HasManyProxyCreateArgs<T>): PromiseManyArray<T>;
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
//# sourceMappingURL=promise-many-array.d.ts.map
|