# Storable Class

Module
import { Storable } from "@tsed/core"
Source/packages/core/src/class/Storable.ts

# Overview

abstract class Storable extends Entity {
    /**
     * Required entity.
     */
    required: boolean;
    /**
     * Allowed value when the entity is required.
     * @type {Array}
     */
    allowedRequiredValues: any[];
    /**
     * Custom name.
     */
    name: string;
    protected _store: Store;
    constructor(target: Type<any>, propertyKey: string | symbol, index?: number | PropertyDescriptor);
    /**
     * Class of the entity.
     * @returns {Type<any>}
     */
    get target(): Type<any>;
    /**
     *
     * @returns {Type<any>}
     */
    get type(): Type<any>;
    /**
     *
     * @param value
     */
    set type(value: Type<any>);
    /**
     *
     * @returns {Store}
     */
    get store(): Store;
    /**
     * Check precondition between value, required and allowedRequiredValues to know if the entity is required.
     * @param value
     * @returns {boolean}
     */
    isRequired(value: any): boolean;
    protected build(target: Type<any>): void;
}