Skip to content

Commit

Permalink
separate seralize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Dec 9, 2024
1 parent c3a3ca7 commit 26fb9a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index/serialize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Key } from '../_internal'
import { serialize } from '../_internal'
import { serialize } from '../_internal/utils/serialize'

export const unstable_serialize = (key: Key) => serialize(key)[0]
3 changes: 2 additions & 1 deletion src/infinite/serialize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { SWRInfiniteKeyLoader } from './types'
import { serialize, INFINITE_PREFIX } from '../_internal'
import { serialize } from '../_internal/utils/serialize'
import { INFINITE_PREFIX } from '../_internal/constants'

export const getFirstPageKey = (getKey: SWRInfiniteKeyLoader) => {
return serialize(getKey ? getKey(0, null) : null)[0]
Expand Down

0 comments on commit 26fb9a9

Please sign in to comment.