2024-01-17 18:53:31 +01:00
|
|
|
|
|
|
|
|
class StringNode extends LogicNode {
|
|
|
|
|
|
|
|
|
|
value: string;
|
|
|
|
|
|
2024-03-07 20:37:30 +01:00
|
|
|
constructor(value: string = "") {
|
2024-01-17 18:53:31 +01:00
|
|
|
super();
|
|
|
|
|
this.value = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override get = (from: i32, done: (a: any)=>void) => {
|
|
|
|
|
if (this.inputs.length > 0) this.inputs[0].get(done);
|
|
|
|
|
else done(this.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override set = (value: any) => {
|
|
|
|
|
if (this.inputs.length > 0) this.inputs[0].set(value);
|
|
|
|
|
else this.value = value;
|
|
|
|
|
}
|
|
|
|
|
}
|