From f52b42d8d4cc64841ebeee733e03bf0bc7b6100d Mon Sep 17 00:00:00 2001 From: vanyauhalin Date: Tue, 10 Dec 2024 17:08:33 +0400 Subject: [PATCH] temp: add typedoc-declaration package x17 --- packages/typedoc-declaration/lib/internal.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/typedoc-declaration/lib/internal.ts b/packages/typedoc-declaration/lib/internal.ts index 01e0ab673..4f4c01b58 100644 --- a/packages/typedoc-declaration/lib/internal.ts +++ b/packages/typedoc-declaration/lib/internal.ts @@ -1214,13 +1214,12 @@ export class Repository { const d = e.declaration const f = flatTrail(t.trail.real) r.#trailIndex.set(d, f) - r.#definitionIndex.set(t.sourceId, d) + r.#idIndex.set(t.sourceId, e.id) for (const [i, p] of t.parameters.entries()) { - const e = d.parameters[i] + const m = d.parameters[i] const f = flatTrail(p.trail.real) - r.#trailIndex.set(e, f) - r.#definitionIndex.set(p.sourceId, e) + r.#trailIndex.set(m, f) } } @@ -1237,7 +1236,7 @@ export class Repository { #trailIndex = new Map() - #definitionIndex = new Map() + #idIndex = new Map() constructor(o: J.Reflection) { this.#sourceTree = o @@ -1251,8 +1250,8 @@ export class Repository { return resolveTrail(this.#sourceTree, t) } - definitionOf(o: J.Reflection): L.Definition | undefined { - return this.#definitionIndex.get(o.id) + idOf(o: J.Reflection): number | undefined { + return this.#idIndex.get(o.id) } }