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