JSX

JSX()

(f: any, presets: any, ...rest: any[]): typeof Component & ComponentConstructor<UIRenderable>

JSX support for Typescene UI components.


JSX.JSX.

TypeScript JSX typing information.


JSX.intrinsicTags

{ [tag: string]: { with: Function; }; }

References to JSX factory functions for all intrinsic tags.


JSX.FactoryType

Helper type to describe a JSX component factory.


JSX.DefaultFactoryType

extends FactoryType<T, ComponentConstructor.PresetType<T>>

Helper to describe a JSX component factory for a standard UI component.


JSX.ViewComponentPresetArgType

type ViewComponentPresetArgType<TComponent extends typeof ViewComponent, K extends keyof InstanceType<TComponent> = Exclude<{
[P in keyof InstanceType<TComponent>]: InstanceType<TComponent>[P] extends Function ? never : P;
}[keyof InstanceType<TComponent>], keyof ViewComponent>> = Pick<InstanceType<TComponent>, K>;

Type definition for the automatic component preset type of ViewComponent classes.


JSX.tag

<T extends typeof Component & ComponentConstructor<UIRenderable> & (new () => UIRenderable)>(C: T): FactoryType<T, PresetArgType<T>> & { ...; }

Returns JSX-compatible factory function for given component class.