(name: string, fn: () => t)
| 1332 | |
| 1333 | /** calls `fn` with `resolveAmbient(name)` resolving nothing */ |
| 1334 | export const whileResolvingAmbient = <t>(name: string, fn: () => t): t => { |
| 1335 | resolvingAmbient.add(name) |
| 1336 | try { |
| 1337 | return fn() |
| 1338 | } finally { |
| 1339 | resolvingAmbient.delete(name) |
| 1340 | } |
| 1341 | } |
| 1342 | |
| 1343 | /** the root the builtin keyword named resolves to, if any */ |
| 1344 | export const resolveAmbient = (name: string): BaseRoot | undefined => { |
no test coverage detected