(specifier: string, edge: ImportEdge)
| 206 | private link(runtime: RuntimeModule): void { |
| 207 | const { module } = runtime |
| 208 | const add = (specifier: string, edge: ImportEdge) => { |
| 209 | // e.g. `export * as ark from "arktype"`, whose errors class is read unfollowed |
| 210 | if ( |
| 211 | (edge.kind === "whole" || edge.kind === "star") && |
| 212 | isArkSpecifier(specifier) |
| 213 | ) { |
| 214 | this.used.add("errors") |
| 215 | this.used.add("thrown") |
| 216 | } |
| 217 | const id = this.program.resolve(specifier, module.id) |
| 218 | if (id === undefined || !this.program.modules.has(id)) { |
| 219 | if (!isArkSpecifier(specifier)) this.used.add("external") |
| 220 | return |
| 221 | } |
| 222 | const edges = this.edgesByTarget.get(id) |
| 223 | if (edges) edges.push(edge) |
| 224 | else this.edgesByTarget.set(id, [edge]) |
| 225 | } |
| 226 | const noteExternal = (specifier: string) => { |
| 227 | if (isArkSpecifier(specifier)) return |
| 228 | const id = this.program.resolve(specifier, module.id) |
no test coverage detected