UNPKG

@avonjs/avonjs

Version:

A fluent Node.js API generator.

45 lines (44 loc) 1.19 kB
import type { AbstractMixable, AnyRecord } from '../Contracts'; declare const _default: <T extends AbstractMixable = AbstractMixable>(Parent: T) => (abstract new (...args: import("../Contracts").Args) => { /** * The model's attributes. */ attributes: Record<string, unknown>; /** * Get hidden attributes on the serialization. */ hidden: string[]; /** * Get visible attributes on the serialization. */ visible: string[]; /** * Set value for the given key. */ setAttributeValue<T_1 = never>(key: string, value: T_1): any; /** * Get value for the given key. */ getAttributeValue<T_1 = undefined>(key: string): T_1; /** * Make an attribute serializable. */ makeVisible(attribute: string): any; /** * Hidden an attribute from serializable. */ makeHidden(attribute: string): any; /** * Get all mutated values. */ getAttributes(): AnyRecord; /** * Get all mutated values. */ getAttributesValue(): undefined[]; /** * Get all serializable attributes. */ toSerializable(): AnyRecord; }) & T; export default _default;