types.ts
This file
Path
src/jsx/types.ts
40 lines 路 1.4 KiB 路 TypeScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314151617181920212223242526272829303132333435363738394041/** * All types exported from "hono/jsx" are in this file. */import type { Child, JSXNode } from './base'import type { JSX } from './intrinsic-elements'
export type { Child, JSXNode, FC } from './base'export type { RefObject } from './hooks'export type { Context } from './context'
export type PropsWithChildren<P = unknown> = P & { children?: Child | undefined }export type CSSProperties = JSX.CSSProperties
/** * React types */
// eslint-disable-next-line @typescript-eslint/no-explicit-anytype ReactElement<P = any, T = string | Function> = JSXNode & { type: T props: P key: string | null}type ReactNode = ReactElement | string | number | boolean | null | undefinedtype ComponentClass<_P = {}, _S = {}> = unknown
export type { ReactElement, ReactNode, ComponentClass }
export type Event = globalThis.Eventexport type MouseEvent = globalThis.MouseEventexport type KeyboardEvent = globalThis.KeyboardEventexport type FocusEvent = globalThis.FocusEventexport type ClipboardEvent = globalThis.ClipboardEventexport type InputEvent = globalThis.InputEventexport type PointerEvent = globalThis.PointerEventexport type TouchEvent = globalThis.TouchEventexport type WheelEvent = globalThis.WheelEventexport type AnimationEvent = globalThis.AnimationEventexport type TransitionEvent = globalThis.TransitionEventexport type DragEvent = globalThis.DragEvent