Why does typescript break if you send props to a component with a spread statement?
Example code
type SomeComponentProps = Readonly<{
someTitle: string
}>
const SomeComponent = ({ someTitle }: SomeComponentProps) => {
return <>someTitle</>
}
const MainComponent = () => {
const someTitle = 'Some title'
const TICK = 'TICK'
return <SomeComponent {...{ someTitle, TICK }} />
}
TICK is not underlined in red and the linter will not pick up the error