This most likely not an error but I can't figure out how to solve my problem and I couldn't find anything that actually helped me in other posts.
Angular: 6.0.3
Firebase: 5.2.0
AngularFire: 5.0.0-rc.11
Other (e.g. Ionic/Cordova, Node, browser, operating system): No
Steps to set up and reproduce
const key = this.db.createId;
this.categoiresRef.doc(key).set({'test' : 'test'});
I get the Syntax Error: Argument of type '(this: Function, thisArg: any, argArray?: any) => any' is not assignable to parameter of type 'string'.
I expected that createId would me a random generated Id as a String with which I could set a Document in a Collection. I want to get the Key before pushing my Object. I know that this works with java but I can麓t figure out how to do it in AngularFire.
I think you are missing some brackets.
constructor(public readonly afs: AngularFirestore) {}
doc.id = this.afs.createId();
Most helpful comment
I think you are missing some brackets.