From ed4fc28cd33535488a1f0298fc838014320f08d4 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 15 Jul 2024 12:53:27 +0200 Subject: [PATCH] fix(docs): index all deeply nested types --- utils/doclint/documentation.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/doclint/documentation.js b/utils/doclint/documentation.js index 54a2153273..8019b5a230 100644 --- a/utils/doclint/documentation.js +++ b/utils/doclint/documentation.js @@ -372,15 +372,20 @@ class Member { this.args = new Map(); if (this.kind === 'method') this.enclosingMethod = this; + const indexType = type => { + type.deepProperties().forEach(p => { + p.enclosingMethod = this; + indexType(p.type); + }); + } for (const arg of this.argsArray) { this.args.set(arg.name, arg); arg.enclosingMethod = this; if (arg.name === 'options') { // @ts-ignore arg.type.properties.sort((p1, p2) => p1.name.localeCompare(p2.name)); - // @ts-ignore - arg.type.properties.forEach(p => p.enclosingMethod = this); } + indexType(arg.type); } }