From f5a9f9bea705ad180d8dde5996115c14e45f6075 Mon Sep 17 00:00:00 2001 From: "ilya.tychinin" Date: Thu, 2 May 2019 05:40:07 +0500 Subject: [PATCH] feat(docz-core): add config docgen ts resolver --- core/docz-core/src/utils/docgen/typescript.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/docz-core/src/utils/docgen/typescript.ts b/core/docz-core/src/utils/docgen/typescript.ts index c4f172c1c..41aa39ce4 100644 --- a/core/docz-core/src/utils/docgen/typescript.ts +++ b/core/docz-core/src/utils/docgen/typescript.ts @@ -164,6 +164,14 @@ const parseFiles = (files: string[], config: Config, tsconfig: string) => { const val = propFilter && _.isFunction(propFilter) && propFilter(prop) return !prop.parent.fileName.includes('node_modules') || Boolean(val) }, + componentNameResolver(exp: ts.Symbol, source: ts.SourceFile): any { + const componentNameResolver = config.docgenConfig.resolver + const val = + componentNameResolver && + _.isFunction(componentNameResolver) && + componentNameResolver(exp, source) + return val + }, } loadFiles(files)