I have a function that returns observables from all widgets. There are two types of widgets. Here is what I tried and the IDE does not complain, but my compiler does:
public getAllWidgets(): Observable<WidgetType1 | WidgetType2> { ... }
Observed <(WidgetType1 | WidgetType2) []>
An array was returned. The error was unclear.
Source: https://habr.com/ru/post/1258754/More articles:Why isand the elements belong to the content stream in html? - htmlTruncated response received using HttpWebRequest - c #Unimplemented console API: undefined, error in debugging Visual Studio code - angularjsTypeScript multiple return types with the same parameters - typescriptReducing the fingerprint of debugging symbols (the executable is bloated up to 4 GB) - c ++BEM: Can modifiers be modified? - cssTypescript: security type for interface properties in function declaration - typescriptCannot restore nuget packages in VSTS (packages could not be installed) - visual-studio-2013How to save Plotly Offline graph in png format? - pythonHow to break a number into certain amounts - javascriptAll Articles