Closed michaeltintiuc closed 4 years ago
Add Prop type to FunctionalComponent generic and add props property to the created component.
FunctionalComponent
Proof of concept:
import { FunctionalComponent, h } from 'vue'; import { keys } from 'ts-transformer-keys'; import { JSX } from '@ionic/core'; export const defineContainer = (name: string) => { const Container: FunctionalComponent<JSX.SomeComponent> = (props, { slots }) => h(name, props, slots.default && slots.default()); Container.displayName = name; Container.props = keys<JSX.SomeComponent>(); return Container; };
See this library and it's guide on updates to rollup config: https://github.com/kimamula/ts-transformer-keys
Add Prop type to
FunctionalComponent
generic and add props property to the created component.Proof of concept:
See this library and it's guide on updates to rollup config: https://github.com/kimamula/ts-transformer-keys