Skip to content

Commit

Permalink
Fix weird braces.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh authored and webmaster128 committed Nov 1, 2021
1 parent cc9403d commit 3af7913
Show file tree
Hide file tree
Showing 61 changed files with 420 additions and 1,252 deletions.
4 changes: 1 addition & 3 deletions integration/angular/simple-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ export const SimpleMessage = {

fromPartial(object: DeepPartial<SimpleMessage>): SimpleMessage {
const message = { ...baseSimpleMessage } as SimpleMessage;
{
message.numberField = object.numberField ?? 0;
}
message.numberField = object.numberField ?? 0;
return message;
},
};
Expand Down
12 changes: 3 additions & 9 deletions integration/avoid-import-conflicts/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export const Simple = {

fromPartial(object: DeepPartial<Simple>): Simple {
const message = { ...baseSimple } as Simple;
{
message.name = object.name ?? '';
}
message.name = object.name ?? '';
if (object.otherSimple !== undefined && object.otherSimple !== null) {
message.otherSimple = Simple2.fromPartial(object.otherSimple);
} else {
Expand Down Expand Up @@ -187,12 +185,8 @@ export const SimpleEnums = {

fromPartial(object: DeepPartial<SimpleEnums>): SimpleEnums {
const message = { ...baseSimpleEnums } as SimpleEnums;
{
message.localEnum = object.localEnum ?? 0;
}
{
message.importEnum = object.importEnum ?? 0;
}
message.localEnum = object.localEnum ?? 0;
message.importEnum = object.importEnum ?? 0;
return message;
},
};
Expand Down
8 changes: 2 additions & 6 deletions integration/avoid-import-conflicts/simple2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,8 @@ export const Simple = {

fromPartial(object: DeepPartial<Simple>): Simple {
const message = { ...baseSimple } as Simple;
{
message.name = object.name ?? '';
}
{
message.age = object.age ?? 0;
}
message.name = object.name ?? '';
message.age = object.age ?? 0;
return message;
},
};
Expand Down
8 changes: 2 additions & 6 deletions integration/barrel-imports/bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ export const Bar = {

fromPartial(object: DeepPartial<Bar>): Bar {
const message = { ...baseBar } as Bar;
{
message.name = object.name ?? '';
}
{
message.age = object.age ?? 0;
}
message.name = object.name ?? '';
message.age = object.age ?? 0;
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/barrel-imports/foo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ export const Foo = {

fromPartial(object: DeepPartial<Foo>): Foo {
const message = { ...baseFoo } as Foo;
{
message.name = object.name ?? '';
}
message.name = object.name ?? '';
if (object.bar !== undefined && object.bar !== null) {
message.bar = Bar.fromPartial(object.bar);
} else {
Expand Down
20 changes: 5 additions & 15 deletions integration/batching-with-context/batching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,7 @@ export const BatchMapQueryResponse_EntitiesEntry = {

fromPartial(object: DeepPartial<BatchMapQueryResponse_EntitiesEntry>): BatchMapQueryResponse_EntitiesEntry {
const message = { ...baseBatchMapQueryResponse_EntitiesEntry } as BatchMapQueryResponse_EntitiesEntry;
{
message.key = object.key ?? '';
}
message.key = object.key ?? '';
if (object.value !== undefined && object.value !== null) {
message.value = Entity.fromPartial(object.value);
} else {
Expand Down Expand Up @@ -416,9 +414,7 @@ export const GetOnlyMethodRequest = {

fromPartial(object: DeepPartial<GetOnlyMethodRequest>): GetOnlyMethodRequest {
const message = { ...baseGetOnlyMethodRequest } as GetOnlyMethodRequest;
{
message.id = object.id ?? '';
}
message.id = object.id ?? '';
return message;
},
};
Expand Down Expand Up @@ -524,9 +520,7 @@ export const WriteMethodRequest = {

fromPartial(object: DeepPartial<WriteMethodRequest>): WriteMethodRequest {
const message = { ...baseWriteMethodRequest } as WriteMethodRequest;
{
message.id = object.id ?? '';
}
message.id = object.id ?? '';
return message;
},
};
Expand Down Expand Up @@ -627,12 +621,8 @@ export const Entity = {

fromPartial(object: DeepPartial<Entity>): Entity {
const message = { ...baseEntity } as Entity;
{
message.id = object.id ?? '';
}
{
message.name = object.name ?? '';
}
message.id = object.id ?? '';
message.name = object.name ?? '';
return message;
},
};
Expand Down
20 changes: 5 additions & 15 deletions integration/batching/batching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,7 @@ export const BatchMapQueryResponse_EntitiesEntry = {

fromPartial(object: DeepPartial<BatchMapQueryResponse_EntitiesEntry>): BatchMapQueryResponse_EntitiesEntry {
const message = { ...baseBatchMapQueryResponse_EntitiesEntry } as BatchMapQueryResponse_EntitiesEntry;
{
message.key = object.key ?? '';
}
message.key = object.key ?? '';
if (object.value !== undefined && object.value !== null) {
message.value = Entity.fromPartial(object.value);
} else {
Expand Down Expand Up @@ -414,9 +412,7 @@ export const GetOnlyMethodRequest = {

fromPartial(object: DeepPartial<GetOnlyMethodRequest>): GetOnlyMethodRequest {
const message = { ...baseGetOnlyMethodRequest } as GetOnlyMethodRequest;
{
message.id = object.id ?? '';
}
message.id = object.id ?? '';
return message;
},
};
Expand Down Expand Up @@ -522,9 +518,7 @@ export const WriteMethodRequest = {

fromPartial(object: DeepPartial<WriteMethodRequest>): WriteMethodRequest {
const message = { ...baseWriteMethodRequest } as WriteMethodRequest;
{
message.id = object.id ?? '';
}
message.id = object.id ?? '';
return message;
},
};
Expand Down Expand Up @@ -625,12 +619,8 @@ export const Entity = {

fromPartial(object: DeepPartial<Entity>): Entity {
const message = { ...baseEntity } as Entity;
{
message.id = object.id ?? '';
}
{
message.name = object.name ?? '';
}
message.id = object.id ?? '';
message.name = object.name ?? '';
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/bytes-as-base64/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export const Message = {

fromPartial(object: DeepPartial<Message>): Message {
const message = { ...baseMessage } as Message;
{
message.data = object.data ?? new Uint8Array();
}
message.data = object.data ?? new Uint8Array();
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/bytes-node/point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ export const Point = {

fromPartial(object: DeepPartial<Point>): Point {
const message = { ...basePoint } as Point;
{
message.data = object.data ?? Buffer.alloc(0);
}
message.data = object.data ?? Buffer.alloc(0);
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/const-enum/const-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ export const DividerData = {

fromPartial(object: DeepPartial<DividerData>): DividerData {
const message = { ...baseDividerData } as DividerData;
{
message.type = object.type ?? DividerData_DividerType.DOUBLE;
}
message.type = object.type ?? DividerData_DividerType.DOUBLE;
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/generic-service-definitions/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ export const TestMessage = {

fromPartial(object: DeepPartial<TestMessage>): TestMessage {
const message = { ...baseTestMessage } as TestMessage;
{
message.value = object.value ?? '';
}
message.value = object.value ?? '';
return message;
},
};
Expand Down
8 changes: 2 additions & 6 deletions integration/global-this/global-this.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ export const Object = {

fromPartial(object: DeepPartial<Object>): Object {
const message = { ...baseObject } as Object;
{
message.name = object.name ?? '';
}
message.name = object.name ?? '';
return message;
},
};
Expand Down Expand Up @@ -111,9 +109,7 @@ export const Error = {

fromPartial(object: DeepPartial<Error>): Error {
const message = { ...baseError } as Error;
{
message.name = object.name ?? '';
}
message.name = object.name ?? '';
return message;
},
};
Expand Down
8 changes: 2 additions & 6 deletions integration/grpc-js/google/protobuf/timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,8 @@ export const Timestamp = {

fromPartial(object: DeepPartial<Timestamp>): Timestamp {
const message = { ...baseTimestamp } as Timestamp;
{
message.seconds = object.seconds ?? 0;
}
{
message.nanos = object.nanos ?? 0;
}
message.seconds = object.seconds ?? 0;
message.nanos = object.nanos ?? 0;
return message;
},
};
Expand Down
36 changes: 9 additions & 27 deletions integration/grpc-js/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ export const DoubleValue = {

fromPartial(object: DeepPartial<DoubleValue>): DoubleValue {
const message = { ...baseDoubleValue } as DoubleValue;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -193,9 +191,7 @@ export const FloatValue = {

fromPartial(object: DeepPartial<FloatValue>): FloatValue {
const message = { ...baseFloatValue } as FloatValue;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -246,9 +242,7 @@ export const Int64Value = {

fromPartial(object: DeepPartial<Int64Value>): Int64Value {
const message = { ...baseInt64Value } as Int64Value;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -299,9 +293,7 @@ export const UInt64Value = {

fromPartial(object: DeepPartial<UInt64Value>): UInt64Value {
const message = { ...baseUInt64Value } as UInt64Value;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -352,9 +344,7 @@ export const Int32Value = {

fromPartial(object: DeepPartial<Int32Value>): Int32Value {
const message = { ...baseInt32Value } as Int32Value;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -405,9 +395,7 @@ export const UInt32Value = {

fromPartial(object: DeepPartial<UInt32Value>): UInt32Value {
const message = { ...baseUInt32Value } as UInt32Value;
{
message.value = object.value ?? 0;
}
message.value = object.value ?? 0;
return message;
},
};
Expand Down Expand Up @@ -458,9 +446,7 @@ export const BoolValue = {

fromPartial(object: DeepPartial<BoolValue>): BoolValue {
const message = { ...baseBoolValue } as BoolValue;
{
message.value = object.value ?? false;
}
message.value = object.value ?? false;
return message;
},
};
Expand Down Expand Up @@ -511,9 +497,7 @@ export const StringValue = {

fromPartial(object: DeepPartial<StringValue>): StringValue {
const message = { ...baseStringValue } as StringValue;
{
message.value = object.value ?? '';
}
message.value = object.value ?? '';
return message;
},
};
Expand Down Expand Up @@ -565,9 +549,7 @@ export const BytesValue = {

fromPartial(object: DeepPartial<BytesValue>): BytesValue {
const message = { ...baseBytesValue } as BytesValue;
{
message.value = object.value ?? new Uint8Array();
}
message.value = object.value ?? new Uint8Array();
return message;
},
};
Expand Down
4 changes: 1 addition & 3 deletions integration/grpc-js/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export const TestMessage = {

fromPartial(object: DeepPartial<TestMessage>): TestMessage {
const message = { ...baseTestMessage } as TestMessage;
{
message.timestamp = object.timestamp ?? undefined;
}
message.timestamp = object.timestamp ?? undefined;
return message;
},
};
Expand Down
Loading

0 comments on commit 3af7913

Please sign in to comment.