aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/HtmlField.ts
blob: d998746bb00b25101e3c717d52aa6edc5d3e5adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Deserializable } from "../client/util/SerializationHelper";
import { serializable, primitive } from "serializr";
import { ObjectField, Copy } from "./ObjectField";

@Deserializable("html")
export class HtmlField extends ObjectField {
    @serializable(primitive())
    readonly html: string;

    constructor(html: string) {
        super();
        this.html = html;
    }

    [Copy]() {
        return new HtmlField(this.html);
    }
}