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 utility library that provides helper functions for working with elements and renderable content in a type-safe manner.
true when given a valid element @testfalse when given a plain object that is not an element @test@generates
/**
* Validates if a value is a valid renderable element.
*
* @param value - The value to validate
* @returns True if the value is a valid renderable element
*/
export function isRenderable(value: unknown): boolean;
/**
* Wraps content in a container div element with optional className.
*
* @param content - The content to wrap
* @param className - Optional CSS class name for the container
* @returns A div element containing the wrapped content
*/
export function wrapContent(content: unknown, className?: string): unknown;
/**
* Clones an element and adds or overrides props.
*
* @param element - The element to clone
* @param props - Props to add or override
* @returns A new element with the merged props
*/
export function cloneWithProps(element: unknown, props: Record<string, unknown>): unknown;
/**
* Filters an array to only include renderable items.
*
* @param items - Array of values to filter
* @returns Array containing only valid renderable values
*/
export function filterRenderable(items: unknown[]): unknown[];Provides TypeScript definitions for React.