CoreMedia Content Cloud v11 Upgrade Guide / Version 2110
Table Of ContentsUsing all the ingredients of the previous sections, the complete example class could look like so:
import { is, mixin } from "@jangaroo/runtime"; import SuperFoo from "./SuperFoo"; import IFoo from "../api/IFoo"; class Foo extends SuperFoo implements IFoo { static readonly FOO: any = "FOO"; foo: string; #bar: number; constructor(newBar: number) { super(); this.#bar = newBar; } get bar(): number { return this.#bar; } set bar(value: number) { this.#bar = value; } isAFoo(obj: any): boolean { return is(obj, IFoo); } protected hook(): boolean { return false; } } mixin(Foo, IFoo); default export Foo;
Example 7.2. TypeScript example class