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