@oomol/types
v0.0.33
Published
public oomol types, contains oocana, render, inputRender types, is used in oomol studio.
Downloads
194
Keywords
Readme
@oomol/types
@oomol/types/oocana
from block code
import type { MainFunction } from "@oomol/types/oocana";
type Inputs = {
input: string;
};
type Outputs = {
output: string;
};
export const main: MainFunction<Inputs, Outputs> = ({ inputs, context }) => {
console.log("input", inputs.input);
return {
output: "output data",
};
};@oomol/types/render
for block render
import type { NodeRenderer, RenderContext } from "@oomol/types/render";
const renderer: NodeRenderer = {
setup(dom: HTMLElement, context: RenderContext) {
return () => {
// dispose
};
},
};
export default renderer;@oomol/types/inputRender
for input handle section render
import type { InputRenderer, InputRenderContext } from "@oomol/types/inputRender";
export const prompt: InputRenderer = function setup(dom: HTMLElement, context: InputRenderContext) {
return () => {
// dispose
};
};