@ember-data-types/store 5.4.0-alpha.49

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.
Files changed (73) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +193 -0
  3. package/ember-data-logo-dark.svg +12 -0
  4. package/ember-data-logo-light.svg +12 -0
  5. package/package.json +20 -0
  6. package/unstable-preview-types/-private/cache-handler.d.ts +100 -0
  7. package/unstable-preview-types/-private/cache-handler.d.ts.map +1 -0
  8. package/unstable-preview-types/-private/caches/cache-utils.d.ts +11 -0
  9. package/unstable-preview-types/-private/caches/cache-utils.d.ts.map +1 -0
  10. package/unstable-preview-types/-private/caches/identifier-cache.d.ts +182 -0
  11. package/unstable-preview-types/-private/caches/identifier-cache.d.ts.map +1 -0
  12. package/unstable-preview-types/-private/caches/instance-cache.d.ts +63 -0
  13. package/unstable-preview-types/-private/caches/instance-cache.d.ts.map +1 -0
  14. package/unstable-preview-types/-private/caches/resource-utils.d.ts +12 -0
  15. package/unstable-preview-types/-private/caches/resource-utils.d.ts.map +1 -0
  16. package/unstable-preview-types/-private/document.d.ts +146 -0
  17. package/unstable-preview-types/-private/document.d.ts.map +1 -0
  18. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +179 -0
  19. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  20. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +19 -0
  21. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  22. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +29 -0
  23. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  24. package/unstable-preview-types/-private/managers/cache-manager.d.ts +442 -0
  25. package/unstable-preview-types/-private/managers/cache-manager.d.ts.map +1 -0
  26. package/unstable-preview-types/-private/managers/notification-manager.d.ts +98 -0
  27. package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +1 -0
  28. package/unstable-preview-types/-private/managers/record-array-manager.d.ts +97 -0
  29. package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +1 -0
  30. package/unstable-preview-types/-private/network/request-cache.d.ts +109 -0
  31. package/unstable-preview-types/-private/network/request-cache.d.ts.map +1 -0
  32. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +133 -0
  33. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -0
  34. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
  35. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  36. package/unstable-preview-types/-private/store-service.d.ts +1554 -0
  37. package/unstable-preview-types/-private/store-service.d.ts.map +1 -0
  38. package/unstable-preview-types/-private/utils/coerce-id.d.ts +10 -0
  39. package/unstable-preview-types/-private/utils/coerce-id.d.ts.map +1 -0
  40. package/unstable-preview-types/-private/utils/construct-resource.d.ts +10 -0
  41. package/unstable-preview-types/-private/utils/construct-resource.d.ts.map +1 -0
  42. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +7 -0
  43. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts.map +1 -0
  44. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +4 -0
  45. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts.map +1 -0
  46. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +4 -0
  47. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts.map +1 -0
  48. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +4 -0
  49. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts.map +1 -0
  50. package/unstable-preview-types/-private.d.ts +20 -0
  51. package/unstable-preview-types/-private.d.ts.map +1 -0
  52. package/unstable-preview-types/-types/overview.d.ts +21 -0
  53. package/unstable-preview-types/-types/overview.d.ts.map +1 -0
  54. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts +107 -0
  55. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts.map +1 -0
  56. package/unstable-preview-types/-types/q/cache.d.ts +47 -0
  57. package/unstable-preview-types/-types/q/cache.d.ts.map +1 -0
  58. package/unstable-preview-types/-types/q/ds-model.d.ts +15 -0
  59. package/unstable-preview-types/-types/q/ds-model.d.ts.map +1 -0
  60. package/unstable-preview-types/-types/q/identifier.d.ts +171 -0
  61. package/unstable-preview-types/-types/q/identifier.d.ts.map +1 -0
  62. package/unstable-preview-types/-types/q/promise-proxies.d.ts +4 -0
  63. package/unstable-preview-types/-types/q/promise-proxies.d.ts.map +1 -0
  64. package/unstable-preview-types/-types/q/record-data-json-api.d.ts +36 -0
  65. package/unstable-preview-types/-types/q/record-data-json-api.d.ts.map +1 -0
  66. package/unstable-preview-types/-types/q/record-instance.d.ts +29 -0
  67. package/unstable-preview-types/-types/q/record-instance.d.ts.map +1 -0
  68. package/unstable-preview-types/-types/q/schema-service.d.ts +214 -0
  69. package/unstable-preview-types/-types/q/schema-service.d.ts.map +1 -0
  70. package/unstable-preview-types/-types/q/store.d.ts +17 -0
  71. package/unstable-preview-types/-types/q/store.d.ts.map +1 -0
  72. package/unstable-preview-types/index.d.ts +220 -0
  73. package/unstable-preview-types/index.d.ts.map +1 -0
@@ -0,0 +1,109 @@
1
+ declare module '@ember-data/store/-private/network/request-cache' {
2
+ import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
3
+ import type { FindRecordOptions } from '@ember-data/store/-types/q/store';
4
+ import type Store from '@ember-data/store/-private/store-service';
5
+ const Touching: unique symbol;
6
+ export const RequestPromise: unique symbol;
7
+ export interface Operation {
8
+ op: string;
9
+ options: FindRecordOptions | undefined;
10
+ recordIdentifier: StableRecordIdentifier;
11
+ }
12
+ export interface FindRecordQuery extends Operation {
13
+ op: 'findRecord';
14
+ }
15
+ export interface SaveRecordMutation extends Operation {
16
+ op: 'saveRecord';
17
+ }
18
+ export interface Request {
19
+ data: Operation[];
20
+ options?: Record<string, unknown>;
21
+ }
22
+ export type RequestStates = 'pending' | 'fulfilled' | 'rejected';
23
+ export interface RequestState {
24
+ state: RequestStates;
25
+ type: 'query' | 'mutation';
26
+ request: Request;
27
+ response?: Response;
28
+ }
29
+ export interface Response {
30
+ data: unknown;
31
+ }
32
+ interface InternalRequest extends RequestState {
33
+ [Touching]: StableRecordIdentifier[];
34
+ [RequestPromise]?: Promise<unknown>;
35
+ }
36
+ export type RequestSubscription = (requestState: RequestState) => void;
37
+ /**
38
+ * The RequestStateService is used to track the state of requests
39
+ * for fetching or updating known resource identifies that are inflight.
40
+ *
41
+ * @class RequestStateService
42
+ * @public
43
+ */
44
+ export default class RequestStateService {
45
+ _pending: Map<StableRecordIdentifier, InternalRequest[]>;
46
+ _done: Map<StableRecordIdentifier, InternalRequest[]>;
47
+ _subscriptions: Map<StableRecordIdentifier, RequestSubscription[]>;
48
+ _toFlush: InternalRequest[];
49
+ _store: Store;
50
+ constructor(store: Store);
51
+ _clearEntries(identifier: StableRecordIdentifier): void;
52
+ _enqueue<T>(promise: Promise<T>, queryRequest: Request): Promise<T>;
53
+ _triggerSubscriptions(req: InternalRequest): void;
54
+ _flush(): void;
55
+ _flushRequest(req: InternalRequest): void;
56
+ _dequeue(identifier: StableRecordIdentifier, request: InternalRequest): void;
57
+ _addDone(request: InternalRequest): void;
58
+ /**
59
+ * Subscribe to requests for a given resource identity.
60
+ *
61
+ * The callback will receive the current state of the request.
62
+ *
63
+ * ```ts
64
+ * interface RequestState {
65
+ * state: 'pending' | 'fulfilled' | 'rejected';
66
+ * type: 'query' | 'mutation';
67
+ * request: Request;
68
+ * response?: { data: unknown };
69
+ * }
70
+ * ```
71
+ *
72
+ * Note: It should be considered dangerous to use this API for more than simple
73
+ * state derivation or debugging. The `request` and `response` properties are poorly
74
+ * spec'd and may change unexpectedly when shifting what Handlers are in use or how
75
+ * requests are issued from the Store.
76
+ *
77
+ * We expect to revisit this API in the near future as we continue to refine the
78
+ * RequestManager ergonomics, as a simpler but more powerful direct integration
79
+ * with the RequestManager for these purposes is likely to be a better long-term
80
+ * design.
81
+ *
82
+ * @method subscribeForRecord
83
+ * @public
84
+ * @param {StableRecordIdentifier} identifier
85
+ * @param {(state: RequestState) => void} callback
86
+ */
87
+ subscribeForRecord(identifier: StableRecordIdentifier, callback: RequestSubscription): void;
88
+ /**
89
+ * Retrieve all active requests for a given resource identity.
90
+ *
91
+ * @method getPendingRequestsForRecord
92
+ * @public
93
+ * @param {StableRecordIdentifier} identifier
94
+ * @return {RequestState[]} an array of request states for any pending requests for the given identifier
95
+ */
96
+ getPendingRequestsForRecord(identifier: StableRecordIdentifier): RequestState[];
97
+ /**
98
+ * Retrieve the last completed request for a given resource identity.
99
+ *
100
+ * @method getLastRequestForRecord
101
+ * @public
102
+ * @param {StableRecordIdentifier} identifier
103
+ * @return {RequestState | null} the state of the most recent request for the given identifier
104
+ */
105
+ getLastRequestForRecord(identifier: StableRecordIdentifier): RequestState | null;
106
+ }
107
+ export {};
108
+ }
109
+ //# sourceMappingURL=request-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-cache.d.ts","sourceRoot":"","sources":["../../../src/-private/network/request-cache.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,QAAA,MAAM,QAAQ,EAAE,OAAO,MAA2B,CAAC;AACnD,eAAO,MAAM,cAAc,EAAE,OAAO,MAA0B,CAAC;AAG/D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,EAAE,EAAE,YAAY,CAAC;CAClB;AAED,MAAM,WAAW,kBAAmB,SAAQ,SA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qBAAqB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAcjD,MAAM,IAAI,IAAI;IAOd,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IASzC,QAAQ,CAAC,UAAU,EAAE,sBAAsB,EAAE,OAAO,EAAE,eAAe;IAQrE,QAAQ,CAAC,OAAO,EAAE,eAAe;IAwBjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,EAAE,QAAQ,EAAE,mBAAmB;IASpF;;;;;;;OAOG;IACH,2BAA2B,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY,EAAE;IAI/E;;;;;;;OAOG;IACH,uBAAuB,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY,GAAG,IAAI;CAOjF"}
@@ -0,0 +1,133 @@
1
+ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
2
+ import type { Signal } from '@ember-data/tracking/-private';
3
+ import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
4
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
5
+ import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
6
+ import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/raw';
7
+ import type RecordArrayManager from '@ember-data/store/-private/managers/record-array-manager';
8
+ import type Store from '@ember-data/store/-private/store-service';
9
+ import { NativeProxy } from '@ember-data/store/-private/record-arrays/native-proxy-type-fix';
10
+ export const ARRAY_SIGNAL: unique symbol;
11
+ export const SOURCE: unique symbol;
12
+ export const MUTATE: unique symbol;
13
+ export const NOTIFY: unique symbol;
14
+ const IS_COLLECTION: unique symbol;
15
+ export function notifyArray(arr: IdentifierArray): void;
16
+ export type IdentifierArrayCreateOptions<T = unknown> = {
17
+ identifiers: StableRecordIdentifier[];
18
+ type?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
19
+ store: Store;
20
+ allowMutation: boolean;
21
+ manager: RecordArrayManager;
22
+ links?: Links | PaginationLinks | null;
23
+ meta?: Record<string, unknown> | null;
24
+ };
25
+ /**
26
+ A record array is an array that contains records of a certain type (or modelName).
27
+ The record array materializes records as needed when they are retrieved for the first
28
+ time. You should not create record arrays yourself. Instead, an instance of
29
+ `RecordArray` or its subclasses will be returned by your application's store
30
+ in response to queries.
31
+
32
+ This class should not be imported and instantiated by consuming applications.
33
+
34
+ @class RecordArray
35
+ @public
36
+ */
37
+ interface IdentifierArray<T = unknown> extends Omit<Array<T>, '[]'> {
38
+ [MUTATE]?(target: StableRecordIdentifier[], receiver: typeof NativeProxy<StableRecordIdentifier[], T[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
39
+ }
40
+ class IdentifierArray<T = unknown> {
41
+ DEPRECATED_CLASS_NAME: string;
42
+ /**
43
+ The flag to signal a `RecordArray` is currently loading data.
44
+ Example
45
+ ```javascript
46
+ let people = store.peekAll('person');
47
+ people.isUpdating; // false
48
+ people.update();
49
+ people.isUpdating; // true
50
+ ```
51
+ @property isUpdating
52
+ @public
53
+ @type Boolean
54
+ */
55
+ isUpdating: boolean;
56
+ isLoaded: boolean;
57
+ isDestroying: boolean;
58
+ isDestroyed: boolean;
59
+ _updatingPromise: Promise<IdentifierArray<T>> | null;
60
+ [IS_COLLECTION]: boolean;
61
+ [ARRAY_SIGNAL]: Signal;
62
+ [SOURCE]: StableRecordIdentifier[];
63
+ [NOTIFY](): void;
64
+ links: Links | PaginationLinks | null;
65
+ meta: Record<string, unknown> | null;
66
+ modelName?: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
67
+ /**
68
+ The store that created this record array.
69
+
70
+ @property store
71
+ @private
72
+ @type Store
73
+ */
74
+ store: Store;
75
+ _manager: RecordArrayManager;
76
+ destroy(clear: boolean): void;
77
+ get length(): number;
78
+ set length(value: number);
79
+ constructor(options: IdentifierArrayCreateOptions<T>);
80
+ /**
81
+ Used to get the latest version of all of the records in this array
82
+ from the adapter.
83
+
84
+ Example
85
+
86
+ ```javascript
87
+ let people = store.peekAll('person');
88
+ people.isUpdating; // false
89
+
90
+ people.update().then(function() {
91
+ people.isUpdating; // false
92
+ });
93
+
94
+ people.isUpdating; // true
95
+ ```
96
+
97
+ @method update
98
+ @public
99
+ */
100
+ update(): Promise<IdentifierArray<T>>;
101
+ _update(): Promise<IdentifierArray<T>>;
102
+ /**
103
+ Saves all of the records in the `RecordArray`.
104
+
105
+ Example
106
+
107
+ ```javascript
108
+ let messages = store.peekAll('message');
109
+ messages.forEach(function(message) {
110
+ message.hasBeenSeen = true;
111
+ });
112
+ messages.save();
113
+ ```
114
+
115
+ @method save
116
+ @public
117
+ @return {Promise<IdentifierArray>} promise
118
+ */
119
+ save(): Promise<IdentifierArray>;
120
+ }
121
+ export default IdentifierArray;
122
+ export type CollectionCreateOptions = IdentifierArrayCreateOptions & {
123
+ query: ImmutableRequestInfo | Record<string, unknown> | null;
124
+ isLoaded: boolean;
125
+ };
126
+ export class Collection<T = unknown> extends IdentifierArray<T> {
127
+ query: ImmutableRequestInfo | Record<string, unknown> | null;
128
+ constructor(options: CollectionCreateOptions);
129
+ _update(): Promise<Collection<T>>;
130
+ destroy(clear: boolean): void;
131
+ }
132
+ }
133
+ //# sourceMappingURL=identifier-array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier-array.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/identifier-array.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAQ5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAK9E,OAAO,KAAK,kBAAkB,MAAM,kCAAkC,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BAAa,UAAU,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC7D,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAQ;gBAExD,OAAO,EAAE,uBAAuB;IAM5C,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAejC,OAAO,CAAC,KAAK,EAAE,OAAO;CAKvB"}
@@ -0,0 +1,118 @@
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
+ * @returns 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
+ * @returns 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
+ * @returns 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
@@ -0,0 +1 @@
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,CA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