diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-15 22:41:58 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-15 22:41:58 +0530 |
commit | 0cc83ef72b6b1b254d97bf07a97dd1fe936aa25a (patch) | |
tree | bce434d8545a953fd943743f0714609f23529220 /src/fields/IconField.ts | |
parent | 9c0b8ab5820232292e02fbf453e50261137a533c (diff) | |
parent | 98c7540fff67c232c1b04f2130ee624f9a70afbd (diff) |
resolved conflicts
Diffstat (limited to 'src/fields/IconField.ts')
-rw-r--r-- | src/fields/IconField.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/fields/IconField.ts b/src/fields/IconField.ts new file mode 100644 index 000000000..76c4ddf1b --- /dev/null +++ b/src/fields/IconField.ts @@ -0,0 +1,26 @@ +import { Deserializable } from "../client/util/SerializationHelper"; +import { serializable, primitive } from "serializr"; +import { ObjectField } from "./ObjectField"; +import { Copy, ToScriptString, ToString } from "./FieldSymbols"; + +@Deserializable("icon") +export class IconField extends ObjectField { + @serializable(primitive()) + readonly icon: string; + + constructor(icon: string) { + super(); + this.icon = icon; + } + + [Copy]() { + return new IconField(this.icon); + } + + [ToScriptString]() { + return "invalid"; + } + [ToString]() { + return "ICONfield"; + } +} |