import { Widget } from "@meursyphus/flitter"; export type CustomWidget, R = {}, THEME = {}, DATA = {}> = { type: "custom"; Custom: (child: T extends string ? { [key in T]: () => Widget; } : T extends {} ? T : {}, data: R & { theme: THEME; data: DATA; }) => Widget; }; export type CustomConfig = { type: "config"; } & T;