[combineLatest] can not identify type of its params
Describe the bug
here, this.__linkServ.links is type of ObservablecombineLatest([this.__linkServ.links, this.__userServ.getUserInfo()]) .pipe(takeUntil(this.__destroy$)) .subscribe(([links, userInfo]) => { const link = links?.tms_predefinedTag_common || ''; const hasAuth = !userInfo?.roles?.includes('op_gated_tms'); const predefinedTag = this.operators?.items?.[0]!; predefinedTag.hide = !(link && hasAuth); predefinedTag.link.href = link; });

if i specify the types manully like:
combineLatest([this.__linkServ.links, this.__userServ.getUserInfo()] as [Observable<any>,Observable<any>]) .pipe(takeUntil(this.__destroy$)) .subscribe(([links, userInfo]) => { const link = links?.tms_predefinedTag_common || ''; const hasAuth = !userInfo?.roles?.includes('op_gated_tms'); const predefinedTag = this.operators?.items?.[0]!; predefinedTag.hide = !(link && hasAuth); predefinedTag.link.href = link; });
it is ok.
Another thing is, the former code combineLatest refers to
but the later refers to

Expected behavior
no error
Reproduction code
No response
Reproduction URL
No response
Version
7.4.0
Environment
No response
Additional context
No response
Can you please provide a playground with something that can be reproduced? Codesandbox or Stackblitz.
I tried a simple example
const links: Observable<unknown> = null as any;
const userInfo: ReplaySubject<unknown> = null as any;
combineLatest([links, userInfo]).subscribe(([links, userInfo]) => {
// Works correctly
})
My env is [email protected]
If you manage to create a sandbox for it, it will be simpler to find out what's the issue