···11"use client";
2233import useSWRInfinite, { unstable_serialize } from "swr/infinite";
44-import { createContext, Fragment, type ReactNode, startTransition } from "react";
44+import {
55+ createContext,
66+ Fragment,
77+ type ReactNode,
88+ startTransition,
99+} from "react";
510import { useInView } from "react-intersection-observer";
611import { mutate, SWRConfig } from "swr";
712···4045 );
4146}
42474343-export const InfiniteListContext = createContext({
4444- revalidatePage: async (): Promise<void> => {
4848+export const InfiniteListContext = createContext<{
4949+ revalidatePage: () => Promise<void>;
5050+}>({
5151+ revalidatePage: () => {
4552 throw new Error(
4653 "Cannot call InfiniteListContext.revalidate when not inside of an InfiniteList",
4754 );
···8794 await mutate(data, {
8895 revalidate: (_data, args) =>
8996 !currentCursor ||
9090- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9797+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
9198 (args as any)[1] === currentCursor,
9299 });
93100 },
+3-2
packages/frontpage/lib/utils.ts
···1818 }
1919}
20202121-export function exhaustiveCheck(value: never): never {
2222- throw new Error(`Unhandled value: ${value}`);
2121+export function exhaustiveCheck(value: never, message?: string): never {
2222+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
2323+ throw new Error(`Unhandled value (${message}): ${value}`);
2324}
+1
packages/unravel/app/page.tsx
···44export default function Home() {
55 useLayoutEffect(() => {
66 // @ts-expect-error UnicornStudio is on the window
77+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
78 UnicornStudio.init();
89 }, []);
910