fix(common): correct and simplify typing of AsyncPipe (#37447)
`AsyncPipe.transform` will never return `undefined`, even when passed `undefined` in input, in contrast with what was declared in the overloads. Additionally the "actual" method signature can be updated to match the most generic case, since the implementation does not rely on wrappers anymore. BREAKING CHANGE: The async pipe no longer claims to return `undefined` for an input that was typed as `undefined`. Note that the code actually returned `null` on `undefined` inputs. In the unlikely case you were relying on this, please fix the typing of the consumers of the pipe output. PR Close #37447
This commit is contained in:

committed by
Alex Rickabaugh

parent
c7d5555dfb
commit
5f815c0565
@ -251,7 +251,7 @@ describe('definitions', () => {
|
||||
expect(textSpan).toEqual(marker);
|
||||
|
||||
expect(definitions).toBeDefined();
|
||||
expect(definitions!.length).toBe(4);
|
||||
expect(definitions!.length).toBe(3);
|
||||
|
||||
const refFileName = '/node_modules/@angular/common/common.d.ts';
|
||||
for (const def of definitions!) {
|
||||
|
Reference in New Issue
Block a user