spread types may only be created from object types firebase

Solutions on MaxInterview for spread types may only be created from object types firebase by the best coders in the world

showing results for - "spread types may only be created from object types firebase"
Nahil
07 Jul 2017
1function foo<T extends object>(t: T): T {
2  return { ...(t as object) } as T;
3}
Anna
01 Sep 2017
1function foo<T extends object>(t: T): T {
2
3  return {
4    ...t    // Error: [ts] Spread types may only be created from object types.
5  }
6}
Gino
13 May 2016
1... doc.payload.doc.data() as {}