UNPKG

generaltranslation

Version:

A language toolkit for AI developers

22 lines (21 loc) 1.06 kB
import { JsxChild, JsxChildren } from '../types'; import { OldJsxChild, OldJsxChildren, OldVariableObject } from './oldTypes.js'; import { Variable as VariableObject } from '../types'; /** * Checks if a JSX child is an old variable object format * @param child - The JSX child to check * @returns True if the child is an old variable object (has 'key' property) */ export declare function isOldVariableObject(child: OldJsxChild | JsxChild): child is OldVariableObject; /** * Checks if a JSX child is a new variable object format * @param child - The JSX child to check * @returns True if the child is a new variable object (has 'k' property) */ export declare function isNewVariableObject(child: OldJsxChild | JsxChild): child is VariableObject; /** * Checks if JSX children follow the old format * @param children - The JSX children to check (can be string, array, or single child) * @returns True if all children are in the old format */ export declare function isOldJsxChildren(children: OldJsxChildren | JsxChildren): children is OldJsxChildren;