Merge branch 'master' of https://github.com/driftyco/ionic-native into new-contacts

This commit is contained in:
Ibrahim Hadeed 2016-04-30 13:35:49 -04:00
commit 654cef2377

View File

@ -317,3 +317,22 @@ export function CordovaProperty(target: Function, key: string, descriptor: Typed
return descriptor;
}
/**
* @private
* @param target
* @param key
* @param descriptor
* @constructor
*/
export function InstanceProperty(target: Function, key: string, descriptor: TypedPropertyDescriptor<any>) {
descriptor.get = function() {
return this._objectInstance[key];
};
descriptor.get = function(...args: any[]) {
return this._objectInstance[key] = args[0];
};
return descriptor;
}