(url: string)
| 52 | let promises: Promise<void>[] = [] |
| 53 | |
| 54 | function replacerForDeclaration(url: string) { |
| 55 | if (url[0] === '/') return url |
| 56 | |
| 57 | let absoluteUrl = path.posix.join(normalizePath(base), url) |
| 58 | let relativeUrl = path.posix.relative(normalizePath(root), absoluteUrl) |
| 59 | |
| 60 | // If the path points to a file in the same directory, `path.relative` will |
| 61 | // remove the leading `./` and we need to add it back in order to still |
| 62 | // consider the path relative |
| 63 | if (!relativeUrl.startsWith('.')) { |
| 64 | relativeUrl = './' + relativeUrl |
| 65 | } |
| 66 | |
| 67 | return relativeUrl |
| 68 | } |
| 69 | |
| 70 | walk(ast, (node) => { |
| 71 | if (node.kind !== 'declaration') return |
nothing calls this directly
no test coverage detected