Const
Provide type infer for generic setup function, do nothing in runtime.
const genericSetup = <T>(props: T) => ({ node: h('div'), data: () => props,});using scene = app.scene(generic(genericSetup), { defaultProps: {} });const data = await scene.show({ text: '' });data.text; // is string Copy
const genericSetup = <T>(props: T) => ({ node: h('div'), data: () => props,});using scene = app.scene(generic(genericSetup), { defaultProps: {} });const data = await scene.show({ text: '' });data.text; // is string
Provide type infer for generic setup function, do nothing in runtime.