Fix event and function fragment formatting.

This commit is contained in:
Richard Moore 2019-05-30 20:19:53 -04:00
parent 5ba6a616a6
commit a2d4b29071
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -353,7 +353,7 @@ export abstract class Fragment {
result += "(" + this.inputs.map((i) => i.format(expanded)).join(expanded ? ", ": ",") + ") ";
// @TODO: Handle returns, modifiers, etc.
if (expanded) {
if (expanded && this.type !== "event") {
result += "public ";
if ((<any>this).mutabilityState) {
result += (<any>this).mutabilityState + " ";
@ -362,7 +362,7 @@ export abstract class Fragment {
}
if ((<any>this).outputs && (<any>this).outputs.length) {
result += "(" + (<any>this).outputs.map((i: ParamType) => i.format(expanded)).join(", ") + ") ";
result += "returns (" + (<any>this).outputs.map((i: ParamType) => i.format(expanded)).join(", ") + ") ";
}
}