My question here is; What's causing vscode to lose track of the type and if there is any way of extending it's capability. Secondarily any possible workaround would be appreciated.
I've done some googling and found a couple issues related to infinite type recursion getting abandoned but I'm not sure if this falls in that boat or not. If it is that I think this instance is pretty interesting given Rxjs is such a widely used library and this problem can be triggered after only 9 map calls in a given pipe.
https://github.com/microsoft/TypeScript/issues/35533
https://github.com/microsoft/TypeScript/issues/29511
See below for a simple code fragment that reproduces the issue in vscode.
import { Subject } from 'rxjs';
import { map } from 'rxjs/operators';
const test = new Subject<string>();
test.pipe(
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg),
map(msg => msg) // <---- type is lost here, msg becomes any!
);
pipeafter 9 operators.test.pipe(9-operators).pipe(more-operators)- frido