(id)
| 89 | return this.resolve(source, parent.file, { ...options, skipSelf: true }) |
| 90 | }, |
| 91 | load(id) { |
| 92 | const loaded = Protocol.resolvedRequest(id) |
| 93 | if (loaded === undefined) { |
| 94 | return null |
| 95 | } |
| 96 | |
| 97 | this.addWatchFile(loaded.file) |
| 98 | return loadExamples(loaded.file, loaded.version).then((snippets) => { |
| 99 | if (loaded.kind === "collector") { |
| 100 | return collectorModule(loaded.file, snippets, loaded.version) |
| 101 | } |
| 102 | |
| 103 | const snippet = loaded.index === undefined ? undefined : snippets[loaded.index] |
| 104 | if (snippet === undefined) { |
| 105 | throw new Error(`Unknown documentation snippet module '${id}'`) |
| 106 | } |
| 107 | |
| 108 | return transform(snippet.source, loaded.file, snippet.line) |
| 109 | }) |
| 110 | }, |
| 111 | watchChange(id) { |
| 112 | const normalized = normalizePath(id) |
| 113 | for (const file of store.keys()) { |
nothing calls this directly
no test coverage detected