nexora
Version:
A lightweight, production-ready JavaScript library for building user interfaces, supporting JSX.
46 lines (45 loc) • 1.16 kB
TypeScript
import { VNode } from '../../core';
declare global {
namespace JSX {
interface Element extends VNode {
}
interface Element {
type: string | Function;
props: any;
}
interface IntrinsicElements {
[elemName: string]: any;
}
interface ElementChildrenAttribute {
children: {};
}
}
}
/**
* ## Nexora JSX Factory ##
* @description - This function is used to create a VNode from a JSX element or component.
* @param type - The type of the element or component.
* @param props - The properties of the element or component.
* @param children - The children of the element or component.
* @returns The VNode of the element or component.
*/
export declare function Nexora(type: string | Function, props: any, ...children: any[]): {
type: string;
props: {
children: any[];
_componentFn: Function;
_renderKey: number;
};
key: null;
ref: null;
} | {
type: Function;
props: any;
key: null;
ref: null;
} | {
type: string;
props: any;
key?: undefined;
ref?: undefined;
};