Skip to content

Commit

Permalink
explicit typing
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jul 8, 2022
1 parent 08dc1c9 commit 537b5af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/type/config.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import type { State } from 'swr'
import type { Cache } from 'swr'
import { useSWRConfig, SWRConfig } from 'swr'
import { expectType } from './utils'

export function useTestCache() {
expectType<Map<string, State>>(useSWRConfig().cache)
expectType<Cache<any>>(useSWRConfig().cache)
}

export function useCustomSWRConfig() {
Expand Down

0 comments on commit 537b5af

Please sign in to comment.