Page MenuHomeSealhub

disallow-update.ts
No OneTemporary

disallow-update.ts

import { Field, Context } from "../../../main";
import { HybridField } from "../../../chip-types/field";
export default class DisallowUpdate<T extends Field> extends HybridField<T> {
typeName = "disallow-update";
async isProperValue(
context: Context,
new_value: Parameters<T["checkValue"]>[1],
old_value?: Parameters<T["checkValue"]>[2],
new_value_blessing_token: symbol | null = null
) {
context.app.Logger.debug3(
"DISALLOW-UPDATE",
"Checking if this field already has a value",
{ new_value, old_value }
);
if (old_value === undefined) {
return this.virtual_field.checkValue(
new context.app.SuperContext(),
new_value,
old_value,
new_value_blessing_token
);
}
return Field.invalid(context.app.i18n("invalid_update"));
}
}

File Metadata

Mime Type
text/x-java
Expires
Wed, May 7, 19:48 (22 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625823
Default Alt Text
disallow-update.ts (779 B)

Event Timeline