Skip to content

Spread types may only be created from object types #1661

@alexbjorlig

Description

@alexbjorlig

I am not sure if this is a bug, but after upgrading to angularfire2@5.0.0-rc.9 I get this strange error on our spread operators. I created a small stackblitz that illustrates how we use the snapshotChanges() in our project. If you install angularfire2@5.0.0-rc.8 there are no errors.

Version info

Angular: 6

Firebase: 5.0.2

AngularFire: 5.0.0-rc.9

How to reproduce these conditions

https://stackblitz.com/edit/spread-operator-error

Open stackblitz

Debug output

screen shot 2018-05-16 at 21 17 11

Expected behavior

No error

Actual behavior

Typescript gives error

ERROR in <path-to-file>: error TS2698: Spread types may only be created from object types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions