()
| 168 | } |
| 169 | |
| 170 | private get thisReads(): ThisReads { |
| 171 | if (this.reads) return this.reads |
| 172 | const reached = this.program.reached?.() |
| 173 | const modules = |
| 174 | reached?.modules ?? |
| 175 | [...this.program.modules.values()].map(runtime => runtime.module) |
| 176 | const resolve = |
| 177 | reached?.resolve ?? |
| 178 | ((specifier: string, importer: SourceModule) => { |
| 179 | const id = this.program.resolve(specifier, importer.id) |
| 180 | return id === undefined ? undefined : ( |
| 181 | this.program.modules.get(id)?.module |
| 182 | ) |
| 183 | }) |
| 184 | return (this.reads = thisReadsOf(modules, { |
| 185 | entries: this.program.entries, |
| 186 | exposed: this.program.exposed, |
| 187 | resolve |
| 188 | })) |
| 189 | } |
| 190 | |
| 191 | analyze(): void { |
| 192 | for (const runtime of this.program.modules.values()) this.link(runtime) |
nothing calls this directly
no test coverage detected