mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
remove duplicated type declaration (#2982)
Co-authored-by: kenny-io <kenny.io@kakaoenterprise.com> Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
This commit is contained in:
parent
48985a4cc2
commit
c72ac92764
@ -3,6 +3,7 @@ import React from 'react'
|
|||||||
import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector'
|
import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector'
|
||||||
import { createStore } from './vanilla.ts'
|
import { createStore } from './vanilla.ts'
|
||||||
import type {
|
import type {
|
||||||
|
ExtractState,
|
||||||
Mutate,
|
Mutate,
|
||||||
StateCreator,
|
StateCreator,
|
||||||
StoreApi,
|
StoreApi,
|
||||||
@ -11,8 +12,6 @@ import type {
|
|||||||
|
|
||||||
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports
|
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports
|
||||||
|
|
||||||
type ExtractState<S> = S extends { getState: () => infer T } ? T : never
|
|
||||||
|
|
||||||
type ReadonlyStoreApi<T> = Pick<
|
type ReadonlyStoreApi<T> = Pick<
|
||||||
StoreApi<T>,
|
StoreApi<T>,
|
||||||
'getState' | 'getInitialState' | 'subscribe'
|
'getState' | 'getInitialState' | 'subscribe'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user