-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Artem edited this page May 28, 2015
·
4 revisions
propjet.js provides fluent interface for declaring reactive properties.
-
T
– type of property value -
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(...() => any)
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((...sourceValues) => T)
get((...sourceValues) => TPromise)
Specifies a getter.
with((newValue, oldValue) => T)
Specifies a filter. Called after getter and before setter.
set(newValue => void)
set((newValue, ...sourceValues) => TPromise)
Specifies a setter.
declare(isFunction)
Declares a property or creates a getter/setter function.