UNPKG

819 BTypeScriptView Raw
1import { PropType } from './internal/constants';
2import type { ArrayPropOptions, BasePropOptions, MapPropOptions, PropOptionsForNumber, PropOptionsForString, VirtualOptions } from './types';
3/**
4 * Set Property Options for the property below
5 * @param options The Options to Set
6 * @param kind Overwrite auto-inferred PropType
7 * @example
8 * ```ts
9 * class ClassName {
10 * @prop()
11 * public someProp?: string;
12 *
13 * @prop({ type: () => [String] })
14 * public someArrayProp?: string[];
15 *
16 * @prop({ type: () => String })
17 * public someMapProp?: Map<string, string>;
18 * }
19 * ```
20 */
21declare function prop(options?: BasePropOptions | ArrayPropOptions | MapPropOptions | PropOptionsForNumber | PropOptionsForString | VirtualOptions, kind?: PropType): PropertyDecorator;
22export { prop };
23export { prop as Prop };