diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-23 01:52:17 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-23 01:52:17 +0800 |
commit | b7c119b2aaaa2f3579ca4aeef198eca7f38f1216 (patch) | |
tree | 16956eb295a2b0a21fcab07b4e2377c2cd59d3c9 /packages/react-docs | |
parent | 3c2af2067f768bd3ffe233d9a7c2d0232db6868e (diff) | |
download | dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.gz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.bz2 dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.lz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.xz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.zst dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.zip |
Fix many linter errors that showed up upon upgrading tsutil
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/src/utils/typedoc_utils.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 0eaf5fd6e..76443ad81 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -26,12 +26,12 @@ import { import { constants } from './constants'; export class TypeDocUtils { - private _typeDocNameOrder: string[]; - private _externalTypeToLink: ExternalTypeToLink; - private _externalExportToLink: ExternalExportToLink; - private _docsInfo: DocsInfo; - private _typeDocJson: TypeDocNode; - private _classNames: string[]; + private readonly _typeDocNameOrder: string[]; + private readonly _externalTypeToLink: ExternalTypeToLink; + private readonly _externalExportToLink: ExternalExportToLink; + private readonly _docsInfo: DocsInfo; + private readonly _typeDocJson: TypeDocNode; + private readonly _classNames: string[]; constructor(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo) { this._docsInfo = docsInfo; const exportPathOrder = generatedDocJson.metadata.exportPathOrder; @@ -191,7 +191,7 @@ export class TypeDocUtils { case KindString.Function: if (entity.flags.isExported) { - const funcName = (entity as TypeDocNode).signatures[0].name; + const funcName = entity.signatures[0].name; if (!this.isUnderscorePrefixed(funcName)) { const func = this._convertFunction(entity, sectionName, isClassOrObjectLiteral); docSection.functions.push(func); @@ -262,7 +262,7 @@ export class TypeDocUtils { ? this._convertMethod(entity.declaration, isConstructor, sectionName) : undefined; const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature); - const indexSignature = entity.indexSignature as TypeDocNode; + const indexSignature = entity.indexSignature; const indexSignatureIfExists = doesIndexSignatureExist ? this._convertIndexSignature(indexSignature, sectionName) : undefined; @@ -379,7 +379,7 @@ export class TypeDocUtils { } return callPath; } - private _getLowercaseSectionName(sectionName: string) { + private _getLowercaseSectionName(sectionName: string): string { if (_.startsWith(sectionName, 'ERC')) { return `${sectionName.slice(0, 3).toLowerCase()}${sectionName.slice(3)}`; } @@ -461,7 +461,7 @@ export class TypeDocUtils { const doesIndexSignatureExist = !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); if (doesIndexSignatureExist) { - const indexSignature = entity.declaration.indexSignature as TypeDocNode; + const indexSignature = entity.declaration.indexSignature; indexSignatureIfExists = this._convertIndexSignature(indexSignature, sectionName); } else if (!_.isUndefined(entity.declaration)) { const isConstructor = false; |