/ src / models / Image.ts
Image.ts
 1  import { deserializeWith, rename, t, u } from "desero";
 2  
 3  /**
 4   * An image with a description.
 5   * @hideconstructor
 6   */
 7  export class Image {
 8    /**
 9     * Description of the linked image, probably for an `alt` attribute.
10     */
11    @rename("alt")
12    description = t.string();
13  
14    @deserializeWith(u.falsyToNull)
15    @rename("src")
16    href = t.option(t.string());
17  }