aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation/docs_info.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-20 13:44:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 22:30:25 +0800
commitcb11aec84df346d5180c7d5874859c1c34f0bf1c (patch)
treeb959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/website/ts/pages/documentation/docs_info.ts
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
downloaddexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.zip
Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors
Diffstat (limited to 'packages/website/ts/pages/documentation/docs_info.ts')
-rw-r--r--packages/website/ts/pages/documentation/docs_info.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/website/ts/pages/documentation/docs_info.ts b/packages/website/ts/pages/documentation/docs_info.ts
index 1afcf8aaf..b88b247e8 100644
--- a/packages/website/ts/pages/documentation/docs_info.ts
+++ b/packages/website/ts/pages/documentation/docs_info.ts
@@ -19,7 +19,7 @@ export class DocsInfo {
public menu: DocsMenu;
public sections: SectionsMap;
public sectionNameToMarkdown: {[sectionName: string]: string};
- private docsInfo: DocsInfoConfig;
+ private _docsInfo: DocsInfoConfig;
constructor(config: DocsInfoConfig) {
this.displayName = config.displayName;
this.packageUrl = config.packageUrl;
@@ -28,32 +28,32 @@ export class DocsInfo {
this.docsJsonRoot = config.docsJsonRoot;
this.sections = config.sections;
this.sectionNameToMarkdown = config.sectionNameToMarkdown;
- this.docsInfo = config;
+ this._docsInfo = config;
}
public isPublicType(typeName: string): boolean {
- if (_.isUndefined(this.docsInfo.publicTypes)) {
+ if (_.isUndefined(this._docsInfo.publicTypes)) {
return false;
}
- const isPublic = _.includes(this.docsInfo.publicTypes, typeName);
+ const isPublic = _.includes(this._docsInfo.publicTypes, typeName);
return isPublic;
}
public getModulePathsIfExists(sectionName: string): string[] {
- const modulePathsIfExists = this.docsInfo.sectionNameToModulePath[sectionName];
+ const modulePathsIfExists = this._docsInfo.sectionNameToModulePath[sectionName];
return modulePathsIfExists;
}
public getMenu(selectedVersion?: string): {[section: string]: string[]} {
- if (_.isUndefined(selectedVersion) || _.isUndefined(this.docsInfo.menuSubsectionToVersionWhenIntroduced)) {
- return this.docsInfo.menu;
+ if (_.isUndefined(selectedVersion) || _.isUndefined(this._docsInfo.menuSubsectionToVersionWhenIntroduced)) {
+ return this._docsInfo.menu;
}
- const finalMenu = _.cloneDeep(this.docsInfo.menu);
+ const finalMenu = _.cloneDeep(this._docsInfo.menu);
if (_.isUndefined(finalMenu.contracts)) {
return finalMenu;
}
// TODO: refactor to include more sections then simply the `contracts` section
finalMenu.contracts = _.filter(finalMenu.contracts, (contractName: string) => {
- const versionIntroducedIfExists = this.docsInfo.menuSubsectionToVersionWhenIntroduced[contractName];
+ const versionIntroducedIfExists = this._docsInfo.menuSubsectionToVersionWhenIntroduced[contractName];
if (!_.isUndefined(versionIntroducedIfExists)) {
const existsInSelectedVersion = compareVersions(selectedVersion,
versionIntroducedIfExists) >= 0;
@@ -104,9 +104,9 @@ export class DocsInfo {
return typeDefinitionByName;
}
public isVisibleConstructor(sectionName: string): boolean {
- return _.includes(this.docsInfo.visibleConstructors, sectionName);
+ return _.includes(this._docsInfo.visibleConstructors, sectionName);
}
public convertToDocAgnosticFormat(docObj: DoxityDocObj|TypeDocNode): DocAgnosticFormat {
- return this.docsInfo.convertToDocAgnosticFormatFn(docObj, this);
+ return this._docsInfo.convertToDocAgnosticFormatFn(docObj, this);
}
}