Skip to content

Commit

Permalink
correct types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 15, 2022
1 parent 6b1e91f commit 38078b9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compat/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ declare namespace React {
export import useRef = _hooks.useRef;
export import useState = _hooks.useState;
// React 18 hooks
export const useTransition = () => [false, startTransition];
export const useDeferredValue = <T = any>(val: T) => T;
export const useInsertionEffect = _hooks.useLayoutEffect;
export const useSyncExternalStore = <T>(
subscribe: () => () => void,
export import useInsertionEffect = _hooks.useLayoutEffect;
export function useTransition(): [false, startTransition];
export function useDeferredValue<T = any>(val: T): T;
export function useSyncExternalStore<T>(
subscribe: (flush: () => void) => () => void,
getSnapshot: () => T
) => T;
): T;

// Preact Defaults
export import ContextType = preact.ContextType;
Expand All @@ -59,7 +59,7 @@ declare namespace React {
// Compat
export import StrictMode = preact.Fragment;
export const version: string;
export const startTransition: (cb: () => void) => void;
export function startTransition(cb: () => void): void;

// HTML
export import HTMLAttributes = JSXInternal.HTMLAttributes;
Expand Down

0 comments on commit 38078b9

Please sign in to comment.