Я хочу создать функциональный компонент в vuejs с машинописью. Однако я не уверен, как настроить общую часть так, чтобы я мог получить доступ к моим реквизитам. У меня есть это до сих пор:
import Vue, { FunctionalComponentOptions } from 'vue';
export default Vue.component<FunctionalComponentOptions>('MyWrapper', {
functional: true,
render: (createElement, context) => {
if (context.props['flagSet']) {
console.log('flagset');
}
return createElement('div', context.data, context.children);
}
});
Ошибка, которую я получаю для строки context.props:
Element implicitly has an 'any' type because type 'FunctionalComponentOptions<Record<string, any>, PropsDefinition<Record<string, any>>>' has no index signature.
Что я не знаю, как решить.