| 342 | } |
| 343 | |
| 344 | map(path: PropertyPath, captures: StubHook[], instructions: unknown[]): StubHook { |
| 345 | let entry: ImportTableEntry; |
| 346 | try { |
| 347 | entry = this.getEntry(); |
| 348 | } catch (err) { |
| 349 | for (let cap of captures) { |
| 350 | cap.dispose(); |
| 351 | } |
| 352 | throw err; |
| 353 | } |
| 354 | |
| 355 | if (entry.resolution) { |
| 356 | return entry.resolution.map(path, captures, instructions); |
| 357 | } else { |
| 358 | return entry.session.sendMap(entry.importId, path, captures, instructions); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | get(path: PropertyPath): StubHook { |
| 363 | let entry = this.getEntry(); |