diff options
| author | Monika Hedman <monika_hedman@brown.edu> | 2019-05-07 16:34:00 -0400 |
|---|---|---|
| committer | Monika Hedman <monika_hedman@brown.edu> | 2019-05-07 16:34:00 -0400 |
| commit | ef54fbecd832e4c8f31144ab9fa217146833a397 (patch) | |
| tree | 4bf8367cc6456f2a3eb23c242adda17dc7999f85 /src/new_fields/IconField.ts | |
| parent | 93d2214b84eaef61c9a9f980d24b5c1addbd67dc (diff) | |
| parent | 14c776b6d30e0bc0d5b3712f28e4b9f1170eae3b (diff) | |
pulled from new search
Diffstat (limited to 'src/new_fields/IconField.ts')
| -rw-r--r-- | src/new_fields/IconField.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/new_fields/IconField.ts b/src/new_fields/IconField.ts new file mode 100644 index 000000000..1a928389d --- /dev/null +++ b/src/new_fields/IconField.ts @@ -0,0 +1,18 @@ +import { Deserializable } from "../client/util/SerializationHelper"; +import { serializable, primitive } from "serializr"; +import { ObjectField, Copy } from "./ObjectField"; + +@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); + } +} |
