1 | import { MetadataAccessor, MetadataMap } from '@loopback/core';
|
2 | import { ModelDefinition, ModelDefinitionSyntax, PropertyDefinition, PropertyType } from '../model';
|
3 | export declare const MODEL_KEY: MetadataAccessor<Partial<ModelDefinitionSyntax>, ClassDecorator>;
|
4 | export declare const MODEL_PROPERTIES_KEY: MetadataAccessor<PropertyDefinition, PropertyDecorator>;
|
5 | export declare const MODEL_WITH_PROPERTIES_KEY: MetadataAccessor<ModelDefinition, ClassDecorator>;
|
6 | export type PropertyMap = MetadataMap<Partial<PropertyDefinition>>;
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare function model(definition?: Partial<ModelDefinitionSyntax>): (target: Function & {
|
13 | definition?: ModelDefinition;
|
14 | }) => void;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare function buildModelDefinition(target: Function & {
|
21 | definition?: ModelDefinition | undefined;
|
22 | }, def?: ModelDefinitionSyntax): ModelDefinition;
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare function property(definition?: Partial<PropertyDefinition>): PropertyDecorator;
|
29 | export declare namespace property {
|
30 | const ERR_PROP_NOT_ARRAY = "@property.array can only decorate array properties!";
|
31 | const ERR_NO_ARGS = "decorator received less than two parameters";
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | function array(itemType: PropertyType, definition?: Partial<PropertyDefinition>): (target: object, propertyName: string) => void;
|
40 | }
|