fix(docs): index all deeply nested types
This commit is contained in:
parent
074cc7d467
commit
ed4fc28cd3
|
|
@ -372,15 +372,20 @@ class Member {
|
||||||
this.args = new Map();
|
this.args = new Map();
|
||||||
if (this.kind === 'method')
|
if (this.kind === 'method')
|
||||||
this.enclosingMethod = this;
|
this.enclosingMethod = this;
|
||||||
|
const indexType = type => {
|
||||||
|
type.deepProperties().forEach(p => {
|
||||||
|
p.enclosingMethod = this;
|
||||||
|
indexType(p.type);
|
||||||
|
});
|
||||||
|
}
|
||||||
for (const arg of this.argsArray) {
|
for (const arg of this.argsArray) {
|
||||||
this.args.set(arg.name, arg);
|
this.args.set(arg.name, arg);
|
||||||
arg.enclosingMethod = this;
|
arg.enclosingMethod = this;
|
||||||
if (arg.name === 'options') {
|
if (arg.name === 'options') {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
arg.type.properties.sort((p1, p2) => p1.name.localeCompare(p2.name));
|
arg.type.properties.sort((p1, p2) => p1.name.localeCompare(p2.name));
|
||||||
// @ts-ignore
|
|
||||||
arg.type.properties.forEach(p => p.enclosingMethod = this);
|
|
||||||
}
|
}
|
||||||
|
indexType(arg.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue