Helper to declare Mutable classes from a specification. This is also the default export.
NOTE: This overload constructs mutables that use "$inherit".
an object with a class specification.
const Clazz = declare({ firstName: "", lastName: "", fullName: { depends: ["firstName", "lastName"], get(): string { return `${this.firstName} ${this.lastName}`; } }});const x = new Clazz(); Copy
const Clazz = declare({ firstName: "", lastName: "", fullName: { depends: ["firstName", "lastName"], get(): string { return `${this.firstName} ${this.lastName}`; } }});const x = new Clazz();
Helper to declare Mutable classes from a specification. This is also the default export.
NOTE: This overload constructs mutables that use "$inherit".