interface ParentProps{
id:string;
name:string;
password:string;
}
function Parent(){
const toChild : ParentProps = {
id:'qwerty',
name:'qt',
password:'monkey'
}
return(
<div>
<Child props={toChild}/>
</div>
)
}
type Childprops={
props:ParentProps
}
function Child({props}:Childprops){
return(
<div>
<p>{props.key}</p>
</div>
)
}