diff --git a/build/lib/template/partial/message.hbs b/build/lib/template/partial/message.hbs index 15cbd68..4318e28 100644 --- a/build/lib/template/partial/message.hbs +++ b/build/lib/template/partial/message.hbs @@ -39,7 +39,6 @@ {{~/is~}} {{~/if~}}{{!-- repeat end --}} {{~/if~}}{{!-- map spec end --}} - {{/each}}{{!-- fields end --}} {{~#if message.oneofDeclList~}}{{!-- oneofDeclList start --}} {{#each message.oneofDeclList}} diff --git a/build/lib/template/partial/oneof.hbs b/build/lib/template/partial/oneof.hbs index dbc0f36..4b4a1fe 100644 --- a/build/lib/template/partial/oneof.hbs +++ b/build/lib/template/partial/oneof.hbs @@ -1,7 +1,7 @@ {{{indent}}}export enum {{{oneofName}}}Case { {{{indent}}} {{{oneofNameUpper}}}_NOT_SET = 0, -{{{indent}}}{{#each fields}} -{{{indent}}} {{{@key}}} = {{{this}}}, -{{{indent}}}{{/each}} +{{#each fields ~}} +{{{../indent}}} {{{@key}}} = {{{this}}}, +{{/each ~}} {{{indent}}}{{curlyRight}} \ No newline at end of file diff --git a/examples/build/grpc/proto/book_pb.d.ts b/examples/build/grpc/proto/book_pb.d.ts index 61987fe..b76a264 100644 --- a/examples/build/grpc/proto/book_pb.d.ts +++ b/examples/build/grpc/proto/book_pb.d.ts @@ -9,14 +9,11 @@ import * as jspb from "google-protobuf"; export class Book extends jspb.Message { getIsbn(): number; setIsbn(value: number): Book; - getTitle(): string; setTitle(value: string): Book; - getAuthor(): string; setAuthor(value: string): Book; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Book.AsObject; static toObject(includeInstance: boolean, msg: Book): Book.AsObject; @@ -39,7 +36,6 @@ export class GetBookRequest extends jspb.Message { getIsbn(): number; setIsbn(value: number): GetBookRequest; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBookRequest): GetBookRequest.AsObject; @@ -60,7 +56,6 @@ export class GetBookViaAuthor extends jspb.Message { getAuthor(): string; setAuthor(value: string): GetBookViaAuthor; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookViaAuthor.AsObject; static toObject(includeInstance: boolean, msg: GetBookViaAuthor): GetBookViaAuthor.AsObject; @@ -81,11 +76,9 @@ export class BookStore extends jspb.Message { getName(): string; setName(value: string): BookStore; - getBooksMap(): jspb.Map; clearBooksMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BookStore.AsObject; static toObject(includeInstance: boolean, msg: BookStore): BookStore.AsObject; @@ -107,17 +100,13 @@ export namespace BookStore { export class SpecialCases extends jspb.Message { getNormal(): string; setNormal(value: string): SpecialCases; - getDefault(): string; setDefault(value: string): SpecialCases; - getFunction(): string; setFunction(value: string): SpecialCases; - getVar(): string; setVar(value: string): SpecialCases; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SpecialCases.AsObject; static toObject(includeInstance: boolean, msg: SpecialCases): SpecialCases.AsObject; @@ -144,25 +133,21 @@ export class OneOfSample extends jspb.Message { getA1(): boolean; setA1(value: boolean): OneOfSample; - hasB1(): boolean; clearB1(): void; getB1(): boolean; setB1(value: boolean): OneOfSample; - hasA2(): boolean; clearA2(): void; getA2(): boolean; setA2(value: boolean): OneOfSample; - hasB2(): boolean; clearB2(): void; getB2(): boolean; setB2(value: boolean): OneOfSample; - getSinglewordCase(): OneOfSample.SinglewordCase; getTwoWordsCase(): OneOfSample.TwoWordsCase; @@ -186,20 +171,14 @@ export namespace OneOfSample { export enum SinglewordCase { SINGLEWORD_NOT_SET = 0, - - A1 = 1, - - B1 = 2, - + A1 = 1, + B1 = 2, } export enum TwoWordsCase { TWO_WORDS_NOT_SET = 0, - - A_2 = 3, - - B_2 = 4, - + A_2 = 3, + B_2 = 4, } } @@ -208,7 +187,6 @@ export class ExtMsgString extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgString; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgString.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgString): ExtMsgString.AsObject; @@ -231,7 +209,6 @@ export class ExtMsgList extends jspb.Message { setExtensionList(value: Array): ExtMsgList; addExtension$(value: string, index?: number): string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgList): ExtMsgList.AsObject; @@ -254,7 +231,6 @@ export class ExtMsgByte extends jspb.Message { getExtension_asB64(): string; setExtension$(value: Uint8Array | string): ExtMsgByte; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByte.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByte): ExtMsgByte.AsObject; @@ -279,7 +255,6 @@ export class ExtMsgByteList extends jspb.Message { setExtensionList(value: Array): ExtMsgByteList; addExtension$(value: Uint8Array | string, index?: number): Uint8Array | string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByteList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByteList): ExtMsgByteList.AsObject; @@ -301,7 +276,6 @@ export class ExtMsgMap extends jspb.Message { getExtensionMap(): jspb.Map; clearExtensionMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgMap.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgMap): ExtMsgMap.AsObject; @@ -326,7 +300,6 @@ export class ExtMsgOneOf extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgOneOf; - getExtCase(): ExtMsgOneOf.ExtCase; serializeBinary(): Uint8Array; @@ -346,9 +319,7 @@ export namespace ExtMsgOneOf { export enum ExtCase { EXT_NOT_SET = 0, - - EXTENSION = 1, - + EXTENSION = 1, } } diff --git a/examples/build/grpcjs/proto/book_pb.d.ts b/examples/build/grpcjs/proto/book_pb.d.ts index 61987fe..b76a264 100644 --- a/examples/build/grpcjs/proto/book_pb.d.ts +++ b/examples/build/grpcjs/proto/book_pb.d.ts @@ -9,14 +9,11 @@ import * as jspb from "google-protobuf"; export class Book extends jspb.Message { getIsbn(): number; setIsbn(value: number): Book; - getTitle(): string; setTitle(value: string): Book; - getAuthor(): string; setAuthor(value: string): Book; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Book.AsObject; static toObject(includeInstance: boolean, msg: Book): Book.AsObject; @@ -39,7 +36,6 @@ export class GetBookRequest extends jspb.Message { getIsbn(): number; setIsbn(value: number): GetBookRequest; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBookRequest): GetBookRequest.AsObject; @@ -60,7 +56,6 @@ export class GetBookViaAuthor extends jspb.Message { getAuthor(): string; setAuthor(value: string): GetBookViaAuthor; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookViaAuthor.AsObject; static toObject(includeInstance: boolean, msg: GetBookViaAuthor): GetBookViaAuthor.AsObject; @@ -81,11 +76,9 @@ export class BookStore extends jspb.Message { getName(): string; setName(value: string): BookStore; - getBooksMap(): jspb.Map; clearBooksMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BookStore.AsObject; static toObject(includeInstance: boolean, msg: BookStore): BookStore.AsObject; @@ -107,17 +100,13 @@ export namespace BookStore { export class SpecialCases extends jspb.Message { getNormal(): string; setNormal(value: string): SpecialCases; - getDefault(): string; setDefault(value: string): SpecialCases; - getFunction(): string; setFunction(value: string): SpecialCases; - getVar(): string; setVar(value: string): SpecialCases; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SpecialCases.AsObject; static toObject(includeInstance: boolean, msg: SpecialCases): SpecialCases.AsObject; @@ -144,25 +133,21 @@ export class OneOfSample extends jspb.Message { getA1(): boolean; setA1(value: boolean): OneOfSample; - hasB1(): boolean; clearB1(): void; getB1(): boolean; setB1(value: boolean): OneOfSample; - hasA2(): boolean; clearA2(): void; getA2(): boolean; setA2(value: boolean): OneOfSample; - hasB2(): boolean; clearB2(): void; getB2(): boolean; setB2(value: boolean): OneOfSample; - getSinglewordCase(): OneOfSample.SinglewordCase; getTwoWordsCase(): OneOfSample.TwoWordsCase; @@ -186,20 +171,14 @@ export namespace OneOfSample { export enum SinglewordCase { SINGLEWORD_NOT_SET = 0, - - A1 = 1, - - B1 = 2, - + A1 = 1, + B1 = 2, } export enum TwoWordsCase { TWO_WORDS_NOT_SET = 0, - - A_2 = 3, - - B_2 = 4, - + A_2 = 3, + B_2 = 4, } } @@ -208,7 +187,6 @@ export class ExtMsgString extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgString; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgString.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgString): ExtMsgString.AsObject; @@ -231,7 +209,6 @@ export class ExtMsgList extends jspb.Message { setExtensionList(value: Array): ExtMsgList; addExtension$(value: string, index?: number): string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgList): ExtMsgList.AsObject; @@ -254,7 +231,6 @@ export class ExtMsgByte extends jspb.Message { getExtension_asB64(): string; setExtension$(value: Uint8Array | string): ExtMsgByte; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByte.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByte): ExtMsgByte.AsObject; @@ -279,7 +255,6 @@ export class ExtMsgByteList extends jspb.Message { setExtensionList(value: Array): ExtMsgByteList; addExtension$(value: Uint8Array | string, index?: number): Uint8Array | string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByteList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByteList): ExtMsgByteList.AsObject; @@ -301,7 +276,6 @@ export class ExtMsgMap extends jspb.Message { getExtensionMap(): jspb.Map; clearExtensionMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgMap.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgMap): ExtMsgMap.AsObject; @@ -326,7 +300,6 @@ export class ExtMsgOneOf extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgOneOf; - getExtCase(): ExtMsgOneOf.ExtCase; serializeBinary(): Uint8Array; @@ -346,9 +319,7 @@ export namespace ExtMsgOneOf { export enum ExtCase { EXT_NOT_SET = 0, - - EXTENSION = 1, - + EXTENSION = 1, } } diff --git a/examples/src/grpc/proto/book_pb.d.ts b/examples/src/grpc/proto/book_pb.d.ts index 61987fe..b76a264 100644 --- a/examples/src/grpc/proto/book_pb.d.ts +++ b/examples/src/grpc/proto/book_pb.d.ts @@ -9,14 +9,11 @@ import * as jspb from "google-protobuf"; export class Book extends jspb.Message { getIsbn(): number; setIsbn(value: number): Book; - getTitle(): string; setTitle(value: string): Book; - getAuthor(): string; setAuthor(value: string): Book; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Book.AsObject; static toObject(includeInstance: boolean, msg: Book): Book.AsObject; @@ -39,7 +36,6 @@ export class GetBookRequest extends jspb.Message { getIsbn(): number; setIsbn(value: number): GetBookRequest; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBookRequest): GetBookRequest.AsObject; @@ -60,7 +56,6 @@ export class GetBookViaAuthor extends jspb.Message { getAuthor(): string; setAuthor(value: string): GetBookViaAuthor; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookViaAuthor.AsObject; static toObject(includeInstance: boolean, msg: GetBookViaAuthor): GetBookViaAuthor.AsObject; @@ -81,11 +76,9 @@ export class BookStore extends jspb.Message { getName(): string; setName(value: string): BookStore; - getBooksMap(): jspb.Map; clearBooksMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BookStore.AsObject; static toObject(includeInstance: boolean, msg: BookStore): BookStore.AsObject; @@ -107,17 +100,13 @@ export namespace BookStore { export class SpecialCases extends jspb.Message { getNormal(): string; setNormal(value: string): SpecialCases; - getDefault(): string; setDefault(value: string): SpecialCases; - getFunction(): string; setFunction(value: string): SpecialCases; - getVar(): string; setVar(value: string): SpecialCases; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SpecialCases.AsObject; static toObject(includeInstance: boolean, msg: SpecialCases): SpecialCases.AsObject; @@ -144,25 +133,21 @@ export class OneOfSample extends jspb.Message { getA1(): boolean; setA1(value: boolean): OneOfSample; - hasB1(): boolean; clearB1(): void; getB1(): boolean; setB1(value: boolean): OneOfSample; - hasA2(): boolean; clearA2(): void; getA2(): boolean; setA2(value: boolean): OneOfSample; - hasB2(): boolean; clearB2(): void; getB2(): boolean; setB2(value: boolean): OneOfSample; - getSinglewordCase(): OneOfSample.SinglewordCase; getTwoWordsCase(): OneOfSample.TwoWordsCase; @@ -186,20 +171,14 @@ export namespace OneOfSample { export enum SinglewordCase { SINGLEWORD_NOT_SET = 0, - - A1 = 1, - - B1 = 2, - + A1 = 1, + B1 = 2, } export enum TwoWordsCase { TWO_WORDS_NOT_SET = 0, - - A_2 = 3, - - B_2 = 4, - + A_2 = 3, + B_2 = 4, } } @@ -208,7 +187,6 @@ export class ExtMsgString extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgString; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgString.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgString): ExtMsgString.AsObject; @@ -231,7 +209,6 @@ export class ExtMsgList extends jspb.Message { setExtensionList(value: Array): ExtMsgList; addExtension$(value: string, index?: number): string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgList): ExtMsgList.AsObject; @@ -254,7 +231,6 @@ export class ExtMsgByte extends jspb.Message { getExtension_asB64(): string; setExtension$(value: Uint8Array | string): ExtMsgByte; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByte.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByte): ExtMsgByte.AsObject; @@ -279,7 +255,6 @@ export class ExtMsgByteList extends jspb.Message { setExtensionList(value: Array): ExtMsgByteList; addExtension$(value: Uint8Array | string, index?: number): Uint8Array | string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByteList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByteList): ExtMsgByteList.AsObject; @@ -301,7 +276,6 @@ export class ExtMsgMap extends jspb.Message { getExtensionMap(): jspb.Map; clearExtensionMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgMap.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgMap): ExtMsgMap.AsObject; @@ -326,7 +300,6 @@ export class ExtMsgOneOf extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgOneOf; - getExtCase(): ExtMsgOneOf.ExtCase; serializeBinary(): Uint8Array; @@ -346,9 +319,7 @@ export namespace ExtMsgOneOf { export enum ExtCase { EXT_NOT_SET = 0, - - EXTENSION = 1, - + EXTENSION = 1, } } diff --git a/examples/src/grpcjs/proto/book_pb.d.ts b/examples/src/grpcjs/proto/book_pb.d.ts index 61987fe..b76a264 100644 --- a/examples/src/grpcjs/proto/book_pb.d.ts +++ b/examples/src/grpcjs/proto/book_pb.d.ts @@ -9,14 +9,11 @@ import * as jspb from "google-protobuf"; export class Book extends jspb.Message { getIsbn(): number; setIsbn(value: number): Book; - getTitle(): string; setTitle(value: string): Book; - getAuthor(): string; setAuthor(value: string): Book; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Book.AsObject; static toObject(includeInstance: boolean, msg: Book): Book.AsObject; @@ -39,7 +36,6 @@ export class GetBookRequest extends jspb.Message { getIsbn(): number; setIsbn(value: number): GetBookRequest; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBookRequest): GetBookRequest.AsObject; @@ -60,7 +56,6 @@ export class GetBookViaAuthor extends jspb.Message { getAuthor(): string; setAuthor(value: string): GetBookViaAuthor; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBookViaAuthor.AsObject; static toObject(includeInstance: boolean, msg: GetBookViaAuthor): GetBookViaAuthor.AsObject; @@ -81,11 +76,9 @@ export class BookStore extends jspb.Message { getName(): string; setName(value: string): BookStore; - getBooksMap(): jspb.Map; clearBooksMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BookStore.AsObject; static toObject(includeInstance: boolean, msg: BookStore): BookStore.AsObject; @@ -107,17 +100,13 @@ export namespace BookStore { export class SpecialCases extends jspb.Message { getNormal(): string; setNormal(value: string): SpecialCases; - getDefault(): string; setDefault(value: string): SpecialCases; - getFunction(): string; setFunction(value: string): SpecialCases; - getVar(): string; setVar(value: string): SpecialCases; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SpecialCases.AsObject; static toObject(includeInstance: boolean, msg: SpecialCases): SpecialCases.AsObject; @@ -144,25 +133,21 @@ export class OneOfSample extends jspb.Message { getA1(): boolean; setA1(value: boolean): OneOfSample; - hasB1(): boolean; clearB1(): void; getB1(): boolean; setB1(value: boolean): OneOfSample; - hasA2(): boolean; clearA2(): void; getA2(): boolean; setA2(value: boolean): OneOfSample; - hasB2(): boolean; clearB2(): void; getB2(): boolean; setB2(value: boolean): OneOfSample; - getSinglewordCase(): OneOfSample.SinglewordCase; getTwoWordsCase(): OneOfSample.TwoWordsCase; @@ -186,20 +171,14 @@ export namespace OneOfSample { export enum SinglewordCase { SINGLEWORD_NOT_SET = 0, - - A1 = 1, - - B1 = 2, - + A1 = 1, + B1 = 2, } export enum TwoWordsCase { TWO_WORDS_NOT_SET = 0, - - A_2 = 3, - - B_2 = 4, - + A_2 = 3, + B_2 = 4, } } @@ -208,7 +187,6 @@ export class ExtMsgString extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgString; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgString.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgString): ExtMsgString.AsObject; @@ -231,7 +209,6 @@ export class ExtMsgList extends jspb.Message { setExtensionList(value: Array): ExtMsgList; addExtension$(value: string, index?: number): string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgList): ExtMsgList.AsObject; @@ -254,7 +231,6 @@ export class ExtMsgByte extends jspb.Message { getExtension_asB64(): string; setExtension$(value: Uint8Array | string): ExtMsgByte; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByte.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByte): ExtMsgByte.AsObject; @@ -279,7 +255,6 @@ export class ExtMsgByteList extends jspb.Message { setExtensionList(value: Array): ExtMsgByteList; addExtension$(value: Uint8Array | string, index?: number): Uint8Array | string; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgByteList.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgByteList): ExtMsgByteList.AsObject; @@ -301,7 +276,6 @@ export class ExtMsgMap extends jspb.Message { getExtensionMap(): jspb.Map; clearExtensionMap(): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtMsgMap.AsObject; static toObject(includeInstance: boolean, msg: ExtMsgMap): ExtMsgMap.AsObject; @@ -326,7 +300,6 @@ export class ExtMsgOneOf extends jspb.Message { getExtension$(): string; setExtension$(value: string): ExtMsgOneOf; - getExtCase(): ExtMsgOneOf.ExtCase; serializeBinary(): Uint8Array; @@ -346,9 +319,7 @@ export namespace ExtMsgOneOf { export enum ExtCase { EXT_NOT_SET = 0, - - EXTENSION = 1, - + EXTENSION = 1, } } diff --git a/src/lib/template/partial/message.hbs b/src/lib/template/partial/message.hbs index 15cbd68..4318e28 100644 --- a/src/lib/template/partial/message.hbs +++ b/src/lib/template/partial/message.hbs @@ -39,7 +39,6 @@ {{~/is~}} {{~/if~}}{{!-- repeat end --}} {{~/if~}}{{!-- map spec end --}} - {{/each}}{{!-- fields end --}} {{~#if message.oneofDeclList~}}{{!-- oneofDeclList start --}} {{#each message.oneofDeclList}} diff --git a/src/lib/template/partial/oneof.hbs b/src/lib/template/partial/oneof.hbs index dbc0f36..4b4a1fe 100644 --- a/src/lib/template/partial/oneof.hbs +++ b/src/lib/template/partial/oneof.hbs @@ -1,7 +1,7 @@ {{{indent}}}export enum {{{oneofName}}}Case { {{{indent}}} {{{oneofNameUpper}}}_NOT_SET = 0, -{{{indent}}}{{#each fields}} -{{{indent}}} {{{@key}}} = {{{this}}}, -{{{indent}}}{{/each}} +{{#each fields ~}} +{{{../indent}}} {{{@key}}} = {{{this}}}, +{{/each ~}} {{{indent}}}{{curlyRight}} \ No newline at end of file