diff --git a/infinite/index.ts b/infinite/index.ts index 5505fdee8..d8a4f500c 100644 --- a/infinite/index.ts +++ b/infinite/index.ts @@ -282,9 +282,3 @@ export { SWRInfiniteKeyLoader, SWRInfiniteFetcher } - -// @TODO: remove this in 2.0 -/** - * @deprecated `InfiniteFetcher` will be renamed to `SWRInfiniteFetcher`. - */ -export type InfiniteFetcher = SWRInfiniteFetcher diff --git a/test/unit/web-preset.test.ts b/test/unit/web-preset.test.ts index c7d1bc22f..4753f9a1b 100644 --- a/test/unit/web-preset.test.ts +++ b/test/unit/web-preset.test.ts @@ -78,10 +78,7 @@ function runTests(propertyName) { const release = initFocus(fn) as () => void const target = global[propertyName] - // TODO: target?.emit?() breaks prettier, fix prettier format - if (target && target.emit) { - target.emit(eventName) - } + target?.emit?.(eventName) expect(fn).toBeCalledTimes(0) diff --git a/test/use-swr-local-mutation.test.tsx b/test/use-swr-local-mutation.test.tsx index 23cd28e70..218d12423 100644 --- a/test/use-swr-local-mutation.test.tsx +++ b/test/use-swr-local-mutation.test.tsx @@ -1242,9 +1242,8 @@ describe('useSWR - local mutation', () => { let appendData - const sendRequest = newItem => { - // @TODO: We use `any` here due to limitation of type inference. - return new Promise(res => + const sendRequest = (newItem) => { + return new Promise(res => setTimeout(() => { // Server capitializes the new item. const modifiedData =