fix(react): createComponent prop type error

This commit is contained in:
Sean Perkins
2022-10-21 13:24:54 -04:00
parent e38d555530
commit 6e1127ef5f

View File

@ -27,9 +27,9 @@ export const createReactComponent = <
ReactComponentContext?: React.Context<ContextStateType>, ReactComponentContext?: React.Context<ContextStateType>,
manipulatePropsFunction?: ( manipulatePropsFunction?: (
originalProps: StencilReactInternalProps<ElementType>, originalProps: StencilReactInternalProps<ElementType>,
propsToPass: any, propsToPass: any
) => ExpandedPropsTypes, ) => ExpandedPropsTypes,
defineCustomElement?: () => void, defineCustomElement?: () => void
) => { ) => {
if (defineCustomElement !== undefined) { if (defineCustomElement !== undefined) {
defineCustomElement(); defineCustomElement();
@ -68,7 +68,7 @@ export const createReactComponent = <
(acc as any)[name] = (cProps as any)[name]; (acc as any)[name] = (cProps as any)[name];
} }
return acc; return acc;
}, {}); }, {} as ExpandedPropsTypes);
if (manipulatePropsFunction) { if (manipulatePropsFunction) {
propsToPass = manipulatePropsFunction(this.props, propsToPass); propsToPass = manipulatePropsFunction(this.props, propsToPass);