(name: string)
| 1342 | |
| 1343 | /** the root the builtin keyword named resolves to, if any */ |
| 1344 | export const resolveAmbient = (name: string): BaseRoot | undefined => { |
| 1345 | // writing the keyword's own expression asks for it while this resolves it |
| 1346 | if (resolvingAmbient.has(name)) return |
| 1347 | return whileResolvingAmbient(name, () => { |
| 1348 | const ambient: InternalModule = $ark.ambient as never |
| 1349 | const resolution = |
| 1350 | hasOwn(ambient, name) ? |
| 1351 | ambient[name] |
| 1352 | : maybeResolveSubalias(ambient, name) |
| 1353 | return ( |
| 1354 | hasArkKind(resolution, "module") ? resolution.root |
| 1355 | : hasArkKind(resolution, "root") ? resolution |
| 1356 | : undefined |
| 1357 | ) |
| 1358 | }) |
| 1359 | } |
| 1360 | |
| 1361 | ambientResolver.resolve = resolveAmbient |
| 1362 |
nothing calls this directly
no test coverage detected