Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast collectionData to avoid TS errors #3434

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahmetkizilay
Copy link

@ahmetkizilay ahmetkizilay commented Sep 16, 2023

Using the current code example, I am getting an error message Typescript error message like:

Type 'Observable<(DocumentData | (DocumentData & { .... }))[]>' is not assignable to type 'Observable<Item[]>'.

This change also makes this code example more consistent with the current example in firestore.md

Checklist

  • Issue number for this PR: none.
  • Docs included?: yes.
  • Test units included?: no
  • In a clean directory, yarn install, yarn test run successfully? yes.

Description

Code sample

README.md Outdated Show resolved Hide resolved
Using the current code example, I am getting an error message Typescript error message like: 

```
Type 'Observable<(DocumentData | (DocumentData & { .... }))[]>' is not assignable to type 'Observable<Item[]>'.
```

This change also makes this code example more consistent with the current example in [firestore.md](https://github.com/angular/angularfire/blob/5793d6f3a15aa61660af75ab361c534cde9b73df/docs/firestore.md?plain=1#L91)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants