-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Artem edited this page May 24, 2015
·
4 revisions
propjet.js provides fluent interface for declaring reactive properties.
-
T
- type of property value -
TIn
- type of data source -
TPromise
- type of promise that returns a value. Can be any type withthen
method:
propjet<T>()
propjet<T>(object, propertyName)
Starts a property declaration.
from<TPromise>()
Specifies that property is deferred.
require(...() => TIn)
Specifies data sources.
default(() => T)
Specifies a default value. Called when no value is set yet or some requirement is changed. It not used for regular properties with getter.
get((...in) => T)
get((...in) => TPromise)
Specifies a getter
with((newValue, oldValue) => T)
Specifies a filter. Called after getter and before setter.
set(newValue => void)
set((newValue, ...in) => TPromise)
Specifies a setter.
declare(isFunction: boolean)
Declares a property or creates a getter/setter function.