Skip to content

widgets.compile

Compiles a card’s one-file widget source to an ES module, writing nothing (PRT-225).

/** `widgets.compile` params (PRT-225): the source of a card's one-file widget. */
export type CompileWidgetParams = {
code: string;
};
/** `widgets.compile` result (PRT-225): the ES module, with an inline source map. */
export type CompiledWidget = {
module: string;
};