mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-04 13:50:13 -05:00
368 B
368 B
Create API
Add your API in libs/plugins-runtime/src/lib/api/index.ts
.
Try to use zod
to validate the input an output, for example:
{
sum: z.function()
.args(z.number(), z.number())
.returns(z.number())
.implement((callback, time) => {
setTimeout(callback, time);
});
}
Update /libs/plugins-runtime/src/lib/api/index.d.ts
.