Skip to content

Commit 8e89f32

Browse files
committed
formatting and trivial rename
1 parent b623c4d commit 8e89f32

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/packages/frontend/project_actions.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,9 +1522,8 @@ export class ProjectActions extends Actions<ProjectStoreState> {
15221522
const computeServerAssociations =
15231523
webapp_client.project_client.computeServers(this.project_id);
15241524
const sidePath = chatFile(path);
1525-
const currentId = await computeServerAssociations.getServerIdForPath(
1526-
sidePath,
1527-
);
1525+
const currentId =
1526+
await computeServerAssociations.getServerIdForPath(sidePath);
15281527
if (currentId != null) {
15291528
// already set
15301529
return;
@@ -2308,8 +2307,8 @@ export class ProjectActions extends Actions<ProjectStoreState> {
23082307
dest_compute_server_id: opts.dest_compute_server_id,
23092308
}
23102309
: opts.src_compute_server_id
2311-
? { compute_server_id: opts.src_compute_server_id }
2312-
: undefined),
2310+
? { compute_server_id: opts.src_compute_server_id }
2311+
: undefined),
23132312
});
23142313

23152314
if (opts.only_contents) {
@@ -2682,11 +2681,11 @@ export class ProjectActions extends Actions<ProjectStoreState> {
26822681
// Compute the absolute path to the file with given name but with the
26832682
// given extension added to the file (e.g., "md") if the file doesn't have
26842683
// that extension. Throws an Error if the path name is invalid.
2685-
public construct_absolute_path(
2684+
construct_absolute_path = (
26862685
name: string,
26872686
current_path?: string,
26882687
ext?: string,
2689-
) {
2688+
): string => {
26902689
if (name.length === 0) {
26912690
throw Error("Cannot use empty filename");
26922691
}
@@ -2700,7 +2699,7 @@ export class ProjectActions extends Actions<ProjectStoreState> {
27002699
s = `${s}.${ext}`;
27012700
}
27022701
return s;
2703-
}
2702+
};
27042703

27052704
async create_folder(opts: {
27062705
name: string;

src/packages/sync/editor/generic/sync-doc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ export class SyncDoc extends EventEmitter {
22622262
// a snapshot at the same time -- this would waste a little space
22632263
// in the stream, but is otherwise harmless, since the snapshots
22642264
// are identical.
2265-
this.snapshot_if_necessary();
2265+
this.snapshotIfNecessary();
22662266
};
22672267

22682268
private dstream = () => {
@@ -2365,9 +2365,9 @@ export class SyncDoc extends EventEmitter {
23652365

23662366
// Have a snapshot every this.snapshot_interval patches, except
23672367
// for the very last interval.
2368-
private snapshot_if_necessary = async (): Promise<void> => {
2368+
private snapshotIfNecessary = async (): Promise<void> => {
23692369
if (this.get_state() !== "ready") return;
2370-
const dbg = this.dbg("snapshot_if_necessary");
2370+
const dbg = this.dbg("snapshotIfNecessary");
23712371
const max_size = Math.floor(1.2 * MAX_FILE_SIZE_MB * 1000000);
23722372
const interval = this.snapshot_interval;
23732373
dbg("check if we need to make a snapshot:", { interval, max_size });

0 commit comments

Comments
 (0)