(path: PropertyPath, args: RpcPayload)
| 1626 | protected abstract getValue(): {value: unknown, owner: RpcPayload | null}; |
| 1627 | |
| 1628 | call(path: PropertyPath, args: RpcPayload): StubHook { |
| 1629 | try { |
| 1630 | let {value, owner} = this.getValue(); |
| 1631 | let followResult = followPath(value, undefined, path, owner); |
| 1632 | |
| 1633 | if (followResult.hook) { |
| 1634 | return followResult.hook.call(followResult.remainingPath, args); |
| 1635 | } |
| 1636 | |
| 1637 | // It's a local function. |
| 1638 | if (typeof followResult.value != "function") { |
| 1639 | throw new TypeError(`'${path.join('.')}' is not a function.`); |
| 1640 | } |
| 1641 | let promise = args.deliverCall(followResult.value, followResult.parent); |
| 1642 | return new PromiseStubHook(promise.then(payload => { |
| 1643 | return new PayloadStubHook(payload); |
| 1644 | })); |
| 1645 | } catch (err) { |
| 1646 | return new ErrorStubHook(err); |
| 1647 | } |
| 1648 | } |
| 1649 | |
| 1650 | map(path: PropertyPath, captures: StubHook[], instructions: unknown[]): StubHook { |
| 1651 | try { |
nothing calls this directly
no test coverage detected
searching dependent graphs…