mutts 1.0.6 → 1.0.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 +61 -23
- package/dist/async/browser.d.ts +2 -0
- package/dist/async/browser.d.ts.map +1 -0
- package/dist/async/index.d.ts +18 -0
- package/dist/async/index.d.ts.map +1 -0
- package/dist/async/node.d.ts +2 -0
- package/dist/async/node.d.ts.map +1 -0
- package/dist/{chunks/index-CDCOjzTy.js → browser.cjs} +5913 -4382
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.ts +1655 -0
- package/dist/browser.esm.js +305 -0
- package/dist/browser.esm.js.map +1 -0
- package/dist/chunks/async-browser-CA0jPWIi.cjs +304 -0
- package/dist/chunks/async-browser-CA0jPWIi.cjs.map +1 -0
- package/dist/chunks/async-core-UqHzvJ-S.cjs +25 -0
- package/dist/chunks/async-core-UqHzvJ-S.cjs.map +1 -0
- package/dist/chunks/async-node-BYHuGTni.cjs +103 -0
- package/dist/chunks/async-node-BYHuGTni.cjs.map +1 -0
- package/dist/chunks/{index-DiP0RXoZ.esm.js → index-DhaOVusv.esm.js} +5851 -4345
- package/dist/chunks/index-DhaOVusv.esm.js.map +1 -0
- package/dist/decorator.d.ts +17 -18
- package/dist/decorator.d.ts.map +1 -0
- package/dist/destroyable.d.ts +12 -15
- package/dist/destroyable.d.ts.map +1 -0
- package/dist/devtools/devtool/devtools.d.ts +1 -0
- package/dist/devtools/devtool/devtools.d.ts.map +1 -0
- package/dist/devtools/devtool/panel.d.ts +2 -0
- package/dist/devtools/devtool/panel.d.ts.map +1 -0
- package/dist/devtools/panel.js.map +1 -1
- package/dist/entry-browser.d.ts +3 -0
- package/dist/entry-browser.d.ts.map +1 -0
- package/dist/entry-node.d.ts +3 -0
- package/dist/entry-node.d.ts.map +1 -0
- package/dist/eventful.d.ts +3 -5
- package/dist/eventful.d.ts.map +1 -0
- package/dist/index.d.ts +13 -19
- package/dist/index.d.ts.map +1 -0
- package/dist/indexable.d.ts +10 -10
- package/dist/indexable.d.ts.map +1 -0
- package/dist/introspection.d.ts +27 -0
- package/dist/introspection.d.ts.map +1 -0
- package/dist/iterableWeak.d.ts +53 -0
- package/dist/iterableWeak.d.ts.map +1 -0
- package/dist/mixins.d.ts +25 -0
- package/dist/mixins.d.ts.map +1 -0
- package/dist/mutts.umd.js +1 -1
- package/dist/mutts.umd.js.map +1 -1
- package/dist/mutts.umd.min.js +1 -1
- package/dist/mutts.umd.min.js.map +1 -1
- package/dist/node.cjs +105 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.esm.js +104 -0
- package/dist/node.esm.js.map +1 -0
- package/dist/promiseChain.d.ts +4 -5
- package/dist/promiseChain.d.ts.map +1 -0
- package/dist/reactive/array.d.ts +49 -0
- package/dist/reactive/array.d.ts.map +1 -0
- package/dist/reactive/buffer.d.ts +44 -0
- package/dist/reactive/buffer.d.ts.map +1 -0
- package/dist/reactive/change.d.ts +29 -0
- package/dist/reactive/change.d.ts.map +1 -0
- package/dist/reactive/debug.d.ts +111 -0
- package/dist/reactive/debug.d.ts.map +1 -0
- package/dist/reactive/deep-touch.d.ts +28 -0
- package/dist/reactive/deep-touch.d.ts.map +1 -0
- package/dist/reactive/deep-watch-state.d.ts +25 -0
- package/dist/reactive/deep-watch-state.d.ts.map +1 -0
- package/dist/reactive/deep-watch.d.ts +19 -0
- package/dist/reactive/deep-watch.d.ts.map +1 -0
- package/dist/reactive/effect-context.d.ts +7 -0
- package/dist/reactive/effect-context.d.ts.map +1 -0
- package/dist/reactive/effects.d.ts +151 -0
- package/dist/reactive/effects.d.ts.map +1 -0
- package/dist/reactive/index.d.ts +20 -0
- package/dist/reactive/index.d.ts.map +1 -0
- package/dist/reactive/interface.d.ts +64 -0
- package/dist/reactive/interface.d.ts.map +1 -0
- package/dist/reactive/map.d.ts +30 -0
- package/dist/reactive/map.d.ts.map +1 -0
- package/dist/reactive/memoize.d.ts +5 -0
- package/dist/reactive/memoize.d.ts.map +1 -0
- package/dist/reactive/non-reactive-state.d.ts +9 -0
- package/dist/reactive/non-reactive-state.d.ts.map +1 -0
- package/dist/reactive/non-reactive.d.ts +11 -0
- package/dist/reactive/non-reactive.d.ts.map +1 -0
- package/dist/reactive/project.d.ts +41 -0
- package/dist/reactive/project.d.ts.map +1 -0
- package/dist/reactive/proxy-state.d.ts +8 -0
- package/dist/reactive/proxy-state.d.ts.map +1 -0
- package/dist/reactive/proxy.d.ts +23 -0
- package/dist/reactive/proxy.d.ts.map +1 -0
- package/dist/reactive/record.d.ts +116 -0
- package/dist/reactive/record.d.ts.map +1 -0
- package/dist/reactive/register.d.ts +64 -0
- package/dist/reactive/register.d.ts.map +1 -0
- package/dist/reactive/registry.d.ts +20 -0
- package/dist/reactive/registry.d.ts.map +1 -0
- package/dist/reactive/set.d.ts +28 -0
- package/dist/reactive/set.d.ts.map +1 -0
- package/dist/reactive/tracking.d.ts +7 -0
- package/dist/reactive/tracking.d.ts.map +1 -0
- package/dist/reactive/types.d.ts +376 -0
- package/dist/reactive/types.d.ts.map +1 -0
- package/dist/std-decorators.d.ts +9 -11
- package/dist/std-decorators.d.ts.map +1 -0
- package/dist/utils.d.ts +49 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/zone.d.ts +40 -0
- package/dist/zone.d.ts.map +1 -0
- package/docs/ai/api-reference.md +0 -2
- package/docs/reactive/advanced.md +2 -5
- package/docs/reactive/collections.md +0 -125
- package/docs/reactive/core.md +27 -24
- package/docs/reactive/debugging.md +12 -2
- package/docs/reactive/project.md +1 -1
- package/docs/reactive/scan.md +78 -0
- package/docs/reactive.md +2 -1
- package/docs/std-decorators.md +69 -0
- package/docs/zone.md +95 -0
- package/package.json +67 -23
- package/src/async/browser.ts +319 -0
- package/src/async/index.ts +23 -0
- package/src/async/node.ts +104 -0
- package/src/decorator.ts +5 -1
- package/src/destroyable.ts +1 -1
- package/src/entry-browser.ts +5 -0
- package/src/entry-node.ts +5 -0
- package/src/index.d.ts +12 -9
- package/src/index.ts +23 -14
- package/src/indexable.ts +42 -0
- package/src/mixins.ts +2 -2
- package/src/reactive/array.ts +274 -179
- package/src/reactive/buffer.ts +168 -0
- package/src/reactive/change.ts +2 -2
- package/src/reactive/effect-context.ts +15 -91
- package/src/reactive/effects.ts +119 -179
- package/src/reactive/index.ts +11 -13
- package/src/reactive/interface.ts +19 -33
- package/src/reactive/map.ts +49 -62
- package/src/reactive/memoize.ts +19 -9
- package/src/reactive/project.ts +43 -22
- package/src/reactive/proxy.ts +16 -41
- package/src/reactive/record.ts +3 -3
- package/src/reactive/register.ts +5 -7
- package/src/reactive/registry.ts +9 -17
- package/src/reactive/set.ts +43 -57
- package/src/reactive/tracking.ts +1 -29
- package/src/reactive/types.ts +46 -23
- package/src/utils.ts +80 -37
- package/src/zone.ts +138 -0
- package/dist/chunks/_tslib-BgjropY9.js +0 -81
- package/dist/chunks/_tslib-BgjropY9.js.map +0 -1
- package/dist/chunks/_tslib-MCKDzsSq.esm.js +0 -75
- package/dist/chunks/_tslib-MCKDzsSq.esm.js.map +0 -1
- package/dist/chunks/decorator-BGILvPtN.esm.js +0 -627
- package/dist/chunks/decorator-BGILvPtN.esm.js.map +0 -1
- package/dist/chunks/decorator-BQ2eBTCj.js +0 -651
- package/dist/chunks/decorator-BQ2eBTCj.js.map +0 -1
- package/dist/chunks/index-CDCOjzTy.js.map +0 -1
- package/dist/chunks/index-DiP0RXoZ.esm.js.map +0 -1
- package/dist/decorator.esm.js +0 -2
- package/dist/decorator.esm.js.map +0 -1
- package/dist/decorator.js +0 -11
- package/dist/decorator.js.map +0 -1
- package/dist/destroyable.esm.js +0 -109
- package/dist/destroyable.esm.js.map +0 -1
- package/dist/destroyable.js +0 -116
- package/dist/destroyable.js.map +0 -1
- package/dist/eventful.esm.js +0 -66
- package/dist/eventful.esm.js.map +0 -1
- package/dist/eventful.js +0 -68
- package/dist/eventful.js.map +0 -1
- package/dist/index.esm.js +0 -53
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -139
- package/dist/index.js.map +0 -1
- package/dist/indexable.esm.js +0 -285
- package/dist/indexable.esm.js.map +0 -1
- package/dist/indexable.js +0 -291
- package/dist/indexable.js.map +0 -1
- package/dist/promiseChain.esm.js +0 -78
- package/dist/promiseChain.esm.js.map +0 -1
- package/dist/promiseChain.js +0 -80
- package/dist/promiseChain.js.map +0 -1
- package/dist/reactive.d.ts +0 -910
- package/dist/reactive.esm.js +0 -5
- package/dist/reactive.esm.js.map +0 -1
- package/dist/reactive.js +0 -59
- package/dist/reactive.js.map +0 -1
- package/dist/std-decorators.esm.js +0 -196
- package/dist/std-decorators.esm.js.map +0 -1
- package/dist/std-decorators.js +0 -204
- package/dist/std-decorators.js.map +0 -1
- package/src/reactive/mapped.ts +0 -129
- package/src/reactive/zone.ts +0 -208
package/dist/decorator.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Error thrown when decorator operations fail
|
|
3
3
|
*/
|
|
4
|
-
declare class DecoratorError extends Error {
|
|
4
|
+
export declare class DecoratorError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Legacy property decorator type for methods, getters, and setters
|
|
9
9
|
*/
|
|
10
|
-
type LegacyPropertyDecorator<T> = (target: T, name: string | symbol, descriptor: PropertyDescriptor) => any;
|
|
10
|
+
export type LegacyPropertyDecorator<T> = (target: T, name: string | symbol, descriptor: PropertyDescriptor) => any;
|
|
11
11
|
/**
|
|
12
12
|
* Legacy class decorator type
|
|
13
13
|
*/
|
|
14
|
-
type LegacyClassDecorator<T> = (target: T) => any;
|
|
14
|
+
export type LegacyClassDecorator<T> = (target: T) => any;
|
|
15
15
|
/**
|
|
16
16
|
* Modern method decorator type
|
|
17
17
|
*/
|
|
18
|
-
type ModernMethodDecorator<T> = (target: T, context: ClassMethodDecoratorContext) => any;
|
|
18
|
+
export type ModernMethodDecorator<T> = (target: T, context: ClassMethodDecoratorContext) => any;
|
|
19
19
|
/**
|
|
20
20
|
* Modern getter decorator type
|
|
21
21
|
*/
|
|
22
|
-
type ModernGetterDecorator<T> = (target: T, context: ClassGetterDecoratorContext) => any;
|
|
22
|
+
export type ModernGetterDecorator<T> = (target: T, context: ClassGetterDecoratorContext) => any;
|
|
23
23
|
/**
|
|
24
24
|
* Modern setter decorator type
|
|
25
25
|
*/
|
|
26
|
-
type ModernSetterDecorator<T> = (target: T, context: ClassSetterDecoratorContext) => any;
|
|
26
|
+
export type ModernSetterDecorator<T> = (target: T, context: ClassSetterDecoratorContext) => any;
|
|
27
27
|
/**
|
|
28
28
|
* Modern accessor decorator type
|
|
29
29
|
*/
|
|
30
|
-
type ModernAccessorDecorator<T> = (target: T, context: ClassAccessorDecoratorContext) => any;
|
|
30
|
+
export type ModernAccessorDecorator<T> = (target: T, context: ClassAccessorDecoratorContext) => any;
|
|
31
31
|
/**
|
|
32
32
|
* Modern class decorator type
|
|
33
33
|
*/
|
|
34
|
-
type ModernClassDecorator<T> = (target: T, context: ClassDecoratorContext) => any;
|
|
34
|
+
export type ModernClassDecorator<T> = (target: T, context: ClassDecoratorContext) => any;
|
|
35
35
|
type DDMethod<T> = (original: (this: T, ...args: any[]) => any, target: any, name: PropertyKey) => ((this: T, ...args: any[]) => any) | void;
|
|
36
36
|
type DDGetter<T> = (original: (this: T) => any, target: any, name: PropertyKey) => ((this: T) => any) | void;
|
|
37
37
|
type DDSetter<T> = (original: (this: T, value: any) => void, target: any, name: PropertyKey) => ((this: T, value: any) => void) | void;
|
|
@@ -39,7 +39,7 @@ type DDClass<T> = <Ctor extends new (...args: any[]) => T = new (...args: any[])
|
|
|
39
39
|
/**
|
|
40
40
|
* Description object for creating decorators that work with both Legacy and Modern decorator proposals
|
|
41
41
|
*/
|
|
42
|
-
interface DecoratorDescription<T> {
|
|
42
|
+
export interface DecoratorDescription<T> {
|
|
43
43
|
/** Handler for method decorators */
|
|
44
44
|
method?: DDMethod<T>;
|
|
45
45
|
/** Handler for class decorators */
|
|
@@ -55,7 +55,7 @@ interface DecoratorDescription<T> {
|
|
|
55
55
|
* Type for decorators that work with both Legacy and Modern decorator proposals
|
|
56
56
|
* Automatically infers the correct decorator type based on the description
|
|
57
57
|
*/
|
|
58
|
-
type Decorator<T, Description extends DecoratorDescription<T>> = (Description extends {
|
|
58
|
+
export type Decorator<T, Description extends DecoratorDescription<T>> = (Description extends {
|
|
59
59
|
method: DDMethod<T>;
|
|
60
60
|
} ? LegacyPropertyDecorator<T> & ModernMethodDecorator<T> : unknown) & (Description extends {
|
|
61
61
|
class: DDClass<new (...args: any[]) => T>;
|
|
@@ -69,7 +69,7 @@ type Decorator<T, Description extends DecoratorDescription<T>> = (Description ex
|
|
|
69
69
|
/**
|
|
70
70
|
* Factory type for creating decorators that work with both Legacy and Modern decorator proposals
|
|
71
71
|
*/
|
|
72
|
-
type DecoratorFactory<T> = <Description extends DecoratorDescription<T>>(description: Description) => (Description extends {
|
|
72
|
+
export type DecoratorFactory<T> = <Description extends DecoratorDescription<T>>(description: Description) => (Description extends {
|
|
73
73
|
method: DDMethod<T>;
|
|
74
74
|
} ? LegacyPropertyDecorator<T> & ModernMethodDecorator<T> : unknown) & (Description extends {
|
|
75
75
|
class: DDClass<new (...args: any[]) => T>;
|
|
@@ -85,23 +85,22 @@ type DecoratorFactory<T> = <Description extends DecoratorDescription<T>>(descrip
|
|
|
85
85
|
* @param description - The decorator description object
|
|
86
86
|
* @returns A decorator function compatible with Legacy decorators
|
|
87
87
|
*/
|
|
88
|
-
declare function legacyDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
88
|
+
export declare function legacyDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
89
89
|
/**
|
|
90
90
|
* Creates a decorator that works with Modern decorator proposals
|
|
91
91
|
* @param description - The decorator description object
|
|
92
92
|
* @returns A decorator function compatible with Modern decorators
|
|
93
93
|
*/
|
|
94
|
-
declare function modernDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
94
|
+
export declare function modernDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
95
95
|
/**
|
|
96
96
|
* Main decorator factory that automatically detects and works with both Legacy and Modern decorator proposals
|
|
97
97
|
* @param description - The decorator description object
|
|
98
98
|
* @returns A decorator that works in both Legacy and Modern environments
|
|
99
99
|
*/
|
|
100
|
-
declare const decorator: DecoratorFactory<any>;
|
|
100
|
+
export declare const decorator: DecoratorFactory<any>;
|
|
101
101
|
/**
|
|
102
102
|
* Generic class decorator type that works with both Legacy and Modern decorator proposals
|
|
103
103
|
*/
|
|
104
|
-
type GenericClassDecorator<T> = LegacyClassDecorator<abstract new (...args: any[]) => T> & ModernClassDecorator<abstract new (...args: any[]) => T>;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
export type { Decorator, DecoratorDescription, DecoratorFactory, GenericClassDecorator, LegacyClassDecorator, LegacyPropertyDecorator, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator };
|
|
104
|
+
export type GenericClassDecorator<T> = LegacyClassDecorator<abstract new (...args: any[]) => T> & ModernClassDecorator<abstract new (...args: any[]) => T>;
|
|
105
|
+
export {};
|
|
106
|
+
//# sourceMappingURL=decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI3B;AAID;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CACxC,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,UAAU,EAAE,kBAAkB,KAC1B,GAAG,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,GAAG,CAAA;AAExD;;GAEG;AACH,MAAM,M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zC,uBAAuB,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,GAClF,OAAO,CAAC,GACX,CAAC,WAAW,SAAS;IAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;CAAE,GACzC,uBAAuB,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,GAClF,OAAO,CAAC,GACX,CAAC,WAAW,SAAS;IAAE,OAAO,EAAE,MAAM,SAAS,CAAA;CAAE,GAAG,SAAS,GAAG,OAAO,CAAC,CAAA;AAEzE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,GAAG,CAwClF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,GAAG,CAwClF;AAuBD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAS3C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,oBAAoB,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,GAC9F,oBAAoB,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
package/dist/destroyable.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { LegacyPropertyDecorator, ModernSetterDecorator, ModernAccessorDecorator } from './decorator.js';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Symbol for marking destructor methods
|
|
5
3
|
*/
|
|
6
|
-
declare const destructor: unique symbol;
|
|
4
|
+
export declare const destructor: unique symbol;
|
|
7
5
|
/**
|
|
8
6
|
* Symbol for accessing allocated values in destroyable objects
|
|
9
7
|
*/
|
|
10
|
-
declare const allocatedValues: unique symbol;
|
|
8
|
+
export declare const allocatedValues: unique symbol;
|
|
11
9
|
/**
|
|
12
10
|
* Error thrown when attempting to access a destroyed object
|
|
13
11
|
*/
|
|
14
|
-
declare class DestructionError extends Error {
|
|
12
|
+
export declare class DestructionError extends Error {
|
|
15
13
|
static throw<_T = void>(msg: string): () => never;
|
|
16
14
|
constructor(msg: string);
|
|
17
15
|
}
|
|
@@ -28,7 +26,7 @@ interface Destructor<Allocated> {
|
|
|
28
26
|
* @param destructorObj - Object containing the destructor method
|
|
29
27
|
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
30
28
|
*/
|
|
31
|
-
declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Partial<InstanceType<T>>>(base: T, destructorObj: Destructor<Allocated>): (new (...args: ConstructorParameters<T>) => InstanceType<T> & {
|
|
29
|
+
export declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Partial<InstanceType<T>>>(base: T, destructorObj: Destructor<Allocated>): (new (...args: ConstructorParameters<T>) => InstanceType<T> & {
|
|
32
30
|
[allocatedValues]: Allocated;
|
|
33
31
|
}) & {
|
|
34
32
|
destroy(obj: InstanceType<T>): boolean;
|
|
@@ -39,7 +37,7 @@ declare function Destroyable<T extends new (...args: any[]) => any, Allocated ex
|
|
|
39
37
|
* @param destructorObj - Object containing the destructor method
|
|
40
38
|
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
41
39
|
*/
|
|
42
|
-
declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(destructorObj: Destructor<Allocated>): (new () => {
|
|
40
|
+
export declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(destructorObj: Destructor<Allocated>): (new () => {
|
|
43
41
|
[allocatedValues]: Allocated;
|
|
44
42
|
}) & {
|
|
45
43
|
destroy(obj: any): boolean;
|
|
@@ -50,7 +48,7 @@ declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record
|
|
|
50
48
|
* @param base - The base class to extend
|
|
51
49
|
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
52
50
|
*/
|
|
53
|
-
declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(base: T): (new (...args: ConstructorParameters<T>) => AbstractDestroyable<Allocated> & InstanceType<T> & {
|
|
51
|
+
export declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(base: T): (new (...args: ConstructorParameters<T>) => AbstractDestroyable<Allocated> & InstanceType<T> & {
|
|
54
52
|
[allocatedValues]: Allocated;
|
|
55
53
|
}) & {
|
|
56
54
|
destroy(obj: InstanceType<T>): boolean;
|
|
@@ -60,7 +58,7 @@ declare function Destroyable<T extends new (...args: any[]) => any, Allocated ex
|
|
|
60
58
|
* Creates an abstract destroyable base class
|
|
61
59
|
* @returns An abstract destroyable class with static destroy and isDestroyable methods
|
|
62
60
|
*/
|
|
63
|
-
declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(): abstract new () => (AbstractDestroyable<Allocated> & {
|
|
61
|
+
export declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(): abstract new () => (AbstractDestroyable<Allocated> & {
|
|
64
62
|
[allocatedValues]: Allocated;
|
|
65
63
|
}) & {
|
|
66
64
|
destroy(obj: any): boolean;
|
|
@@ -70,21 +68,20 @@ declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record
|
|
|
70
68
|
* Decorator that marks properties to be stored in the allocated object and passed to the destructor
|
|
71
69
|
* Use with accessor properties or explicit get/set pairs
|
|
72
70
|
*/
|
|
73
|
-
declare const allocated: LegacyPropertyDecorator<any> & ModernSetterDecorator<any> & ModernAccessorDecorator<any>;
|
|
71
|
+
export declare const allocated: import("./decorator").LegacyPropertyDecorator<any> & import("./decorator").ModernSetterDecorator<any> & import("./decorator").ModernAccessorDecorator<any>;
|
|
74
72
|
/**
|
|
75
73
|
* Registers a callback to be called when an object is garbage collected
|
|
76
74
|
* @param cb - The callback function to execute on garbage collection
|
|
77
75
|
* @returns The object whose reference can be collected
|
|
78
76
|
*/
|
|
79
|
-
declare function callOnGC(cb: () => void): () => void;
|
|
77
|
+
export declare function callOnGC(cb: () => void): () => void;
|
|
80
78
|
/**
|
|
81
79
|
* Context Manager Protocol for `using` statement integration
|
|
82
80
|
* Provides automatic resource cleanup when used with the `using` statement
|
|
83
81
|
*/
|
|
84
|
-
interface ContextManager<T = any> {
|
|
82
|
+
export interface ContextManager<T = any> {
|
|
85
83
|
[Symbol.dispose](): void;
|
|
86
84
|
value?: T;
|
|
87
85
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
export type { ContextManager };
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=destroyable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destroyable.d.ts","sourceRoot":"","sources":["../src/destroyable.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,UAAU,eAAuB,CAAA;AAC9C;;GAEG;AACH,eAAO,MAAM,eAAe,eAAsB,CAAA;AAClD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM;gBAKvB,GAAG,EAAE,MAAM;CAIvB;AAOD,uBAAe,mBAAmB,CAAC,SAAS;IAC3C,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IACjD,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAGxB;AAED,UAAU,UAAU,CAAC,SAAS;IAC7B,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAC1B,CAAC,SAAS,KACT,GAAG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S,CAAA;CAAE,CAAC,GAAG;IAC3F,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;IACtC,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5C,CAAA;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAC1B,SAAS,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,KACjE,QAAQ,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,GAAG;IACzD,CAAC,eAAe,CAAC,EAAE,SAAS,CAAA;CAC5B,CAAC,GAAG;IACJ,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAA;IAC1B,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAA;CAChC,CAAA;AAwDD;;;GAGG;AACH,eAAO,MAAM,SAAS,4JAOpB,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,cAStC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,GAAG;IACtC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,CAAA;CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=devtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../../devtool/devtools.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../devtool/panel.ts"],"names":[],"mappings":""}
|