Skip to content

Commit ed05cb5

Browse files
committed
prettier
1 parent 1f6c201 commit ed05cb5

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

src/lib/domain/stores/EnableFingerprint.ts

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,38 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { derived, get, writable, type Subscriber, type Unsubscriber, type Writable } from 'svelte/store';
6+
import {
7+
derived,
8+
get,
9+
writable,
10+
type Subscriber,
11+
type Unsubscriber,
12+
type Writable,
13+
} from 'svelte/store';
714

815
class EnableFingerprint implements Writable<boolean> {
9-
private value: Writable<boolean>;
16+
private value: Writable<boolean>;
1017

11-
public constructor(defaultValue: boolean) {
12-
this.value = writable(defaultValue);
13-
}
18+
public constructor(defaultValue: boolean) {
19+
this.value = writable(defaultValue);
20+
}
1421

15-
public set(newValue: boolean): void {
16-
this.value.set(newValue);
17-
}
22+
public set(newValue: boolean): void {
23+
this.value.set(newValue);
24+
}
1825

19-
public update(updater: (state: boolean) => boolean): void {
20-
const beforeValue = get(this.value);
21-
const updatedValue = updater(beforeValue);
22-
this.set(updatedValue);
23-
}
26+
public update(updater: (state: boolean) => boolean): void {
27+
const beforeValue = get(this.value);
28+
const updatedValue = updater(beforeValue);
29+
this.set(updatedValue);
30+
}
2431

25-
public subscribe(run: Subscriber<boolean>, invalidate?: (value?: boolean) => void): Unsubscriber {
26-
return derived([this.value], ([store]) => store).subscribe(run, invalidate);
27-
}
32+
public subscribe(
33+
run: Subscriber<boolean>,
34+
invalidate?: (value?: boolean) => void,
35+
): Unsubscriber {
36+
return derived([this.value], ([store]) => store).subscribe(run, invalidate);
37+
}
2838
}
2939

3040
export default EnableFingerprint;

src/lib/stores/Stores.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ class Stores implements Readable<StoresType> {
9393
this.gestures,
9494
this.highlightedAxis,
9595
);
96-
this.enableFingerprint = new EnableFingerprint(StaticConfiguration.enableFingerprintByDefault);
96+
this.enableFingerprint = new EnableFingerprint(
97+
StaticConfiguration.enableFingerprintByDefault,
98+
);
9799
}
98100

99101
public subscribe(

0 commit comments

Comments
 (0)