Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
There is a specific case when (() => Smth) | undefined is passed to rxResource.params field that ends with a wrong type of rxResource.stream.params field - possible null value is not mentioned in the type.
code (or check the reproduction link)
params = signal<Params | undefined>(undefined);
data = rxResource({
params: this.getParams(),
stream: ({ params }) => {
console.log('> params', params);
return NEVER;
},
});
getParams(): Params | undefined {
if (!this.params()) {
return undefined;
}
return () => this.params();
}
params type inside stream function is (parameter) params: Params but in reality its value can be null if getParams() returns undefined
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/kuh9jtu5?file=src%2Fmain.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 20.1.1
Node: 24.1.0
Package Manager: npm 11.3.0
OS: darwin arm64
Angular: 20.1.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2001.1
@angular-devkit/core 20.1.1
@angular-devkit/schematics 20.1.1
@angular/build 20.1.1
@angular/cli 20.1.1
@schematics/angular 20.1.1
rxjs 7.8.2
typescript 5.8.3
Anything else?
No response
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
There is a specific case when
(() => Smth) | undefinedis passed torxResource.paramsfield that ends with a wrong type ofrxResource.stream.paramsfield - possiblenullvalue is not mentioned in the type.code (or check the reproduction link)
paramstype insidestreamfunction is(parameter) params: Paramsbut in reality its value can benullifgetParams()returnsundefinedPlease provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/kuh9jtu5?file=src%2Fmain.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
No response