Skip to content

Commit 149e7b7

Browse files
committed
cargo fmt
1 parent 169296b commit 149e7b7

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

crates/codegen/src/typescript.rs

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ impl Lang for TypeScript {
261261
writeln!(out, ");");
262262

263263
writeln!(out);
264-
writeln!(out, "/** The remote SpacetimeDB module schema, both runtime and type information. */");
264+
writeln!(
265+
out,
266+
"/** The remote SpacetimeDB module schema, both runtime and type information. */"
267+
);
265268
writeln!(out, "const REMOTE_MODULE = {{");
266269
out.indent(1);
267270
writeln!(out, "versionInfo: {{");
@@ -281,27 +284,24 @@ impl Lang for TypeScript {
281284
out.dedent(1);
282285

283286
writeln!(out);
284-
writeln!(
285-
out,
286-
"/** The tables available in this remote SpacetimeDB module. */"
287-
);
287+
writeln!(out, "/** The tables available in this remote SpacetimeDB module. */");
288288
writeln!(
289289
out,
290290
"export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables);"
291291
);
292292
writeln!(out);
293-
writeln!(
294-
out,
295-
"/** The reducers available in this remote SpacetimeDB module. */"
296-
);
293+
writeln!(out, "/** The reducers available in this remote SpacetimeDB module. */");
297294
writeln!(
298295
out,
299296
"export const reducers = __convertToAccessorMap(reducersSchema.reducersType.reducers);"
300297
);
301298

302299
// Write type aliases for EventContext, ReducerEventContext, SubscriptionEventContext, ErrorContext
303300
writeln!(out);
304-
writeln!(out, "/** The context type returned in callbacks for all possible events. */");
301+
writeln!(
302+
out,
303+
"/** The context type returned in callbacks for all possible events. */"
304+
);
305305
writeln!(
306306
out,
307307
"export type EventContext = __EventContextInterface<typeof REMOTE_MODULE>;"
@@ -313,7 +313,10 @@ impl Lang for TypeScript {
313313
"export type ReducerEventContext = __ReducerEventContextInterface<typeof REMOTE_MODULE>;"
314314
);
315315

316-
writeln!(out, "/** The context type returned in callbacks for subscription events. */");
316+
writeln!(
317+
out,
318+
"/** The context type returned in callbacks for subscription events. */"
319+
);
317320
writeln!(
318321
out,
319322
"export type SubscriptionEventContext = __SubscriptionEventContextInterface<typeof REMOTE_MODULE>;"
@@ -332,15 +335,24 @@ impl Lang for TypeScript {
332335
);
333336

334337
writeln!(out);
335-
writeln!(out, "/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */");
338+
writeln!(
339+
out,
340+
"/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */"
341+
);
336342
writeln!(
337343
out,
338344
"export class SubscriptionBuilder extends __SubscriptionBuilderImpl<typeof REMOTE_MODULE> {{}}"
339345
);
340346

341347
writeln!(out);
342-
writeln!(out, "/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */");
343-
writeln!(out, "export class DbConnectionBuilder extends __DbConnectionBuilder<typeof REMOTE_MODULE> {{}}");
348+
writeln!(
349+
out,
350+
"/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */"
351+
);
352+
writeln!(
353+
out,
354+
"export class DbConnectionBuilder extends __DbConnectionBuilder<typeof REMOTE_MODULE> {{}}"
355+
);
344356

345357
writeln!(out);
346358
writeln!(out, "/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */");

0 commit comments

Comments
 (0)