Skip to content

Commit

Permalink
y
Browse files Browse the repository at this point in the history
  • Loading branch information
Delusoire committed Aug 23, 2024
1 parent c442505 commit bba191f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function findBy(...tests: Array<string | RegExp | Predicate<any>>) {
export const fetchText = (path: string) =>
fetch(path).then((res) => res.text()).catch(() => null);
export const fetchJson = <R>(path: string) =>
fetch(path).then((res) => res.json()).catch(() => null) as Promise<Awaited<R>>;
fetch(path).then((res) => res.json()).catch(() => null) as Promise<Awaited<R | null>>;

// assumption: str[start] === pair[0]
export const findMatchingPos = (
Expand Down

0 comments on commit bba191f

Please sign in to comment.