tessl install tessl/npm-types--react@19.1.0TypeScript definitions for React, the popular JavaScript library for building user interfaces
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.48x
Baseline
Agent success rate without this tile
54%
A simple theme management system that allows users to toggle between light and dark themes across an application.
@generates
/**
* Theme type representing available themes
*/
export type Theme = "light" | "dark";
/**
* Context value shape containing theme and toggle function
*/
export interface ThemeContextValue {
theme: Theme;
toggleTheme: () => void;
}
/**
* Props for ThemeProvider component
*/
export interface ThemeProviderProps {
children: React.ReactNode;
}
/**
* Provider component that manages theme state and provides it to children
*/
export function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
/**
* Component that displays the current theme name
*/
export function ThemeDisplay(): React.JSX.Element;
/**
* Component that renders a button to toggle between themes
*/
export function ThemeToggleButton(): React.JSX.Element;Provides TypeScript type definitions for React, including hooks and context APIs.