@ember-data-types/store 5.6.0-alpha.0 → 5.6.0-alpha.11
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 -5
- package/package.json +1 -1
- package/unstable-preview-types/-private.d.ts +1 -30
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/configure.d.ts +2 -6
- package/unstable-preview-types/configure.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +2 -224
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/types.d.ts +1 -4
- package/unstable-preview-types/types.d.ts.map +1 -1
- package/unstable-preview-types/-private/cache-handler/handler.d.ts +0 -62
- package/unstable-preview-types/-private/cache-handler/handler.d.ts.map +0 -1
- package/unstable-preview-types/-private/cache-handler/types.d.ts +0 -107
- package/unstable-preview-types/-private/cache-handler/types.d.ts.map +0 -1
- package/unstable-preview-types/-private/cache-handler/utils.d.ts +0 -34
- package/unstable-preview-types/-private/cache-handler/utils.d.ts.map +0 -1
- package/unstable-preview-types/-private/caches/cache-utils.d.ts +0 -11
- package/unstable-preview-types/-private/caches/cache-utils.d.ts.map +0 -1
- package/unstable-preview-types/-private/caches/identifier-cache.d.ts +0 -180
- package/unstable-preview-types/-private/caches/identifier-cache.d.ts.map +0 -1
- package/unstable-preview-types/-private/caches/instance-cache.d.ts +0 -64
- package/unstable-preview-types/-private/caches/instance-cache.d.ts.map +0 -1
- package/unstable-preview-types/-private/caches/resource-utils.d.ts +0 -12
- package/unstable-preview-types/-private/caches/resource-utils.d.ts.map +0 -1
- package/unstable-preview-types/-private/debug/utils.d.ts +0 -9
- package/unstable-preview-types/-private/debug/utils.d.ts.map +0 -1
- package/unstable-preview-types/-private/document.d.ts +0 -155
- package/unstable-preview-types/-private/document.d.ts.map +0 -1
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +0 -179
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +0 -1
- package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +0 -19
- package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts.map +0 -1
- package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +0 -31
- package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts.map +0 -1
- package/unstable-preview-types/-private/managers/cache-manager.d.ts +0 -463
- package/unstable-preview-types/-private/managers/cache-manager.d.ts.map +0 -1
- package/unstable-preview-types/-private/managers/notification-manager.d.ts +0 -101
- package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +0 -1
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts +0 -101
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +0 -1
- package/unstable-preview-types/-private/network/request-cache.d.ts +0 -109
- package/unstable-preview-types/-private/network/request-cache.d.ts.map +0 -1
- package/unstable-preview-types/-private/new-core-tmp/promise-state.d.ts +0 -289
- package/unstable-preview-types/-private/new-core-tmp/promise-state.d.ts.map +0 -1
- package/unstable-preview-types/-private/new-core-tmp/reactivity/configure.d.ts +0 -92
- package/unstable-preview-types/-private/new-core-tmp/reactivity/configure.d.ts.map +0 -1
- package/unstable-preview-types/-private/new-core-tmp/reactivity/internal.d.ts +0 -172
- package/unstable-preview-types/-private/new-core-tmp/reactivity/internal.d.ts.map +0 -1
- package/unstable-preview-types/-private/new-core-tmp/reactivity/signal.d.ts +0 -32
- package/unstable-preview-types/-private/new-core-tmp/reactivity/signal.d.ts.map +0 -1
- package/unstable-preview-types/-private/new-core-tmp/request-state.d.ts +0 -276
- package/unstable-preview-types/-private/new-core-tmp/request-state.d.ts.map +0 -1
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +0 -145
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +0 -1
- package/unstable-preview-types/-private/record-arrays/many-array.d.ts +0 -203
- package/unstable-preview-types/-private/record-arrays/many-array.d.ts.map +0 -1
- package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +0 -118
- package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +0 -1
- package/unstable-preview-types/-private/store-service.d.ts +0 -1601
- package/unstable-preview-types/-private/store-service.d.ts.map +0 -1
- package/unstable-preview-types/-private/store-service.type-test.d.ts +0 -4
- package/unstable-preview-types/-private/store-service.type-test.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/coerce-id.d.ts +0 -10
- package/unstable-preview-types/-private/utils/coerce-id.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/construct-resource.d.ts +0 -9
- package/unstable-preview-types/-private/utils/construct-resource.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +0 -4
- package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +0 -4
- package/unstable-preview-types/-private/utils/normalize-model-name.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +0 -4
- package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts.map +0 -1
- package/unstable-preview-types/-types/overview.d.ts +0 -21
- package/unstable-preview-types/-types/overview.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/cache-capabilities-manager.d.ts +0 -110
- package/unstable-preview-types/-types/q/cache-capabilities-manager.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/ds-model.d.ts +0 -25
- package/unstable-preview-types/-types/q/ds-model.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/identifier.d.ts +0 -193
- package/unstable-preview-types/-types/q/identifier.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/promise-proxies.d.ts +0 -4
- package/unstable-preview-types/-types/q/promise-proxies.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/record-data-json-api.d.ts +0 -36
- package/unstable-preview-types/-types/q/record-data-json-api.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/record-instance.d.ts +0 -29
- package/unstable-preview-types/-types/q/record-instance.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/schema-service.d.ts +0 -354
- package/unstable-preview-types/-types/q/schema-service.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/store.d.ts +0 -38
- package/unstable-preview-types/-types/q/store.d.ts.map +0 -1
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/store/-private/record-arrays/many-array' {
|
|
2
|
-
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
3
|
-
import type { Cache } from '@warp-drive/core-types/cache';
|
|
4
|
-
import type { TypedRecordInstance, TypeFromInstance, TypeFromInstanceOrString } from '@warp-drive/core-types/record';
|
|
5
|
-
import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/json-api-raw';
|
|
6
|
-
import type { BaseFinderOptions, ModelSchema } from '@ember-data/store/types';
|
|
7
|
-
import { type WarpDriveSignal } from '@ember-data/store/-private/new-core-tmp/reactivity/internal';
|
|
8
|
-
import type { CreateRecordProperties, Store } from '@ember-data/store/-private/store-service';
|
|
9
|
-
import type { MinimumManager } from '@ember-data/store/-private/record-arrays/identifier-array';
|
|
10
|
-
import { IdentifierArray, MUTATE } from '@ember-data/store/-private/record-arrays/identifier-array';
|
|
11
|
-
import type { NativeProxy } from '@ember-data/store/-private/record-arrays/native-proxy-type-fix';
|
|
12
|
-
export interface ManyArrayCreateArgs<T> {
|
|
13
|
-
identifiers: StableRecordIdentifier<TypeFromInstanceOrString<T>>[];
|
|
14
|
-
type: TypeFromInstanceOrString<T>;
|
|
15
|
-
store: Store;
|
|
16
|
-
allowMutation: boolean;
|
|
17
|
-
manager: MinimumManager;
|
|
18
|
-
identifier: StableRecordIdentifier;
|
|
19
|
-
cache: Cache;
|
|
20
|
-
meta: Record<string, unknown> | null;
|
|
21
|
-
links: Links | PaginationLinks | null;
|
|
22
|
-
key: string;
|
|
23
|
-
isPolymorphic: boolean;
|
|
24
|
-
isAsync: boolean;
|
|
25
|
-
_inverseIsAsync: boolean;
|
|
26
|
-
isLoaded: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
A `ManyArray` is a `MutableArray` that represents the contents of a has-many
|
|
30
|
-
relationship.
|
|
31
|
-
|
|
32
|
-
The `ManyArray` is instantiated lazily the first time the relationship is
|
|
33
|
-
requested.
|
|
34
|
-
|
|
35
|
-
This class is not intended to be directly instantiated by consuming applications.
|
|
36
|
-
|
|
37
|
-
### Inverses
|
|
38
|
-
|
|
39
|
-
Often, the relationships in Ember Data applications will have
|
|
40
|
-
an inverse. For example, imagine the following models are
|
|
41
|
-
defined:
|
|
42
|
-
|
|
43
|
-
```app/models/post.js
|
|
44
|
-
import Model, { hasMany } from '@ember-data/model';
|
|
45
|
-
|
|
46
|
-
export default class PostModel extends Model {
|
|
47
|
-
@hasMany('comment') comments;
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```app/models/comment.js
|
|
52
|
-
import Model, { belongsTo } from '@ember-data/model';
|
|
53
|
-
|
|
54
|
-
export default class CommentModel extends Model {
|
|
55
|
-
@belongsTo('post') post;
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If you created a new instance of `Post` and added
|
|
60
|
-
a `Comment` record to its `comments` has-many
|
|
61
|
-
relationship, you would expect the comment's `post`
|
|
62
|
-
property to be set to the post that contained
|
|
63
|
-
the has-many.
|
|
64
|
-
|
|
65
|
-
We call the record to which a relationship belongs-to the
|
|
66
|
-
relationship's _owner_.
|
|
67
|
-
|
|
68
|
-
@class ManyArray
|
|
69
|
-
@public
|
|
70
|
-
*/
|
|
71
|
-
export class RelatedCollection<T = unknown> extends IdentifierArray<T> {
|
|
72
|
-
isAsync: boolean;
|
|
73
|
-
/**
|
|
74
|
-
The loading state of this array
|
|
75
|
-
|
|
76
|
-
@property isLoaded
|
|
77
|
-
@type {Boolean}
|
|
78
|
-
@public
|
|
79
|
-
*/
|
|
80
|
-
isLoaded: boolean;
|
|
81
|
-
/**
|
|
82
|
-
`true` if the relationship is polymorphic, `false` otherwise.
|
|
83
|
-
|
|
84
|
-
@property isPolymorphic
|
|
85
|
-
@type {Boolean}
|
|
86
|
-
@private
|
|
87
|
-
*/
|
|
88
|
-
isPolymorphic: boolean;
|
|
89
|
-
_inverseIsAsync: boolean;
|
|
90
|
-
/**
|
|
91
|
-
Metadata associated with the request for async hasMany relationships.
|
|
92
|
-
|
|
93
|
-
Example
|
|
94
|
-
|
|
95
|
-
Given that the server returns the following JSON payload when fetching a
|
|
96
|
-
hasMany relationship:
|
|
97
|
-
|
|
98
|
-
```js
|
|
99
|
-
{
|
|
100
|
-
"comments": [{
|
|
101
|
-
"id": 1,
|
|
102
|
-
"comment": "This is the first comment",
|
|
103
|
-
}, {
|
|
104
|
-
// ...
|
|
105
|
-
}],
|
|
106
|
-
|
|
107
|
-
"meta": {
|
|
108
|
-
"page": 1,
|
|
109
|
-
"total": 5
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
You can then access the meta data via the `meta` property:
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
let comments = await post.comments;
|
|
118
|
-
let meta = comments.meta;
|
|
119
|
-
|
|
120
|
-
// meta.page => 1
|
|
121
|
-
// meta.total => 5
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
@property meta
|
|
125
|
-
@type {Object | null}
|
|
126
|
-
@public
|
|
127
|
-
*/
|
|
128
|
-
meta: Record<string, unknown> | null;
|
|
129
|
-
/**
|
|
130
|
-
* Retrieve the links for this relationship
|
|
131
|
-
*
|
|
132
|
-
@property links
|
|
133
|
-
@type {Object | null}
|
|
134
|
-
@public
|
|
135
|
-
*/
|
|
136
|
-
links: Links | PaginationLinks | null;
|
|
137
|
-
identifier: StableRecordIdentifier;
|
|
138
|
-
cache: Cache;
|
|
139
|
-
_manager: MinimumManager;
|
|
140
|
-
store: Store;
|
|
141
|
-
key: string;
|
|
142
|
-
type: ModelSchema;
|
|
143
|
-
modelName: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
|
|
144
|
-
constructor(options: ManyArrayCreateArgs<T>);
|
|
145
|
-
[MUTATE](target: StableRecordIdentifier[], receiver: typeof NativeProxy<StableRecordIdentifier[], T[]>, prop: string, args: unknown[], _SIGNAL: WarpDriveSignal): unknown;
|
|
146
|
-
notify(): void;
|
|
147
|
-
/**
|
|
148
|
-
Reloads all of the records in the manyArray. If the manyArray
|
|
149
|
-
holds a relationship that was originally fetched using a links url
|
|
150
|
-
EmberData will revisit the original links url to repopulate the
|
|
151
|
-
relationship.
|
|
152
|
-
|
|
153
|
-
If the ManyArray holds the result of a `store.query()` reload will
|
|
154
|
-
re-run the original query.
|
|
155
|
-
|
|
156
|
-
Example
|
|
157
|
-
|
|
158
|
-
```javascript
|
|
159
|
-
let user = store.peekRecord('user', '1')
|
|
160
|
-
await login(user);
|
|
161
|
-
|
|
162
|
-
let permissions = await user.permissions;
|
|
163
|
-
await permissions.reload();
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
@method reload
|
|
167
|
-
@public
|
|
168
|
-
*/
|
|
169
|
-
reload(options?: BaseFinderOptions): Promise<this>;
|
|
170
|
-
/**
|
|
171
|
-
Saves all of the records in the `ManyArray`.
|
|
172
|
-
|
|
173
|
-
Note: this API can only be used in legacy mode with a configured Adapter.
|
|
174
|
-
|
|
175
|
-
Example
|
|
176
|
-
|
|
177
|
-
```javascript
|
|
178
|
-
const { content: { data: inbox } } = await store.request(findRecord({ type: 'inbox', id: '1' }));
|
|
179
|
-
|
|
180
|
-
let messages = await inbox.messages;
|
|
181
|
-
messages.forEach((message) => {
|
|
182
|
-
message.isRead = true;
|
|
183
|
-
});
|
|
184
|
-
messages.save();
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
@method save
|
|
188
|
-
@public
|
|
189
|
-
@return {PromiseArray} promise
|
|
190
|
-
*/
|
|
191
|
-
/**
|
|
192
|
-
Create a child record within the owner
|
|
193
|
-
|
|
194
|
-
@method createRecord
|
|
195
|
-
@public
|
|
196
|
-
@param {Object} hash
|
|
197
|
-
@return {Model} record
|
|
198
|
-
*/
|
|
199
|
-
createRecord(hash: CreateRecordProperties<T>): T;
|
|
200
|
-
destroy(): void;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
//# sourceMappingURL=many-array.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"many-array.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/many-array.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAEV,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGlE,OAAO,EAAsC,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAU,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,WAAW,EAAE,sBAAsB,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,IAAI,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IAExB,UAAU,EAAE,sBAAsB,CAAC;IACn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AAE,EAAE,CAAC,EAAE,CAAC,EAC3D,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EAAE,EACf,OAAO,EAAE,eAAe,GACvB,OAAO;IA4MV,MAAM;IAIN;;;;;;;;;;;;;;;;;;;;;MAqBE;IACF,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IASlD;;;;;;;;;;;;;;;;;;;;MAoBE;IAEF;;;;;;;MAOE;IACF,YAAY,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,CAAC;IAShD,OAAO;CAGR"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/store/-private/record-arrays/native-proxy-type-fix' {
|
|
2
|
-
interface ProxyHandler<T extends object> {
|
|
3
|
-
/**
|
|
4
|
-
* A trap method for a function call.
|
|
5
|
-
* @param target The original callable object which is being proxied.
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
apply?(target: T, thisArg: any, argArray: any[]): any;
|
|
9
|
-
/**
|
|
10
|
-
* A trap for the `new` operator.
|
|
11
|
-
* @param target The original object which is being proxied.
|
|
12
|
-
* @param newTarget The constructor that was originally called.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
construct?(target: T, argArray: any[], newTarget: Function): object;
|
|
16
|
-
/**
|
|
17
|
-
* A trap for `Object.defineProperty()`.
|
|
18
|
-
* @param target The original object which is being proxied.
|
|
19
|
-
* @return A `Boolean` indicating whether or not the property has been defined.
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* A trap for the `delete` operator.
|
|
25
|
-
* @param target The original object which is being proxied.
|
|
26
|
-
* @param p The name or `Symbol` of the property to delete.
|
|
27
|
-
* @return A `Boolean` indicating whether or not the property was deleted.
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
deleteProperty?(target: T, p: string | symbol): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* A trap for getting a property value.
|
|
33
|
-
* @param target The original object which is being proxied.
|
|
34
|
-
* @param p The name or `Symbol` of the property to get.
|
|
35
|
-
* @param receiver The proxy or an object that inherits from the proxy.
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
get?(target: T, p: string | symbol, receiver: any): any;
|
|
39
|
-
/**
|
|
40
|
-
* A trap for `Object.getOwnPropertyDescriptor()`.
|
|
41
|
-
* @param target The original object which is being proxied.
|
|
42
|
-
* @param p The name of the property whose description should be retrieved.
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* A trap for the `[[GetPrototypeOf]]` internal method.
|
|
48
|
-
* @param target The original object which is being proxied.
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
51
|
-
getPrototypeOf?(target: T): object | null;
|
|
52
|
-
/**
|
|
53
|
-
* A trap for the `in` operator.
|
|
54
|
-
* @param target The original object which is being proxied.
|
|
55
|
-
* @param p The name or `Symbol` of the property to check for existence.
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
has?(target: T, p: string | symbol): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* A trap for `Object.isExtensible()`.
|
|
61
|
-
* @param target The original object which is being proxied.
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
isExtensible?(target: T): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* A trap for `Reflect.ownKeys()`.
|
|
67
|
-
* @param target The original object which is being proxied.
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
ownKeys?(target: T): ArrayLike<string | symbol>;
|
|
71
|
-
/**
|
|
72
|
-
* A trap for `Object.preventExtensions()`.
|
|
73
|
-
* @param target The original object which is being proxied.
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
preventExtensions?(target: T): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* A trap for setting a property value.
|
|
79
|
-
* @param target The original object which is being proxied.
|
|
80
|
-
* @param p The name or `Symbol` of the property to set.
|
|
81
|
-
* @param receiver The object to which the assignment was originally directed.
|
|
82
|
-
* @return A `Boolean` indicating whether or not the property was set.
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* A trap for `Object.setPrototypeOf()`.
|
|
88
|
-
* @param target The original object which is being proxied.
|
|
89
|
-
* @param newPrototype The object's new prototype or `null`.
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
|
-
setPrototypeOf?(target: T, v: object | null): boolean;
|
|
93
|
-
}
|
|
94
|
-
interface ProxyConstructor {
|
|
95
|
-
/**
|
|
96
|
-
* Creates a revocable Proxy object.
|
|
97
|
-
* @param target A target object to wrap with Proxy.
|
|
98
|
-
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
revocable<T extends object>(target: T, handler: ProxyHandler<T>): {
|
|
102
|
-
proxy: T;
|
|
103
|
-
revoke: () => void;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the
|
|
107
|
-
* original object, but which may redefine fundamental Object operations like getting, setting, and defining
|
|
108
|
-
* properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs.
|
|
109
|
-
* @param target A target object to wrap with Proxy.
|
|
110
|
-
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
new <TSource extends object, TTarget extends object>(target: TSource, handler: ProxyHandler<TSource>): TTarget;
|
|
114
|
-
}
|
|
115
|
-
export const NativeProxy: ProxyConstructor;
|
|
116
|
-
export {};
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=native-proxy-type-fix.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native-proxy-type-fix.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/native-proxy-type-fix.ts"],"names":[],"mappings":"AAOA,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM;IACrC;;;;OAIG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAEtD;;;;;OAKG;IAEH,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM,CAAC;IAEpE;;;;;OAKG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAE/F;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAExD;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,GAAG,CAAC;IAExD;;;;;OAKG;IACH,wBAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;IAEzF;;;;OAIG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;IAE1C;;;;;OAKG;IACH,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,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