(target, key, userDef)
| 2789 | } |
| 2790 | |
| 2791 | function defineComputed (target, key, userDef) { |
| 2792 | if (typeof userDef === 'function') { |
| 2793 | sharedPropertyDefinition.get = createComputedGetter(key); |
| 2794 | sharedPropertyDefinition.set = noop; |
| 2795 | } else { |
| 2796 | sharedPropertyDefinition.get = userDef.get |
| 2797 | ? userDef.cache !== false |
| 2798 | ? createComputedGetter(key) |
| 2799 | : userDef.get |
| 2800 | : noop; |
| 2801 | sharedPropertyDefinition.set = userDef.set |
| 2802 | ? userDef.set |
| 2803 | : noop; |
| 2804 | } |
| 2805 | Object.defineProperty(target, key, sharedPropertyDefinition); |
| 2806 | } |
| 2807 | |
| 2808 | function createComputedGetter (key) { |
| 2809 | return function computedGetter () { |
no test coverage detected