import { Accessor } from "../reactive/signal.js"; import type { JSX } from "../jsx.js"; /** * creates a list elements from a list * * it receives a map function as its child that receives a list element and an accessor with the index and returns a JSX-Element; if the list is empty, an optional fallback is returned: * ```typescript * No items}> * {(item, index) =>
{item}
} *
* ``` * If you have a list with fixed indices and changing values, consider using `` instead. * * @description https://www.solidjs.com/docs/latest/api#for */ export declare function For(props: { each: T | undefined | null | false; fallback?: JSX.Element; children: (item: T[number], index: Accessor) => U; }): JSX.Element; /** * Non-keyed iteration over a list creating elements from its items * * To be used if you have a list with fixed indices, but changing values. * ```typescript * No items}> * {(item, index) =>
{item()}
} *
* ``` * If you have a list with changing indices, better use ``. * * @description https://www.solidjs.com/docs/latest/api#index */ export declare function Index(props: { each: T | undefined | null | false; fallback?: JSX.Element; children: (item: Accessor, index: number) => U; }): JSX.Element; type RequiredParameter = T extends () => unknown ? never : T; /** * Conditionally render its children or an optional fallback component * @description https://www.solidjs.com/docs/latest/api#show */ export declare function Show>) => JSX.Element>(props: { when: T | undefined | null | false; keyed?: false; fallback?: JSX.Element; children: JSX.Element | RequiredParameter; }): JSX.Element; export declare function Show) => JSX.Element>(props: { when: T | undefined | null | false; keyed: true; fallback?: JSX.Element; children: JSX.Element | RequiredParameter; }): JSX.Element; /** * switches between content based on mutually exclusive conditions * ```typescript * }> * * * * * * * * ``` * @description https://www.solidjs.com/docs/latest/api#switchmatch */ export declare function Switch(props: { fallback?: JSX.Element; children: JSX.Element; }): JSX.Element; export type MatchProps = { when: T | undefined | null | false; keyed?: boolean; children: JSX.Element | ((item: NonNullable | Accessor>) => JSX.Element); }; /** * selects a content based on condition when inside a `` control flow * ```typescript * * * * ``` * @description https://www.solidjs.com/docs/latest/api#switchmatch */ export declare function Match>) => JSX.Element>(props: { when: T | undefined | null | false; keyed?: false; children: JSX.Element | RequiredParameter; }): JSX.Element; export declare function Match) => JSX.Element>(props: { when: T | undefined | null | false; keyed: true; children: JSX.Element | RequiredParameter; }): JSX.Element; export declare function resetErrorBoundaries(): void; /** * catches uncaught errors inside components and renders a fallback content * * Also supports a callback form that passes the error and a reset function: * ```typescript *
Error: {err.toString()}
* }> * *
* ``` * Errors thrown from the fallback can be caught by a parent ErrorBoundary * * @description https://www.solidjs.com/docs/latest/api#errorboundary */ export declare function ErrorBoundary(props: { fallback: JSX.Element | ((err: any, reset: () => void) => JSX.Element); children: JSX.Element; }): JSX.Element; export {};