Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RecordPropOpts<T>

Parameters of the {@link Prop | @Prop} decorator and its flavors

Type parameters

  • T

Hierarchy

  • RecordPropOpts

Index

Properties

Optional default

default: T | TFunction<T>

A default value or a function constructing a default value. Arrays or objects are supported, if you want to use a literal function as a default value, use literal instead.

Optional literal

literal: T

A default value. If a function is given, it will be passed as a literal value instead of being executed as a factory.

Optional model

model: boolean | string

Marks this property as a model property, if true is given, it will use the event 'update:PROPNAME' as the binding trigger, where PROPNAME is the name of the decorated property. If a string is given, it will be used in place of the event instead.

Optional required

required: undefined | false | true

Whether or not the property is required.

Optional twoWay

twoWay: undefined | false | true

Whether or not the property is a two way property.

Optional type

type: Constructor<T> | Constructor<any>[]

The type of the property. Should be a constructor function or an array of constructor functions.

Optional validator

validator: SingleArgFunction<boolean, T>

A validator function returning true if a given value is valid and false otherwise.

Generated using TypeDoc