interface StatelessComponent

{ (props: P & { children?: number }, context?: any): null; } const TestComponent: StatelessComponent = (props) => { return null; } interface ITestProps { ariaLabel?: string; } interface NestedProp { props: TProps; } interface TestProps { icon: NestedProp; } TestComponent({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } }}); const TestComponent2: StatelessComponent = (props) => { return null; } TestComponent2({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } }});