Skip to content

Commit a39cb45

Browse files
Annotate the stale-chunk test doubles so typecheck stays clean.
Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
1 parent 905ac79 commit a39cb45

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/test/lib/reload-stale-chunk.test.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ function fakeWindow() {
66
const stored = new Map<string, string>();
77
const reload = vi.fn();
88
const target = {
9-
addEventListener: (type: string, listener: EventListener) => {
9+
addEventListener: (type: string, listener: EventListener): void => {
1010
listeners.set(type, listener as (event: Event) => void);
1111
},
1212
sessionStorage: {
13-
getItem: (key: string) => stored.get(key) ?? null,
14-
setItem: (key: string, value: string) => { stored.set(key, value); },
15-
removeItem: (key: string) => { stored.delete(key); },
16-
clear: () => { stored.clear(); },
17-
key: () => null,
13+
getItem: (key: string): string | null => stored.get(key) ?? null,
14+
setItem: (key: string, value: string): void => { stored.set(key, value); },
15+
removeItem: (key: string): void => { stored.delete(key); },
16+
clear: (): void => { stored.clear(); },
17+
key: (): string | null => null,
1818
length: 0,
1919
},
2020
location: { pathname: '/app/ask', reload },

0 commit comments

Comments
 (0)