aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc
diff options
context:
space:
mode:
authorKadinsky <kandinsky454@protonmail.ch>2018-10-18 02:01:29 +0800
committerGitHub <noreply@github.com>2018-10-18 02:01:29 +0800
commit5ec4b27200297708298deca97603849a37b2f66a (patch)
tree96c28898329c3bf786a08549384f2de79d0903f8 /packages/sol-doc
parentb2012bf1610eda65afe180b04df6c9ee8f5dc659 (diff)
parentbdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295 (diff)
downloaddexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar.gz
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar.bz2
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar.lz
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar.xz
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.tar.zst
dexon-sol-tools-5ec4b27200297708298deca97603849a37b2f66a.zip
Merge pull request #1145 from 0xProject/refactorSchemasToJSON
Move json-schema schemas to JSON files
Diffstat (limited to 'packages/sol-doc')
-rw-r--r--packages/sol-doc/src/sol_doc.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/sol-doc/src/sol_doc.ts b/packages/sol-doc/src/sol_doc.ts
index 138882c92..686e9ca34 100644
--- a/packages/sol-doc/src/sol_doc.ts
+++ b/packages/sol-doc/src/sol_doc.ts
@@ -324,19 +324,25 @@ export class SolDoc {
switch (abiDefinition.type) {
case 'constructor':
docSection.constructors.push(
- this._genConstructorDoc(contractName, abiDefinition, compiledContract.devdoc),
+ // tslint:disable-next-line:no-unnecessary-type-assertion
+ this._genConstructorDoc(contractName, abiDefinition as ConstructorAbi, compiledContract.devdoc),
);
break;
case 'event':
- (docSection.events as Event[]).push(SolDoc._genEventDoc(abiDefinition));
+ // tslint:disable-next-line:no-unnecessary-type-assertion
+ (docSection.events as Event[]).push(SolDoc._genEventDoc(abiDefinition as EventAbi));
// note that we're not sending devdoc to this._genEventDoc().
// that's because the type of the events array doesn't have any fields for documentation!
break;
case 'function':
- docSection.methods.push(this._genMethodDoc(abiDefinition, compiledContract.devdoc));
+ // tslint:disable-next-line:no-unnecessary-type-assertion
+ docSection.methods.push(this._genMethodDoc(abiDefinition as MethodAbi, compiledContract.devdoc));
break;
case 'fallback':
- docSection.methods.push(SolDoc._genFallbackDoc(abiDefinition, compiledContract.devdoc));
+ // tslint:disable-next-line:no-unnecessary-type-assertion
+ docSection.methods.push(
+ SolDoc._genFallbackDoc(abiDefinition as FallbackAbi, compiledContract.devdoc),
+ );
break;
default:
throw new Error(