Repository navigation
Commit 4c5ba7e
authored
fix(storage): give the compat fromTask an explicit return type (#3796)
fromTask declared no return type, so the published typings import
whatever path the typings bundler picks for the inferred firebase
type. In 20.x that is 'firebase/compat', which firebase's exports map
does not list. Apps using moduleResolution "bundler", the setting the
@angular/build migration moves apps to, fail with TS2307 in
@angular/fire/compat/storage. 21.0.0-rc.1 happens to emit
'firebase/compat/app' and compiles, but ng-packagr 22.2's new typings
bundler cannot parse the inferred type and fails the library build.
Declaring Observable<UploadTaskSnapshot> removes the inferred import.
The type is unchanged: UploadTaskSnapshot is the compat alias for
firebase.storage.UploadTaskSnapshot.
Also drop a comment explaining a firebase import that #3421 removed
in 2023 as unused. The import only existed to steer these typings.
Fixes #36771 parent d95316b commit 4c5ba7e
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | | - | |
| 7 | + | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
0 commit comments