Spread operator in typescript doesn't guarantee correct type Spread operator in typescript doesn't guarantee correct type typescript typescript