@singularsystems/neo-core 1.0.0-beta.7 → 1.0.0-beta.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.
|
@@ -43,8 +43,8 @@ export declare function OnChanged<T>(callback: (target: T) => (oldValue: any, ne
|
|
|
43
43
|
export declare function Debounce(value?: boolean): (type: any, propertyKey: string) => void;
|
|
44
44
|
/** Converts a getter into a computed. Note, when using NeoModel you do not need to do this. */
|
|
45
45
|
export declare function Computed(isComputed?: boolean): (type: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
46
|
-
/** Specifies whether a method is a mobx action.
|
|
47
|
-
*
|
|
46
|
+
/** Specifies whether a method is a mobx action.
|
|
47
|
+
* Change the default behaviour at a class level in the makeObservable options passed to makeObservable. */
|
|
48
48
|
export declare function Action(isAction?: boolean): (type: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
49
49
|
/** Sets this property as the display member to be used in drop downs / radio lists etc. */
|
|
50
50
|
export declare function DisplayMember(): (type: any, propertyKey: string) => void;
|
package/dist/Model/Decorators.js
CHANGED
|
@@ -173,9 +173,10 @@ export function Computed(isComputed) {
|
|
|
173
173
|
ensureTypeInfo(type.constructor).neo.addComputed(propertyKey, descriptor, isComputed);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
/** Specifies whether a method is a mobx action.
|
|
177
|
-
*
|
|
176
|
+
/** Specifies whether a method is a mobx action.
|
|
177
|
+
* Change the default behaviour at a class level in the makeObservable options passed to makeObservable. */
|
|
178
178
|
export function Action(isAction) {
|
|
179
|
+
if (isAction === void 0) { isAction = true; }
|
|
179
180
|
return function (type, propertyKey, descriptor) {
|
|
180
181
|
ensureTypeInfo(type.constructor).neo.addMethod(propertyKey).isAction = isAction;
|
|
181
182
|
};
|