( target: ContextCache, prop: string, receiver: AnyObject )
| 231 | } |
| 232 | |
| 233 | function _resolveWithContext( |
| 234 | target: ContextCache, |
| 235 | prop: string, |
| 236 | receiver: AnyObject |
| 237 | ) { |
| 238 | const {_proxy, _context, _subProxy, _descriptors: descriptors} = target; |
| 239 | let value = _proxy[prop]; // resolve from proxy |
| 240 | |
| 241 | // resolve with context |
| 242 | if (isFunction(value) && descriptors.isScriptable(prop)) { |
| 243 | value = _resolveScriptable(prop, value, target, receiver); |
| 244 | } |
| 245 | if (isArray(value) && value.length) { |
| 246 | value = _resolveArray(prop, value, target, descriptors.isIndexable); |
| 247 | } |
| 248 | if (needsSubResolver(prop, value)) { |
| 249 | // if the resolved value is an object, create a sub resolver for it |
| 250 | value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors); |
| 251 | } |
| 252 | return value; |
| 253 | } |
| 254 | |
| 255 | function _resolveScriptable( |
| 256 | prop: string, |
no test coverage detected