Title: AngularFire 7 Document Typing · Issue #2931 · angular/angularfire · GitHub
Open Graph Title: AngularFire 7 Document Typing · Issue #2931 · angular/angularfire
X Title: AngularFire 7 Document Typing · Issue #2931 · angular/angularfire
Description: Have we lost document typing with the upgrade to AngularFire 7? In the past, we were able to do (as shown in the docs) something like afs.doc
Open Graph Description: Have we lost document typing with the upgrade to AngularFire 7? In the past, we were able to do (as shown in the docs) something like afs.doc
X Description: Have we lost document typing with the upgrade to AngularFire 7? In the past, we were able to do (as shown in the docs) something like afs.doc<Item>('items/1') and that would return Do...
Opengraph URL: https://github.com/angular/angularfire/issues/2931
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AngularFire 7 Document Typing","articleBody":"Have we lost document typing with the upgrade to AngularFire 7?\r\n\r\nIn the past, we were able to do ([as shown in the docs](https://github.com/angular/angularfire/blob/7.0.3/docs/firestore/documents.md)) something like `afs.doc\u003cItem>('items/1')` and that would return `DocumentReference\u003cItem>` as the type.\r\n\r\nNow it looks like the functions that exist are\r\n```\r\nfunction doc(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): DocumentReference\u003cDocumentData>;\r\nfunction doc\u003cT>(reference: types.CollectionReference\u003cT>, path?: string, ...pathSegments: string[]): DocumentReference\u003cT>;\r\nfunction doc(reference: types.DocumentReference\u003cunknown>, path: string, ...pathSegments: string[]): DocumentReference\u003cDocumentData>;\r\n```\r\nThe only one that is typed is the one that takes in a previous collection reference. Meanwhile, this first is the one we're directed to use in the [upgrade documentation](https://github.com/angular/angularfire/blob/7.0.3/docs/version-7-upgrade.md) and it only uses DocumentData. One of the big benefits to using AngularFire previously over the vanilla Firebase libraries was the fact that DocumentData didn't have to be cast. Has that now been removed?","author":{"url":"https://github.com/kevin-induro","@type":"Person","name":"kevin-induro"},"datePublished":"2021-09-07T22:40:39Z","url":"https://github.com/angular/angularfire/issues/2931"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6434189f-a793-2b1c-a248-db3ea6b0af43 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DBE:27CA4:2F418BC:3EEDBCE:6B036019 |
| html-safe-nonce | c875be5891066f76c1b61d4f9f8b8c6568b2d3eafac8975ffff515ce31e034fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REJFOjI3Q0E0OjJGNDE4QkM6M0VFREJDRTo2QjAzNjAxOSIsInZpc2l0b3JfaWQiOiIxNTY3MzA5Mjc1NDk0MzA5OTEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | aaad767718448b80a6419a647586b68f08999dc742a7449c4d9b164e93f7002e |
| hovercard-subject-tag | issue:990406692 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/2931/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd61c7f9a863971d253efc6f2f450bc79e2d9a8d73329e2c136b88de8031d7fd/angular/angularfire/issues/2931 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd61c7f9a863971d253efc6f2f450bc79e2d9a8d73329e2c136b88de8031d7fd/angular/angularfire/issues/2931 |
| og:image:alt | Have we lost document typing with the upgrade to AngularFire 7? In the past, we were able to do (as shown in the docs) something like afs.doc |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kevin-induro |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width