@jag-k/scriptable-jsx
Version:
Create a Scriptable bundle from JSX
38 lines (37 loc) • 1.02 kB
TypeScript
/// <reference types="@types/scriptable-ios" />
export declare class ScriptableJSX {
static createElement(element: unknown, props: Record<string, any>, ...children: any[]): Alert | {
type: "text-field";
props: Record<string, any>;
children?: undefined;
} | {
type: "action";
props: Record<string, any>;
children: any[];
} | ListWidget | {
type: "text";
props: Record<string, any>;
text: string;
children?: undefined;
} | {
type: "stack";
props: Record<string, any>;
children: any[];
text?: undefined;
} | {
type: "spacer";
props: Record<string, any>;
text?: undefined;
children?: undefined;
} | {
type: "image";
props: Record<string, any>;
text?: undefined;
children?: undefined;
} | {
type: "date";
props: Record<string, any>;
text?: undefined;
children?: undefined;
} | undefined;
}