Add support for nested methods within type declarations. Make sure they render without a callPath.

This commit is contained in:
Fabio Berger
2018-04-11 16:53:13 +09:00
parent de6f757ec8
commit 7d9c6eafbf
3 changed files with 10 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ import {
Type,
TypeDocNode,
TypeDocType,
TypeDocTypes,
TypeParameter,
TypescriptFunction,
TypescriptMethod,
@@ -221,9 +222,16 @@ export const typeDocUtils = {
const childrenIfExist = !_.isUndefined(entity.children)
? _.map(entity.children, (child: TypeDocNode) => {
const childTypeIfExists = !_.isUndefined(child.type)
let childTypeIfExists = !_.isUndefined(child.type)
? typeDocUtils._convertType(child.type, sections, sectionName, docId)
: undefined;
if (child.kindString === KindString.Method) {
childTypeIfExists = {
name: child.name,
typeDocType: TypeDocTypes.Reflection,
method: this._convertMethod(child, isConstructor, sections, sectionName, docId),
};
}
const c: CustomTypeChild = {
name: child.name,
type: childTypeIfExists,