Skip to content

Instantly share code, notes, and snippets.

@Steellgold
Created April 30, 2024 19:39
Show Gist options
  • Save Steellgold/9006726724af88f70b79c9f2186fc138 to your computer and use it in GitHub Desktop.
Save Steellgold/9006726724af88f70b79c9f2186fc138 to your computer and use it in GitHub Desktop.
import type { Dispatch, ReactElement, SetStateAction } from "react";
export type Component<Props> = (props?: Props) => ReactElement;
export type AsyncComponent<Props> = (props?: Props) => Promise<ReactElement>;
export type NPComponent<> = () => ReactElement;
export type NPAsyncComponent<> = () => Promise<ReactElement>;
export type SetState<T> = Dispatch<SetStateAction<T>>;
export * from "./component";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment