[Solved] Passing type to react component declared as React.FC

Garvae Asks: Passing type to react component declared as React.FC
There is something I can’t figure out with the passed type for the react component.

Parent component:

Code:
import React from "react";
import ChildrenComponent from './ChildrenComponent'

type TParentComponent = {
    // no matter what here
}

const ParentComponent:React.FC<TParentComponent> = props => {

    type TTypeInParentComponent = 'special type I can declare only inside ParentComponent'
    type TChildrenComponent = {
        childrenComponentProp: TTypeInParentComponent
    }

    return (
        <ChildrenComponent<TChildrenComponent> /* error: TS2558: Expected 0 type arguments, but got 1. */> 
            Something
        </ChildrenComponent>
    )
}

export default ParentComponent

Children component:

Code:
import React from "react";

type TChildren = {
 // how to pass the "TChildrenComponent" type from the ParentComponent here?
}

const ChildrenComponent:React.FC<TChildren> = props => {

    const { childrenComponentProp } = props /* error: TS2339: Property 'childrenComponentProp' does not exist on type '{ children?: ReactNode; }'. */

    return (
        <div>
            Something else
        </div>
    )
}

export default ChildrenComponent

Question: how to pass type TChildrenComponent from ParentComponent to ChildrenComponent ?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.