Type 'string | number' is not assignable to type 'never' in Typescript
Type 'string | number' is not assignable to type 'never' in Typescript Problem Description: When I write some code, I have some problems like that: function getObjectKeys<T extends object>(object: T) { return Object.keys(object) as (keyof T)[] } const props = { propA: 100, propB: ‘text’ } const store = { …props } getObjectKeys(props).forEach((key) => { … Read more