@cyclonium/core 0.0.105 → 1.0.1
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/lib/2d/transform-2d-component.d.ts +1 -1
- package/lib/2d/transform-2d-component.js +1 -2
- package/lib/decorator/legacy/editable/common.js +3 -1
- package/lib/decorator/legacy/editable/editable.d.ts +2 -2
- package/lib/decorator/legacy/editable/editable.js +1 -3
- package/lib/decorator/legacy/legacy-component-decorator.d.ts +3 -2
- package/lib/decorator/legacy/legacy-component-decorator.js +8 -7
- package/lib/decorator/legacy/legacy-general-decorator.d.ts +1 -1
- package/lib/decorator/legacy/legacy-general-decorator.js +1 -1
- package/lib/decorator/legacy/utils.d.ts +3 -3
- package/lib/decorator/legacy/utils.js +1 -1
- package/lib/export/legacy-decorator.d.ts +2 -2
- package/lib/export/legacy-decorator.js +2 -2
- package/lib/framework/component.js +30 -12
- package/lib/framework/coroutine.d.ts +3 -3
- package/lib/framework/coroutine.js +10 -10
- package/lib/framework/tasking.d.ts +1 -1
- package/lib/framework/tasking.js +5 -2
- package/lib/math/bounds-2d.js +4 -4
- package/lib/math/vec2.js +4 -4
- package/lib/utils/assert.js +0 -1
- package/lib/utils/raw.js +3 -1
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ import { Mat3 } from "../math/mat3.js";
|
|
|
12
12
|
import { mat3FromSRT } from "../math/transform-2d.js";
|
|
13
13
|
import { Vec2 } from "../math/vec2.js";
|
|
14
14
|
import { to0ToPI2 } from "../math/trigonometry.js";
|
|
15
|
-
import { logger } from "../utils/logger.js";
|
|
16
15
|
import { clamp } from "../math/number.js";
|
|
17
16
|
export var TransformFlag;
|
|
18
17
|
(function (TransformFlag) {
|
|
@@ -21,10 +20,10 @@ export var TransformFlag;
|
|
|
21
20
|
TransformFlag[TransformFlag["scale"] = 4] = "scale";
|
|
22
21
|
})(TransformFlag || (TransformFlag = {}));
|
|
23
22
|
class TransformChangeFlags {
|
|
23
|
+
frontValue = 0;
|
|
24
24
|
get token() {
|
|
25
25
|
return this._token;
|
|
26
26
|
}
|
|
27
|
-
frontValue = 0;
|
|
28
27
|
get backValue() {
|
|
29
28
|
return this._backValue;
|
|
30
29
|
}
|
|
@@ -3,6 +3,7 @@ export function createDecoratorForSetEditableMetadata(opts) {
|
|
|
3
3
|
return (target, propertyKey, descriptor) => {
|
|
4
4
|
const normalizedOptions = {
|
|
5
5
|
...opts,
|
|
6
|
+
serializable: false,
|
|
6
7
|
};
|
|
7
8
|
if (normalizedOptions.visible === undefined) {
|
|
8
9
|
if (typeof propertyKey === 'string' && propertyKey.startsWith('_')) {
|
|
@@ -10,7 +11,8 @@ export function createDecoratorForSetEditableMetadata(opts) {
|
|
|
10
11
|
normalizedOptions.displayName = propertyKey.slice(1);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
_decorator.property(normalizedOptions)(target, propertyKey, descriptor);
|
|
15
|
+
_decorator.editable(target, propertyKey, descriptor);
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=common.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CCInteger, type CCBoolean, type
|
|
1
|
+
import { CCInteger, type CCBoolean, type CCString } from 'cc';
|
|
2
2
|
export interface EditableDecoratorOptions {
|
|
3
3
|
type?: Function | typeof CCInteger;
|
|
4
4
|
min?: number;
|
|
@@ -17,7 +17,7 @@ export interface EditableDecoratorOptions {
|
|
|
17
17
|
}
|
|
18
18
|
declare function editable(options?: EditableDecoratorOptions): PropertyDecorator;
|
|
19
19
|
declare function editable(type?: Function): PropertyDecorator;
|
|
20
|
-
declare function editable(type?: typeof CCInteger | typeof CCBoolean | typeof
|
|
20
|
+
declare function editable(type?: typeof CCInteger | typeof CCBoolean | typeof CCString): PropertyDecorator;
|
|
21
21
|
declare function editable(target: object, propertyKey: string | symbol): void;
|
|
22
22
|
export { editable };
|
|
23
23
|
//# sourceMappingURL=editable.d.ts.map
|
|
@@ -50,9 +50,7 @@ function editableWithOptions(options) {
|
|
|
50
50
|
modifiedOptions.min = 0;
|
|
51
51
|
modifiedOptions.max = Math.PI * 2;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
modifiedOptions.step = 1;
|
|
55
|
-
}
|
|
53
|
+
modifiedOptions.step ??= 1;
|
|
56
54
|
}
|
|
57
55
|
createDecoratorForSetEditableMetadata(modifiedOptions)(...args);
|
|
58
56
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Component } from 'cc';
|
|
1
|
+
import { Component, type Constructor } from 'cc';
|
|
2
2
|
import { CycloComponent } from '../../framework/component.ts';
|
|
3
3
|
export declare function executionOrder(order: number): ClassDecorator;
|
|
4
4
|
export declare namespace executionOrder {
|
|
5
5
|
function lateThan(component: CycloComponentClass): ClassDecorator;
|
|
6
6
|
}
|
|
7
|
+
export declare const disallowMultiple: ((value?: boolean) => ClassDecorator) & ClassDecorator;
|
|
7
8
|
export declare const executeInEditMode: ((value?: boolean) => ClassDecorator) & ClassDecorator;
|
|
8
|
-
export declare function requiresComponent<T extends Component>(componentType:
|
|
9
|
+
export declare function requiresComponent<T extends Component>(componentType: Constructor<T>): MethodDecorator;
|
|
9
10
|
type CycloComponentClass = new (...args: never[]) => CycloComponent;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=legacy-component-decorator.d.ts.map
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { _decorator, Component } from 'cc';
|
|
3
3
|
import { CycloComponent } from "../../framework/component.js";
|
|
4
4
|
import { getExecutionOrder, setExecutionOrder } from "../../framework/execution-order.js";
|
|
5
|
-
import { logger } from "../../utils/logger.js";
|
|
6
5
|
export function executionOrder(order) {
|
|
7
6
|
return defineComponentDecorator((target) => {
|
|
8
7
|
setExecutionOrder(target, order);
|
|
@@ -17,6 +16,9 @@ export function executionOrder(order) {
|
|
|
17
16
|
}
|
|
18
17
|
executionOrder.lateThan = lateThan;
|
|
19
18
|
})(executionOrder || (executionOrder = {}));
|
|
19
|
+
export const disallowMultiple = defineComponentDecoratorWithOptionalBoolean((target, value) => {
|
|
20
|
+
_decorator.disallowMultiple(value)(target);
|
|
21
|
+
});
|
|
20
22
|
export const executeInEditMode = defineComponentDecoratorWithOptionalBoolean((target, value) => {
|
|
21
23
|
_decorator.executeInEditMode(value)(target);
|
|
22
24
|
});
|
|
@@ -36,17 +38,16 @@ function addRequiredComponent(target, componentType) {
|
|
|
36
38
|
export function requiresComponent(componentType) {
|
|
37
39
|
return defineComponentMethodDecorator((target, propertyKey, descriptor) => {
|
|
38
40
|
addRequiredComponent(target, componentType);
|
|
39
|
-
|
|
40
|
-
if (set) {
|
|
41
|
+
if (descriptor.set !== undefined) {
|
|
41
42
|
throw new Error(`Property ${String(propertyKey)} of should not has set`);
|
|
42
43
|
}
|
|
43
|
-
if (value !== undefined) {
|
|
44
|
+
if (descriptor.value !== undefined) {
|
|
44
45
|
throw new Error(`Property ${String(propertyKey)} of should not has value`);
|
|
45
46
|
}
|
|
46
47
|
return {
|
|
47
|
-
|
|
48
|
+
configurable: descriptor.configurable,
|
|
49
|
+
enumerable: descriptor.enumerable,
|
|
48
50
|
get() {
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
51
|
const component = this.getComponent(componentType);
|
|
51
52
|
if (!component) {
|
|
52
53
|
throw new Error(`Component ${componentType.name} is not found.`);
|
|
@@ -82,7 +83,7 @@ function defineComponentDecoratorWithOptionalBoolean(decorate) {
|
|
|
82
83
|
function defineComponentMethodDecorator(decorate) {
|
|
83
84
|
return (target, propertyKey, descriptor) => {
|
|
84
85
|
if (!(target instanceof CycloComponent)) {
|
|
85
|
-
throw new Error(`Class ${target} is not a subclass of CycloComponent.`);
|
|
86
|
+
throw new Error(`Class ${String(target)} is not a subclass of CycloComponent.`);
|
|
86
87
|
}
|
|
87
88
|
return decorate(target, propertyKey, descriptor);
|
|
88
89
|
};
|
|
@@ -16,7 +16,7 @@ export declare function createScopedCycloClassDecorator(opts: {
|
|
|
16
16
|
declare const cycloClass: CycloClassDecorator;
|
|
17
17
|
declare const cycloBuiltinClass: CycloClassDecorator;
|
|
18
18
|
export { cycloClass, cycloBuiltinClass };
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const stored: PropertyDecorator;
|
|
20
20
|
/**
|
|
21
21
|
* Marks that the property's default value might vary between instances.
|
|
22
22
|
* @description
|
|
@@ -44,7 +44,7 @@ const cycloBuiltinClass = createScopedCycloClassDecorator({
|
|
|
44
44
|
scope: 'cyclo.',
|
|
45
45
|
});
|
|
46
46
|
export { cycloClass, cycloBuiltinClass };
|
|
47
|
-
export const
|
|
47
|
+
export const stored = _decorator.serializable;
|
|
48
48
|
/**
|
|
49
49
|
* Marks that the property's default value might vary between instances.
|
|
50
50
|
* @description
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface ShortenPropertyDecorator<TArgs extends
|
|
1
|
+
export interface ShortenPropertyDecorator<TArgs extends unknown[]> {
|
|
2
2
|
(...args: TArgs): PropertyDecorator;
|
|
3
|
-
(target:
|
|
3
|
+
(target: object, propertyKey: string | symbol): void;
|
|
4
4
|
}
|
|
5
|
-
export declare function defineShortenPropertyDecorator<TArgs extends
|
|
5
|
+
export declare function defineShortenPropertyDecorator<TArgs extends unknown[]>(decorator: (...args: TArgs) => PropertyDecorator, ...defaultArgs: TArgs): ShortenPropertyDecorator<TArgs>;
|
|
6
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -4,7 +4,7 @@ export function defineShortenPropertyDecorator(decorator, ...defaultArgs) {
|
|
|
4
4
|
// @x()
|
|
5
5
|
return decorator(...defaultArgs);
|
|
6
6
|
}
|
|
7
|
-
else if (!(typeof args[0] === 'object' && args[0] && typeof args[1] === 'string' || typeof args[1] === 'symbol')) {
|
|
7
|
+
else if (!((typeof args[0] === 'object' && args[0] && typeof args[1] === 'string') || typeof args[1] === 'symbol')) {
|
|
8
8
|
// @x(opts)
|
|
9
9
|
return decorator(...args);
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { designType, editable, editorOnly, cycloClass, createScopedCycloClassDecorator, dynamicDefault, idem, idemBy,
|
|
2
|
-
export { executionOrder, executeInEditMode, requiresComponent, } from '../decorator/legacy/legacy-component-decorator.ts';
|
|
1
|
+
export { designType, editable, editorOnly, cycloClass, createScopedCycloClassDecorator, dynamicDefault, idem, idemBy, stored, type CycloClassOptions, type CycloClassDecorator, } from '../decorator/legacy/legacy-general-decorator.ts';
|
|
2
|
+
export { disallowMultiple, executionOrder, executeInEditMode, requiresComponent, } from '../decorator/legacy/legacy-component-decorator.ts';
|
|
3
3
|
export { applyLegacyDecorators } from '../decorator/legacy/apply-legacy-decorators.ts';
|
|
4
4
|
//# sourceMappingURL=legacy-decorator.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { designType, editable, editorOnly, cycloClass, createScopedCycloClassDecorator, dynamicDefault, idem, idemBy,
|
|
2
|
-
export { executionOrder, executeInEditMode, requiresComponent, } from "../decorator/legacy/legacy-component-decorator.js";
|
|
1
|
+
export { designType, editable, editorOnly, cycloClass, createScopedCycloClassDecorator, dynamicDefault, idem, idemBy, stored, } from "../decorator/legacy/legacy-general-decorator.js";
|
|
2
|
+
export { disallowMultiple, executionOrder, executeInEditMode, requiresComponent, } from "../decorator/legacy/legacy-component-decorator.js";
|
|
3
3
|
export { applyLegacyDecorators } from "../decorator/legacy/apply-legacy-decorators.js";
|
|
4
4
|
//# sourceMappingURL=legacy-decorator.js.map
|
|
@@ -111,19 +111,35 @@ let CycloComponent = class CycloComponent extends Component {
|
|
|
111
111
|
get disablingSignal() {
|
|
112
112
|
return (this._disablingController ??= new AbortController()).signal;
|
|
113
113
|
}
|
|
114
|
-
onAwake() {
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
onAwake() {
|
|
115
|
+
// Optional lifecycle hook for subclasses.
|
|
116
|
+
}
|
|
117
|
+
onEnabled() {
|
|
118
|
+
// Optional lifecycle hook for subclasses.
|
|
119
|
+
}
|
|
120
|
+
onDisabled() {
|
|
121
|
+
// Optional lifecycle hook for subclasses.
|
|
122
|
+
}
|
|
117
123
|
onDestroy() {
|
|
118
124
|
this.stopAllCoroutines();
|
|
119
125
|
this._destroyingController?.abort();
|
|
120
126
|
this._destroyingController = undefined;
|
|
121
127
|
}
|
|
122
|
-
onStart() {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
onStart() {
|
|
129
|
+
// Optional lifecycle hook for subclasses.
|
|
130
|
+
}
|
|
131
|
+
onUpdate(_deltaTime) {
|
|
132
|
+
// Optional lifecycle hook for subclasses.
|
|
133
|
+
}
|
|
134
|
+
onFixedUpdate(_deltaTime) {
|
|
135
|
+
// Optional lifecycle hook for subclasses.
|
|
136
|
+
}
|
|
137
|
+
onLateUpdate(_deltaTime) {
|
|
138
|
+
// Optional lifecycle hook for subclasses.
|
|
139
|
+
}
|
|
140
|
+
onFrameEnd() {
|
|
141
|
+
// Optional lifecycle hook for subclasses.
|
|
142
|
+
}
|
|
127
143
|
/**
|
|
128
144
|
* Starts a coroutine owned by this component.
|
|
129
145
|
* @param coroutine - Coroutine iterator to start.
|
|
@@ -295,15 +311,17 @@ class FixedUpdateTask {
|
|
|
295
311
|
}
|
|
296
312
|
if (!EDITOR_NOT_IN_PREVIEW) {
|
|
297
313
|
const fixedUpdatePriority = TaskPriority.before(TaskPriority.predefined.componentsLateUpdate);
|
|
314
|
+
const coroutineUpdateTask = new CoroutineUpdateTask();
|
|
315
|
+
const fixedUpdateTask = new FixedUpdateTask();
|
|
298
316
|
addFrameTask({
|
|
299
|
-
thisArg:
|
|
317
|
+
thisArg: coroutineUpdateTask,
|
|
300
318
|
priority: TaskPriority.between(fixedUpdatePriority, TaskPriority.predefined.componentsLateUpdate),
|
|
301
|
-
fn:
|
|
319
|
+
fn: coroutineUpdateTask.update.bind(coroutineUpdateTask),
|
|
302
320
|
});
|
|
303
321
|
addFrameTask({
|
|
304
|
-
thisArg:
|
|
322
|
+
thisArg: fixedUpdateTask,
|
|
305
323
|
priority: fixedUpdatePriority,
|
|
306
|
-
fn:
|
|
324
|
+
fn: fixedUpdateTask.update.bind(fixedUpdateTask),
|
|
307
325
|
});
|
|
308
326
|
addFrameTask({
|
|
309
327
|
thisArg: undefined,
|
|
@@ -84,13 +84,13 @@ export declare function waitUntil(predicate: CoroutinePredicate): CoroutineInstr
|
|
|
84
84
|
*/
|
|
85
85
|
export declare function waitWhile(predicate: CoroutinePredicate): CoroutineInstruction;
|
|
86
86
|
export declare class CoroutineRunner {
|
|
87
|
+
get frame(): number;
|
|
88
|
+
get deltaTime(): number;
|
|
89
|
+
get empty(): boolean;
|
|
87
90
|
start(coroutine: CoroutineIterator, opts?: StartCoroutineOptions): Coroutine;
|
|
88
91
|
update(deltaTime: number): void;
|
|
89
92
|
stop(handle: Coroutine): void;
|
|
90
93
|
stopAll(): void;
|
|
91
|
-
get frame(): number;
|
|
92
|
-
get deltaTime(): number;
|
|
93
|
-
get empty(): boolean;
|
|
94
94
|
private _records;
|
|
95
95
|
private _frame;
|
|
96
96
|
private _deltaTime;
|
|
@@ -52,6 +52,15 @@ export function waitWhile(predicate) {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
export class CoroutineRunner {
|
|
55
|
+
get frame() {
|
|
56
|
+
return this._frame;
|
|
57
|
+
}
|
|
58
|
+
get deltaTime() {
|
|
59
|
+
return this._deltaTime;
|
|
60
|
+
}
|
|
61
|
+
get empty() {
|
|
62
|
+
return this._records.length === 0;
|
|
63
|
+
}
|
|
55
64
|
start(coroutine, opts) {
|
|
56
65
|
const record = new CoroutineRecord(this, coroutine, opts);
|
|
57
66
|
this._records.push(record);
|
|
@@ -89,15 +98,6 @@ export class CoroutineRunner {
|
|
|
89
98
|
this._endPruneDeferral();
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
|
-
get frame() {
|
|
93
|
-
return this._frame;
|
|
94
|
-
}
|
|
95
|
-
get deltaTime() {
|
|
96
|
-
return this._deltaTime;
|
|
97
|
-
}
|
|
98
|
-
get empty() {
|
|
99
|
-
return this._records.length === 0;
|
|
100
|
-
}
|
|
101
101
|
_records = [];
|
|
102
102
|
_frame = 0;
|
|
103
103
|
_deltaTime = 0;
|
|
@@ -191,6 +191,7 @@ class CoroutineRecord {
|
|
|
191
191
|
_done = false;
|
|
192
192
|
_executing = false;
|
|
193
193
|
_stopping = false;
|
|
194
|
+
_onAbort = undefined;
|
|
194
195
|
_advance(frame) {
|
|
195
196
|
let result;
|
|
196
197
|
this._executing = true;
|
|
@@ -273,6 +274,5 @@ class CoroutineRecord {
|
|
|
273
274
|
this._signal.removeEventListener('abort', this._onAbort);
|
|
274
275
|
this._onAbort = undefined;
|
|
275
276
|
}
|
|
276
|
-
_onAbort = undefined;
|
|
277
277
|
}
|
|
278
278
|
//# sourceMappingURL=coroutine.js.map
|
package/lib/framework/tasking.js
CHANGED
|
@@ -20,7 +20,10 @@ class TaskCluster {
|
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
22
|
this._tasks.push({
|
|
23
|
-
|
|
23
|
+
fn: task.fn,
|
|
24
|
+
thisArg: task.thisArg,
|
|
25
|
+
priority: task.priority,
|
|
26
|
+
execute: (deltaTime) => task.fn.call(task.thisArg, deltaTime),
|
|
24
27
|
});
|
|
25
28
|
this._tasks.sort((a, b) => b.priority - a.priority);
|
|
26
29
|
return true;
|
|
@@ -35,7 +38,7 @@ class TaskCluster {
|
|
|
35
38
|
}
|
|
36
39
|
execute(deltaTime) {
|
|
37
40
|
for (const task of this._tasks) {
|
|
38
|
-
task.
|
|
41
|
+
task.execute(deltaTime);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
_tasks = [];
|
package/lib/math/bounds-2d.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Bounds2D } from '@cyclonium/math/bounds-2d';
|
|
2
|
-
import { applyLegacyDecorators,
|
|
2
|
+
import { applyLegacyDecorators, stored, editable } from "../export/legacy-decorator.js";
|
|
3
3
|
import { cycloBuiltinClass } from "../decorator/legacy/legacy-decorator.js";
|
|
4
4
|
export * from '@cyclonium/math/bounds-2d';
|
|
5
5
|
applyLegacyDecorators(Bounds2D, {
|
|
6
6
|
classDecorators: [cycloBuiltinClass('Bounds2D')],
|
|
7
7
|
propertyDecorators: {
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
_min: [
|
|
10
|
-
_max: [
|
|
8
|
+
// @ts-expect-error -- Legacy decorators intentionally target Bounds2D's private serialized fields.
|
|
9
|
+
_min: [stored, editable],
|
|
10
|
+
_max: [stored, editable],
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=bounds-2d.js.map
|
package/lib/math/vec2.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Vec2, v2 } from '@cyclonium/math/vec2';
|
|
2
2
|
import { applyLegacyDecorators } from "../decorator/legacy/apply-legacy-decorators.js";
|
|
3
|
-
import { editable, cycloBuiltinClass,
|
|
3
|
+
import { editable, cycloBuiltinClass, stored } from "../decorator/legacy/legacy-general-decorator.js";
|
|
4
4
|
import * as cc from 'cc';
|
|
5
5
|
applyLegacyDecorators(Vec2, {
|
|
6
6
|
classDecorators: [cycloBuiltinClass('Vec2')],
|
|
7
|
-
// @ts-expect-error
|
|
7
|
+
// @ts-expect-error -- Legacy decorators require metadata for Vec2 fields declared by another package.
|
|
8
8
|
propertyDecorators: {
|
|
9
|
-
x: [
|
|
10
|
-
y: [
|
|
9
|
+
x: [stored, editable],
|
|
10
|
+
y: [stored, editable],
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
13
|
export { Vec2, v2 };
|
package/lib/utils/assert.js
CHANGED
package/lib/utils/raw.js
CHANGED
|
@@ -15,7 +15,9 @@ Raw = __decorate([
|
|
|
15
15
|
cycloBuiltinClass('_Raw')
|
|
16
16
|
], Raw);
|
|
17
17
|
export { Raw };
|
|
18
|
-
export const dumpRaw = (
|
|
18
|
+
export const dumpRaw = (_target, _propertyKey, descriptor) => {
|
|
19
|
+
// The getter is deliberately invoked later with the decorated instance as its receiver.
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
19
21
|
const get = descriptor.get;
|
|
20
22
|
if (get) {
|
|
21
23
|
descriptor.get = function () {
|