UNPKG

narraleaf-react

Version:

A React visual novel player framework

11 lines (10 loc) 561 B
import { ExposedKeys, ExposedState, ExposedStateType } from "../type"; import React from "react"; /** * Custom hook for exposing state to the game state manager * @param key - Unique identifier for the state * @param value - State value or function returning state value * @param deps - Dependency array for state updates * @returns Empty array (for consistency with React hooks) */ export declare function useExposeState<T extends ExposedStateType>(key: ExposedKeys[T], value: ExposedState[T] | (() => ExposedState[T]), deps?: React.DependencyList): [];