Skip to content

Commit 65b01d7

Browse files
committed
style(json-type): 💄 run Prettier
1 parent 23d97ef commit 65b01d7

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/json-type/codegen/binary/__tests__/testBinaryCodegen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ export const testBinaryCodegen = (transcode: (system: TypeSystem, type: Type, va
398398
const system = new TypeSystem();
399399
const t = system.t;
400400
const type = t.Map(t.Map(t.bool));
401-
const value: {} = {a: {x: true, y: false}}
401+
const value: {} = {a: {x: true, y: false}};
402402
expect(transcode(system, type, value)).toStrictEqual(value);
403403
});
404404
});

src/json-type/schema/__tests__/type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('can generate any type', () => {
1414
s.prop('address', address),
1515
s.prop('timeCreated', s.Number()),
1616
s.prop('tags', s.Array(s.Or(s.Number(), s.String()))),
17-
s.prop('elements', s.Map(s.str))
17+
s.prop('elements', s.Map(s.str)),
1818
);
1919

2020
expect(userType).toMatchObject({

src/json-type/type/classes.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,9 @@ export class MapType<T extends Type> extends AbstractType<schema.MapSchema<Schem
20112011
const ri = codegen.var('0');
20122012
codegen.js(`for (; ${ri} < ${rLen}; ${ri}++) {`);
20132013
codegen.js(`${rKey} = ${rKeys}[${ri}];`);
2014-
codegen.js(`size += ${MaxEncodingOverhead.String} + ${MaxEncodingOverhead.StringLengthMultiplier} * ${rKey}.length;`);
2014+
codegen.js(
2015+
`size += ${MaxEncodingOverhead.String} + ${MaxEncodingOverhead.StringLengthMultiplier} * ${rKey}.length;`,
2016+
);
20152017
this.type.codegenCapacityEstimator(ctx, new JsExpression(() => `${r}[${rKey}]`));
20162018
codegen.js(`}`);
20172019
}
@@ -2027,10 +2029,7 @@ export class MapType<T extends Type> extends AbstractType<schema.MapSchema<Schem
20272029
const node: ts.TsTypeReference = {
20282030
node: 'TypeReference',
20292031
typeName: 'Record',
2030-
typeArguments: [
2031-
{node: 'StringKeyword'},
2032-
this.type.toTypeScriptAst(),
2033-
],
2032+
typeArguments: [{node: 'StringKeyword'}, this.type.toTypeScriptAst()],
20342033
};
20352034
// augmentWithComment(this.schema, node);
20362035
return node;

0 commit comments

Comments
 (0)