From 64877a7c5433751ebb75c797a522ee415ef2d11c Mon Sep 17 00:00:00 2001 From: zian Date: Sun, 11 Dec 2022 13:01:57 +0800 Subject: [PATCH] remove default export from generated bindings --- package.json | 3 ++- src/implementation/typescript/class-parser.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 29c4645..ef715f3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "/dist" ], "scripts": { - "build": "npx tsc" + "build": "npx tsc", + "go": "npm run build && npm publish" }, "keywords": [ "ethereum", diff --git a/src/implementation/typescript/class-parser.ts b/src/implementation/typescript/class-parser.ts index 9698568..6fce142 100644 --- a/src/implementation/typescript/class-parser.ts +++ b/src/implementation/typescript/class-parser.ts @@ -32,7 +32,7 @@ export class TypescriptClassParser { } public parse(name: string, body: string) { const importDirective = 'import * as ethers from "ethers"'; - const classSignature = `export default class ${name} `; + const classSignature = `export class ${name} `; const contract = importDirective.concat( NEWLINE, NEWLINE,