Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DataOpts<T>

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

Type parameters

  • T

Hierarchy

  • DataOpts

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 sync

sync: undefined | string

The name of a vue property to sync this data property with. On update to said property, the value of the decorated property will be changed as well. on changes to the data property, an update:PROPNAME event will be emitted, where PROPNAME is the name of the property to sync with.

Optional syncCondition

syncCondition: undefined | ((newVal: T, oldVal?: T) => boolean)

Condition for applying sync changes to the related property, by default negated object equality is used (newVal !== oldVal).

Generated using TypeDoc