Open larkox opened 2 years ago
Let a component like:
const myComponent = ({myList: string[]}) => { ... }
If we pass a more general within withObservables, instead of typescript complaining, it appears as valid:
const wo = withObservables() => { const list: Observable<(string|number)[]> = ... return {myList: list} }
Expected result: Some error saying that types are not compatible, since the return type of withObservables ((string|number)[]) is not assignable to the props (string[]).
(string|number)[]
string[]
Some other examples:
string
string|undefined
Let a component like:
If we pass a more general within withObservables, instead of typescript complaining, it appears as valid:
Expected result: Some error saying that types are not compatible, since the return type of withObservables (
(string|number)[]
) is not assignable to the props (string[]
).Some other examples:
string
, withObservables return:string|undefined
.