Tengo un problema al iterar sobre una matriz de diferentes tipos. Imaginemos que tenemos una función que acepta una matriz y una clave que dice qué tipo de matriz es
function Do(feeds: IGType[] | FBType[], channel: 'IG' | 'FB')Entonces, cuando quiero iterar sobre los feeds de Bluebird.map mecanografiado, diga eso
Argument of type 'IGType[] | FBType[]' is not assignable to parameter of type 'IterableCollection<IGType>'. Type 'FBType[]' is not assignable to type 'IterableCollection<IGType>'. Type 'FBType[]' is not assignable to type 'IGType[]'. Type 'FBType' is not assignable to type 'IGType'. Type 'FBType' is missing the following properties from type 'IGType': cached, meta, $getAllSubdocs, $ignore, and 50 more.ts(2345)