Skip to content

Commit

Permalink
Return message from setters for chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
rhinodavid committed Apr 18, 2020
1 parent e1ea531 commit af130ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions build/lib/template/partial/message.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
{{{../indent}}} get{{{this.camelUpperName}}}List(): Array<Uint8Array | string>;
{{{../indent}}} get{{{this.camelUpperName}}}List_asU8(): Array<Uint8Array>;
{{{../indent}}} get{{{this.camelUpperName}}}List_asB64(): Array<string>;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<Uint8Array | string>): void;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<Uint8Array | string>): {{{../message.messageName}}};
{{{../indent}}} {{printRepeatedAddMethod this "Uint8Array | string"}}
{{~else~}}
{{{../indent}}} get{{{this.camelUpperName}}}List(): Array<{{{this.exportType}}}>;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<{{{this.exportType}}}>): void;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<{{{this.exportType}}}>): {{{../message.messageName}}};
{{{../indent}}} {{printRepeatedAddMethod this this.exportType}}
{{~/is~}}
{{~else~}}{{!-- repeat else --}}
{{~#is this.type ../BYTES_TYPE~}}
{{{../indent}}} get{{{this.camelUpperName}}}(): Uint8Array | string;
{{{../indent}}} get{{{this.camelUpperName}}}_asU8(): Uint8Array;
{{{../indent}}} get{{{this.camelUpperName}}}_asB64(): string;
{{{../indent}}} set{{{this.camelUpperName}}}(value: Uint8Array | string): void;
{{{../indent}}} set{{{this.camelUpperName}}}(value: Uint8Array | string): {{{../message.messageName}}};
{{~else~}}
{{{../indent}}} get{{{this.camelUpperName}}}(): {{{this.exportType}}}{{#if this.canBeUndefined}} | undefined{{/if}};
{{{../indent}}} set{{{this.camelUpperName}}}(value{{#is this.type ../MESSAGE_TYPE}}?{{/is}}: {{{this.exportType}}}): void;
{{{../indent}}} set{{{this.camelUpperName}}}(value{{#is this.type ../MESSAGE_TYPE}}?{{/is}}: {{{this.exportType}}}): {{{../message.messageName}}};
{{~/is~}}
{{~/if~}}{{!-- repeat end --}}
{{~/if~}}{{!-- map spec end --}}
Expand Down
8 changes: 4 additions & 4 deletions src/lib/template/partial/message.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
{{{../indent}}} get{{{this.camelUpperName}}}List(): Array<Uint8Array | string>;
{{{../indent}}} get{{{this.camelUpperName}}}List_asU8(): Array<Uint8Array>;
{{{../indent}}} get{{{this.camelUpperName}}}List_asB64(): Array<string>;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<Uint8Array | string>): void;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<Uint8Array | string>): {{{../message.messageName}}};
{{{../indent}}} {{printRepeatedAddMethod this "Uint8Array | string"}}
{{~else~}}
{{{../indent}}} get{{{this.camelUpperName}}}List(): Array<{{{this.exportType}}}>;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<{{{this.exportType}}}>): void;
{{{../indent}}} set{{{this.camelUpperName}}}List(value: Array<{{{this.exportType}}}>): {{{../message.messageName}}};
{{{../indent}}} {{printRepeatedAddMethod this this.exportType}}
{{~/is~}}
{{~else~}}{{!-- repeat else --}}
{{~#is this.type ../BYTES_TYPE~}}
{{{../indent}}} get{{{this.camelUpperName}}}(): Uint8Array | string;
{{{../indent}}} get{{{this.camelUpperName}}}_asU8(): Uint8Array;
{{{../indent}}} get{{{this.camelUpperName}}}_asB64(): string;
{{{../indent}}} set{{{this.camelUpperName}}}(value: Uint8Array | string): void;
{{{../indent}}} set{{{this.camelUpperName}}}(value: Uint8Array | string): {{{../message.messageName}}};
{{~else~}}
{{{../indent}}} get{{{this.camelUpperName}}}(): {{{this.exportType}}}{{#if this.canBeUndefined}} | undefined{{/if}};
{{{../indent}}} set{{{this.camelUpperName}}}(value{{#is this.type ../MESSAGE_TYPE}}?{{/is}}: {{{this.exportType}}}): void;
{{{../indent}}} set{{{this.camelUpperName}}}(value{{#is this.type ../MESSAGE_TYPE}}?{{/is}}: {{{this.exportType}}}): {{{../message.messageName}}};
{{~/is~}}
{{~/if~}}{{!-- repeat end --}}
{{~/if~}}{{!-- map spec end --}}
Expand Down

0 comments on commit af130ff

Please sign in to comment.