UNPKG

velund

Version:

Модульная UI-система на Vite для полиглотных бэкендов

17 lines (15 loc) 507 B
function defineComponent(opts) { if (!opts || typeof opts !== "object") throw new Error("Options required"); if (!opts.name || typeof opts.name !== "string") throw new Error('Option "name" is required'); const descriptor = { name: opts.name, template: opts.template || "Empty template", propsSchema: opts.propsSchema, contextSchema: opts.contextSchema, prepare: opts.prepare, __raw: opts }; return descriptor; } export { defineComponent as default, defineComponent };