import React from 'react' ; const defaultProps = { who : 'World' , greeting : 'Hello' , } ; type Props = Partial < typeof defaultProps > ; export function Greeter ( props ) { const { who , greeting } = { ... defaultProps , ... props } ; return ( < div > { greeting } { who } ! < /div>); } const App = ( ) => { return ( < div > < Greeter /> < /div>); } ;