Created
December 14, 2018 14:39
-
-
Save janmisek/2bc614252c520335c99be5c2c00bea3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get computed properties descriptors - eg: for clonning | |
const metal = Ember.__loader.require('ember-metal'); | |
EmberObject.eachComputedProperty(key => { | |
const descriptor = metal.descriptorFor(Model.prototype, key); | |
// console.log(descriptor._getter.toString()); | |
// now we can take descriptor._getter or descriptor._getter to create computed property on target object | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment