|
1 | 1 | import { assertNever, i18n, NonEnumerable, type NormalizedPath, removeIf } from "#utils"; |
2 | | -import type { Reflection } from "./Reflection.js"; |
| 2 | +import type { Reflection, ReflectionId } from "./Reflection.js"; |
3 | 3 | import { ReflectionSymbolId } from "./ReflectionSymbolId.js"; |
4 | 4 |
|
5 | 5 | import type { Deserializer, JSONOutput, Serializer } from "#serialization"; |
| 6 | +import type { FileId } from "./FileRegistry.js"; |
6 | 7 |
|
7 | 8 | /** |
8 | 9 | * Represents a parsed piece of a comment. |
@@ -62,7 +63,7 @@ export interface RelativeLinkDisplayPart { |
62 | 63 | * A link to either some document outside of the project or a reflection. |
63 | 64 | * This may be `undefined` if the relative path does not exist. |
64 | 65 | */ |
65 | | - target: number | undefined; |
| 66 | + target: FileId | undefined; |
66 | 67 | /** |
67 | 68 | * Anchor within the target page, validated after rendering if possible |
68 | 69 | */ |
@@ -238,10 +239,10 @@ export class Comment { |
238 | 239 | parts: JSONOutput.CommentDisplayPart[], |
239 | 240 | ): CommentDisplayPart[] { |
240 | 241 | const links: [ |
241 | | - number, |
| 242 | + ReflectionId, |
242 | 243 | InlineTagDisplayPart | RelativeLinkDisplayPart, |
243 | 244 | ][] = []; |
244 | | - const files: [number, RelativeLinkDisplayPart][] = []; |
| 245 | + const files: [FileId, RelativeLinkDisplayPart][] = []; |
245 | 246 |
|
246 | 247 | const result = parts.map((part): CommentDisplayPart => { |
247 | 248 | switch (part.kind) { |
|
0 commit comments