aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/docs_info.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-16 02:36:45 +0800
committerFabio Berger <me@fabioberger.com>2018-08-16 02:36:45 +0800
commita8d44ccc48a7177e749f534a237afb7b9c0f2f2b (patch)
tree35e931893e7d73c32b54fa42ca31930e2fd4540d /packages/react-docs/src/docs_info.ts
parent3b8a343711e0b23a453a1466411e2b9ca68eb0b2 (diff)
downloaddexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.gz
dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.zst
dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.zip
Move external types to link mapping to doc generation util and refactor typedocUtils to be a class to avoid excessive param passing
Diffstat (limited to 'packages/react-docs/src/docs_info.ts')
-rw-r--r--packages/react-docs/src/docs_info.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts
index 4267d8a98..9e990ffc5 100644
--- a/packages/react-docs/src/docs_info.ts
+++ b/packages/react-docs/src/docs_info.ts
@@ -6,17 +6,16 @@ import {
ContractsByVersionByNetworkId,
DocAgnosticFormat,
DocsInfoConfig,
- DocsInfoTypeConfigs,
DocsMenu,
DoxityDocObj,
+ GeneratedDocJson,
SectionNameToMarkdownByVersion,
SectionsMap,
SupportedDocJson,
TypeDefinitionByName,
- GeneratedDocJson,
} from './types';
import { doxityUtils } from './utils/doxity_utils';
-import { typeDocUtils } from './utils/typedoc_utils';
+import { TypeDocUtils } from './utils/typedoc_utils';
export class DocsInfo {
public id: string;
@@ -27,7 +26,6 @@ export class DocsInfo {
public sections: SectionsMap;
public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
- public typeConfigs: DocsInfoTypeConfigs;
constructor(config: DocsInfoConfig) {
this.id = config.id;
this.type = config.type;
@@ -37,7 +35,6 @@ export class DocsInfo {
this.sections = config.markdownSections;
this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion;
this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId;
- this.typeConfigs = config.typeConfigs;
}
public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection {
const menuSubsectionsBySection = {} as MenuSubsectionsBySection;
@@ -101,7 +98,8 @@ export class DocsInfo {
if (this.type === SupportedDocJson.Doxity) {
return doxityUtils.convertToDocAgnosticFormat(docObj as DoxityDocObj);
} else {
- return typeDocUtils.convertToDocAgnosticFormat(docObj as GeneratedDocJson, this);
+ const typeDocUtils = new TypeDocUtils(docObj as GeneratedDocJson, this);
+ return typeDocUtils.convertToDocAgnosticFormat();
}
}
}