Page Contents

Home > @loopback/repository > model

model() function

Decorator for model definitions

Signature:

export declare function model(definition?: Partial<ModelDefinitionSyntax>): (target: Function & {
    definition?: ModelDefinition | undefined;
}) => void;

Parameters

Parameter Type Description
definition Partial<ModelDefinitionSyntax>  

Returns:

(target: Function & { definition?: ModelDefinition | undefined; }) => void

A class decorator for model