Skip to content

Commit cbeeefe

Browse files
committed
bump tsconfig#lib to ES2024, no need to hack-in Map.groupBy typing
- removed sleep too, it was unused
1 parent 7f56f35 commit cbeeefe

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/libs/couch.svelte.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,3 @@ function msg2View(msg: Message): MessageView {
173173
slug: slugify(Math.trunc(msg.timestamp)),
174174
};
175175
}
176-
177-
/**
178-
* Awaitable sleep based on setTimeout
179-
* @param delay miliseconds
180-
*/
181-
function sleep(delay: number): Promise<void> {
182-
return new Promise((resolve) => setTimeout(resolve, delay));
183-
}
184-
185-
// FIXME:
186-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/groupBy
187-
// https://github.com/microsoft/TypeScript/pull/56805
188-
declare global {
189-
interface MapConstructor {
190-
groupBy<Item, Key>(items: Iterable<Item>, keySelector: (item: Item, index: number) => Key): Map<Key, Item[]>;
191-
}
192-
}

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"compilerOptions": {
44
"moduleDetection": "force",
55
"target": "ES2023",
6+
"lib": ["ES2024", "DOM"],
7+
"strict": true,
68
"allowJs": true,
79
"checkJs": true,
810
"resolveJsonModule": true,

0 commit comments

Comments
 (0)