warscript 0.0.1-dev.aaf0a9d → 0.0.1-dev.c37d12c
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/engine/object-field.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare abstract class ObjectArrayField<ObjectDataEntryType extends Objec
|
|
|
72
72
|
}
|
|
73
73
|
export declare abstract class ObjectLevelField<ObjectDataEntryType extends ObjectDataEntry = ObjectDataEntry, InstanceType extends AnyNotNil = AnyNotNil, ValueType extends number | string | boolean = number | string | boolean, InputValueType extends ValueType = never, NativeFieldType = unknown> extends ObjectFieldBase<ObjectDataEntryType, InstanceType, ValueType[], NativeFieldType> {
|
|
74
74
|
protected abstract readonly defaultValue: ValueType;
|
|
75
|
+
accepts(value: unknown): value is ValueType;
|
|
75
76
|
protected abstract getNativeFieldValue(instance: InstanceType, level: number): ValueType;
|
|
76
77
|
protected abstract setNativeFieldValue(instance: InstanceType, level: number, value: ValueType): boolean;
|
|
77
78
|
protected abstract getLevelCount(entry: ObjectDataEntryType | InstanceType): number;
|
package/engine/object-field.lua
CHANGED
|
@@ -273,6 +273,9 @@ ____exports.ObjectLevelField = __TS__Class()
|
|
|
273
273
|
local ObjectLevelField = ____exports.ObjectLevelField
|
|
274
274
|
ObjectLevelField.name = "ObjectLevelField"
|
|
275
275
|
__TS__ClassExtends(ObjectLevelField, ObjectFieldBase)
|
|
276
|
+
function ObjectLevelField.prototype.accepts(self, value)
|
|
277
|
+
return __TS__TypeOf(value) == __TS__TypeOf(self.defaultValue)
|
|
278
|
+
end
|
|
276
279
|
function ObjectLevelField.prototype.getValue(self, entry, level)
|
|
277
280
|
if level == nil then
|
|
278
281
|
local result = {}
|
package/package.json
CHANGED