Closed manwithsteelnerves closed 3 years ago
I was able to run your command without a problem. You probably have an unrelated issue.
I'm not sure how its not working for me. Its a direct install. Whats your Typescript/nodejs/npm version? @rafikhan Please have a look at below error log on calling npm install
Ayyappas-iMac:testing ayyappa$ npm install https://github.com/manwithsteelnerves/nodejs-firestore-rest.git
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/ayyappa/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! > @google-cloud/firestore@4.9.8 prepare
npm ERR! > npm run compile
npm ERR!
npm ERR!
npm ERR! > @google-cloud/firestore@4.9.8 precompile
npm ERR! > gts clean
npm ERR!
npm ERR! version: 12
npm ERR! Removing build ...
npm ERR!
npm ERR! > @google-cloud/firestore@4.9.8 compile
npm ERR! > tsc -p .
npm ERR!
npm ERR! dev/src/bulk-writer.ts:110:19 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 110 readonly ref: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:115:12 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 115 ref: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:196:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 196 has(documentRef: firestore.DocumentReference<unknown>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:278:27 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 278 readonly documentRef: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:339:15 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 339 document: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:437:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 437 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:477:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 477 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:489:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 489 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:494:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 494 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:533:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 533 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:587:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 587 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:622:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 622 documentRef: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/bulk-writer.ts:809:10 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 809 ref: firestore.DocumentReference<unknown>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/collection-group.ts:180:3 - error TS2416: Property 'withConverter' in type 'CollectionGroup<T>' is not assignable to the same property in base type 'CollectionGroup<T>'.
npm ERR! Type '{ (converter: null): CollectionGroup<DocumentData>; <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; }' is not assignable to type '{ <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; (converter: null): CollectionGroup<DocumentData>; }'.
npm ERR! Types of parameters 'converter' and 'converter' are incompatible.
npm ERR! Type 'FirestoreDataConverter<any>' is not assignable to type 'null'.
npm ERR!
npm ERR! 180 withConverter(converter: null): CollectionGroup<firestore.DocumentData>;
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/collection-group.ts:181:3 - error TS2416: Property 'withConverter' in type 'CollectionGroup<T>' is not assignable to the same property in base type 'CollectionGroup<T>'.
npm ERR! Type '{ (converter: null): CollectionGroup<DocumentData>; <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; }' is not assignable to type '{ <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; (converter: null): CollectionGroup<DocumentData>; }'.
npm ERR!
npm ERR! 181 withConverter<U>(
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/collection-group.ts:184:3 - error TS2416: Property 'withConverter' in type 'CollectionGroup<T>' is not assignable to the same property in base type 'CollectionGroup<T>'.
npm ERR! Type '{ (converter: null): CollectionGroup<DocumentData>; <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; }' is not assignable to type '{ <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; (converter: null): CollectionGroup<DocumentData>; }'.
npm ERR!
npm ERR! 184 withConverter<U>(
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document-change.ts:101:7 - error TS2416: Property 'doc' in type 'DocumentChange<T>' is not assignable to the same property in base type 'DocumentChange<DocumentData>'.
npm ERR! Type 'QueryDocumentSnapshot<T>' is not assignable to type 'QueryDocumentSnapshot'.
npm ERR! Types of property 'ref' are incompatible.
npm ERR! Property 'getCollections' is missing in type 'DocumentReference<T>' but required in type 'DocumentReference'.
npm ERR!
npm ERR! 101 get doc(): QueryDocumentSnapshot<T> {
npm ERR! ~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:569:5
npm ERR! 569 getCollections() : Promise<CollectionReference[]>;
npm ERR! ~~~~~~~~~~~~~~
npm ERR! 'getCollections' is declared here.
npm ERR!
npm ERR! dev/src/document-change.ts:176:9 - error TS2367: This condition will always return 'false' since the types 'this' and 'DocumentChange<T>' have no overlap.
npm ERR!
npm ERR! 176 if (this === other) {
npm ERR! ~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:100:14 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 100 implements firestore.DocumentSnapshot<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:143:10 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 143 ref: firestore.DocumentReference<U>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:164:10 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 164 ref: firestore.DocumentReference<U>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:397:9 - error TS2345: Argument of type 'QueryDocumentSnapshot<DocumentData>' is not assignable to parameter of type 'QueryDocumentSnapshot'.
npm ERR! Types of property 'ref' are incompatible.
npm ERR! Property 'getCollections' is missing in type 'DocumentReference<DocumentData>' but required in type 'DocumentReference'.
npm ERR!
npm ERR! 397 new QueryDocumentSnapshot<firestore.DocumentData>(
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 398 untypedReference,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ...
npm ERR! 402 this.updateTime!
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 403 )
npm ERR! ~~~~~~~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:569:5
npm ERR! 569 getCollections() : Promise<CollectionReference[]>;
npm ERR! ~~~~~~~~~~~~~~
npm ERR! 'getCollections' is declared here.
npm ERR!
npm ERR! dev/src/document.ts:513:18 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 513 isEqual(other: firestore.DocumentSnapshot<T>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:542:14 - error TS2315: Type 'QueryDocumentSnapshot' is not generic.
npm ERR!
npm ERR! 542 implements firestore.QueryDocumentSnapshot<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:906:10 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 906 ref: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/document.ts:927:10 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 927 ref: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:629:3 - error TS2416: Property 'doc' in type 'Firestore' is not assignable to the same property in base type 'Firestore'.
npm ERR! Type '(documentPath: string) => DocumentReference<DocumentData>' is not assignable to type '(documentPath: string) => DocumentReference'.
npm ERR! Type 'DocumentReference<DocumentData>' is not assignable to type 'DocumentReference'.
npm ERR!
npm ERR! 629 doc(documentPath: string): DocumentReference {
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/index.ts:658:3 - error TS2416: Property 'collection' in type 'Firestore' is not assignable to the same property in base type 'Firestore'.
npm ERR! Type '(collectionPath: string) => CollectionReference<DocumentData>' is not assignable to type '(collectionPath: string) => CollectionReference'.
npm ERR! Call signature return types 'CollectionReference<DocumentData>' and 'CollectionReference' are incompatible.
npm ERR! The types of 'parent' are incompatible between these types.
npm ERR! Type 'DocumentReference<DocumentData> | null' is not assignable to type 'DocumentReference | null'.
npm ERR! Type 'DocumentReference<DocumentData>' is not assignable to type 'DocumentReference'.
npm ERR!
npm ERR! 658 collection(collectionPath: string): CollectionReference {
npm ERR! ~~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:939:3 - error TS2416: Property 'runTransaction' in type 'Firestore' is not assignable to the same property in base type 'Firestore'.
npm ERR! Type '<T>(updateFunction: (transaction: import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/transaction").Transaction) => Promise<T>, transactionOptions?: { maxAttempts?: number | undefined; } | undefined) => Promise<...>' is not assignable to type '<T>(updateFunction: (transaction: FirebaseFirestore.Transaction) => Promise<T>, transactionOptions?: { maxAttempts?: number | undefined; } | undefined) => Promise<...>'.
npm ERR! Types of parameters 'updateFunction' and 'updateFunction' are incompatible.
npm ERR! Types of parameters 'transaction' and 'transaction' are incompatible.
npm ERR! Type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/transaction").Transaction' is not assignable to type 'FirebaseFirestore.Transaction'.
npm ERR!
npm ERR! 939 runTransaction<T>(
npm ERR! ~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:982:3 - error TS2416: Property 'listCollections' in type 'Firestore' is not assignable to the same property in base type 'Firestore'.
npm ERR! Type '() => Promise<CollectionReference<DocumentData>[]>' is not assignable to type '() => Promise<CollectionReference[]>'.
npm ERR! Type 'Promise<CollectionReference<DocumentData>[]>' is not assignable to type 'Promise<CollectionReference[]>'.
npm ERR! Type 'CollectionReference<DocumentData>[]' is not assignable to type 'CollectionReference[]'.
npm ERR! Type 'CollectionReference<DocumentData>' is not assignable to type 'CollectionReference'.
npm ERR!
npm ERR! 982 listCollections(): Promise<CollectionReference[]> {
npm ERR! ~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:1008:3 - error TS2416: Property 'getAll' in type 'Firestore' is not assignable to the same property in base type 'Firestore'.
npm ERR! Type '<T>(...documentRefsOrReadOptions: any[]) => Promise<DocumentSnapshot<T>[]>' is not assignable to type '(...documentRefsOrReadOptions: (DocumentReference | ReadOptions)[]) => Promise<DocumentSnapshot[]>'.
npm ERR! Type 'Promise<DocumentSnapshot<DocumentData>[]>' is not assignable to type 'Promise<DocumentSnapshot[]>'.
npm ERR!
npm ERR! 1008 getAll<T>(
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:1010:7 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1010 firestore.DocumentReference<T> | firestore.ReadOptions
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:1027:5 - error TS2322: Type 'Promise<DocumentSnapshot<unknown>[]>' is not assignable to type 'Promise<DocumentSnapshot<T>[]>'.
npm ERR! Type 'DocumentSnapshot<unknown>[]' is not assignable to type 'DocumentSnapshot<T>[]'.
npm ERR! Type 'DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<T>'.
npm ERR! The types returned by '_ref._converter.fromFirestore(...)' are incompatible between these types.
npm ERR! Type 'unknown' is not assignable to type 'T'.
npm ERR!
npm ERR! 1027 return this.initializeIfNeeded(tag)
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 1028 .then(() => this.getAll_(documents, fieldMask, tag))
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ...
npm ERR! 1030 throw wrapError(err, stack);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 1031 });
npm ERR! ~~~~~~~~~
npm ERR!
npm ERR! dev/src/index.ts:1046:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1046 docRefs: Array<firestore.DocumentReference<T>>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:126:28 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 126 implements Serializable, firestore.DocumentReference<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:256:5 - error TS2322: Type 'Promise<DocumentSnapshot<T> | DocumentSnapshot<unknown>>' is not assignable to type 'Promise<DocumentSnapshot<T>>'.
npm ERR! Type 'DocumentSnapshot<T> | DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<T>'.
npm ERR! Type 'DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<T>'.
npm ERR! The types returned by '_ref._converter.fromFirestore(...)' are incompatible between these types.
npm ERR! Type 'unknown' is not assignable to type 'T'.
npm ERR!
npm ERR! 256 return this._firestore.getAll(this).then(([result]) => result);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:499:24 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 499 onNext: (snapshot: firestore.DocumentSnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:534:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 534 isEqual(other: firestore.DocumentReference<T>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:739:14 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 739 implements firestore.QuerySnapshot<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:918:24 - error TS2315: Type 'QueryDocumentSnapshot' is not generic.
npm ERR!
npm ERR! 918 callback: (result: firestore.QueryDocumentSnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:936:18 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 936 isEqual(other: firestore.QuerySnapshot<T>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:960:22 - error TS2345: Argument of type 'DocumentChange<T>[]' is not assignable to parameter of type '{ isEqual: (t: DocumentChange<T>) => boolean; }[]'.
npm ERR! Type 'DocumentChange<T>' is not assignable to type '{ isEqual: (t: DocumentChange<T>) => boolean; }'.
npm ERR! Types of property 'isEqual' are incompatible.
npm ERR! Type '(other: DocumentChange<T>) => boolean' is not assignable to type '(t: DocumentChange<T>) => boolean'.
npm ERR! Types of parameters 'other' and 't' are incompatible.
npm ERR! Type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/document-change").DocumentChange<T>' is not assignable to type 'FirebaseFirestore.DocumentChange<T>'.
npm ERR! The types of 'doc.ref' are incompatible between these types.
npm ERR! Property 'getCollections' is missing in type 'DocumentReference<T>' but required in type 'DocumentReference'.
npm ERR!
npm ERR! 960 isArrayEqual(this.docChanges(), other.docChanges())
npm ERR! ~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:569:5
npm ERR! 569 getCollections() : Promise<CollectionReference[]>;
npm ERR! ~~~~~~~~~~~~~~
npm ERR! 'getCollections' is declared here.
npm ERR!
npm ERR! dev/src/reference.ts:966:20 - error TS2345: Argument of type 'DocumentChange<T>[]' is not assignable to parameter of type '{ isEqual: (t: DocumentChange<T>) => boolean; }[]'.
npm ERR!
npm ERR! 966 isArrayEqual(this.docChanges(), other.docChanges()) &&
npm ERR! ~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1147:59 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1147 export class Query<T = firestore.DocumentData> implements firestore.Query<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1267:41 - error TS2367: This condition will always return 'false' since the types '"<" | "<=" | "==" | ">=" | ">"' and '"array-contains-any"' have no overlap.
npm ERR!
npm ERR! 1267 if (opStr === 'array-contains' || opStr === 'array-contains-any') {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1274:11 - error TS2367: This condition will always return 'false' since the types '"<" | "<=" | "==" | ">=" | ">"' and '"in"' have no overlap.
npm ERR!
npm ERR! 1274 if (opStr === 'in' || opStr === 'not-in') {
npm ERR! ~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1274:29 - error TS2367: This condition will always return 'false' since the types '"<" | "<=" | "==" | ">=" | ">"' and '"not-in"' have no overlap.
npm ERR!
npm ERR! 1274 if (opStr === 'in' || opStr === 'not-in') {
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1484:18 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1484 isEqual(other: firestore.Query<T>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1695:7 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1695 firestore.DocumentSnapshot<unknown> | unknown
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1739:7 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1739 firestore.DocumentSnapshot<unknown> | unknown
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1782:7 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1782 firestore.DocumentSnapshot<unknown> | unknown
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:1825:7 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1825 firestore.DocumentSnapshot<unknown> | unknown
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:2236:24 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 2236 onNext: (snapshot: firestore.QuerySnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:2371:14 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 2371 implements firestore.CollectionReference<T> {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/reference.ts:2591:18 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 2591 isEqual(other: firestore.CollectionReference<T>): boolean {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:88:3 - error TS2416: Property 'get' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(query: Query<T>): Promise<QuerySnapshot<T>>; <T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>; }' is not assignable to type '{ (query: Query): Promise<QuerySnapshot>; (documentRef: DocumentReference): Promise<DocumentSnapshot>; }'.
npm ERR! Types of parameters 'query' and 'query' are incompatible.
npm ERR! Type 'Query' is missing the following properties from type 'Query<any>': _serializer, _allowUndefined, _firestore, _queryOptions, and 12 more.
npm ERR!
npm ERR! 88 get<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:97:3 - error TS2416: Property 'get' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(query: Query<T>): Promise<QuerySnapshot<T>>; <T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>; }' is not assignable to type '{ (query: Query): Promise<QuerySnapshot>; (documentRef: DocumentReference): Promise<DocumentSnapshot>; }'.
npm ERR!
npm ERR! 97 get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:120:3 - error TS2416: Property 'get' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(query: Query<T>): Promise<QuerySnapshot<T>>; <T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>; }' is not assignable to type '{ (query: Query): Promise<QuerySnapshot>; (documentRef: DocumentReference): Promise<DocumentSnapshot>; }'.
npm ERR!
npm ERR! 120 get<T>(
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:128:7 - error TS2322: Type 'Promise<DocumentSnapshot<unknown> | DocumentSnapshot<T> | QuerySnapshot<T>>' is not assignable to type 'Promise<DocumentSnapshot<T> | QuerySnapshot<T>>'.
npm ERR! Type 'DocumentSnapshot<unknown> | DocumentSnapshot<T> | QuerySnapshot<T>' is not assignable to type 'DocumentSnapshot<T> | QuerySnapshot<T>'.
npm ERR! Type 'DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<T> | QuerySnapshot<T>'.
npm ERR! Type 'DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<T>'.
npm ERR! The types returned by '_ref._converter.fromFirestore(...)' are incompatible between these types.
npm ERR! Type 'unknown' is not assignable to type 'T'.
npm ERR!
npm ERR! 128 return this._firestore
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 129 .getAll_(
npm ERR! ~~~~~~~~~~~~~~~~~
npm ERR! ...
npm ERR! 136 return Promise.resolve(res[0]);
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 137 });
npm ERR! ~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:175:3 - error TS2416: Property 'getAll' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '<T>(...documentRefsOrReadOptions: any[]) => Promise<DocumentSnapshot<T>[]>' is not assignable to type '(...documentRefsOrReadOptions: (DocumentReference | ReadOptions)[]) => Promise<DocumentSnapshot[]>'.
npm ERR! Type 'Promise<DocumentSnapshot<DocumentData>[]>' is not assignable to type 'Promise<DocumentSnapshot[]>'.
npm ERR! Type 'DocumentSnapshot<DocumentData>[]' is not assignable to type 'DocumentSnapshot[]'.
npm ERR! Type 'DocumentSnapshot<DocumentData>' is not assignable to type 'DocumentSnapshot'.
npm ERR! Types of property 'ref' are incompatible.
npm ERR! Type 'DocumentReference<DocumentData>' is not assignable to type 'DocumentReference'.
npm ERR!
npm ERR! 175 getAll<T>(
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:177:7 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 177 firestore.DocumentReference<T> | firestore.ReadOptions
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:223:3 - error TS2416: Property 'create' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '<T>(documentRef: any, data: T) => Transaction' is not assignable to type '(documentRef: DocumentReference, data: DocumentData) => Transaction'.
npm ERR! Call signature return types 'Transaction' and 'Transaction' are incompatible.
npm ERR! The types of 'get' are incompatible between these types.
npm ERR! Type '{ <T>(query: Query<T>): Promise<QuerySnapshot<T>>; <T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>; }' is not assignable to type '{ (query: Query): Promise<QuerySnapshot>; (documentRef: DocumentReference): Promise<DocumentSnapshot>; }'.
npm ERR! Types of parameters 'query' and 'query' are incompatible.
npm ERR! Type 'Query' is not assignable to type 'Query<any>'.
npm ERR!
npm ERR! 223 create<T>(documentRef: firestore.DocumentReference<T>, data: T): Transaction {
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:223:26 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 223 create<T>(documentRef: firestore.DocumentReference<T>, data: T): Transaction {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:228:3 - error TS2416: Property 'set' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(documentRef: any, data: Partial<T>, options: SetOptions): Transaction; <T>(documentRef: any, data: T): Transaction; }' is not assignable to type '(documentRef: DocumentReference, data: DocumentData, options?: SetOptions | undefined) => Transaction'.
npm ERR! Type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/transaction").Transaction' is not assignable to type 'FirebaseFirestore.Transaction'.
npm ERR!
npm ERR! 228 set<T>(
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:229:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 229 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:233:3 - error TS2416: Property 'set' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(documentRef: any, data: Partial<T>, options: SetOptions): Transaction; <T>(documentRef: any, data: T): Transaction; }' is not assignable to type '(documentRef: DocumentReference, data: DocumentData, options?: SetOptions | undefined) => Transaction'.
npm ERR!
npm ERR! 233 set<T>(documentRef: firestore.DocumentReference<T>, data: T): Transaction;
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:233:23 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 233 set<T>(documentRef: firestore.DocumentReference<T>, data: T): Transaction;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:261:3 - error TS2416: Property 'set' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '{ <T>(documentRef: any, data: Partial<T>, options: SetOptions): Transaction; <T>(documentRef: any, data: T): Transaction; }' is not assignable to type '(documentRef: DocumentReference, data: DocumentData, options?: SetOptions | undefined) => Transaction'.
npm ERR!
npm ERR! 261 set<T>(
npm ERR! ~~~
npm ERR!
npm ERR! dev/src/transaction.ts:262:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 262 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:308:3 - error TS2416: Property 'update' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '<T>(documentRef: any, dataOrField: string | UpdateData | FieldPath, ...preconditionOrValues: unknown[]) => Transaction' is not assignable to type '{ (documentRef: DocumentReference, data: UpdateData, precondition?: Precondition | undefined): Transaction; (documentRef: DocumentReference, field: string | FieldPath, value: any, ...fieldsOrPrecondition: any[]): Transaction; }'.
npm ERR! Type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/transaction").Transaction' is not assignable to type 'FirebaseFirestore.Transaction'.
npm ERR!
npm ERR! 308 update<T>(
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:309:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 309 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:343:3 - error TS2416: Property 'delete' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.
npm ERR! Type '<T>(documentRef: DocumentReference<T>, precondition?: Precondition | undefined) => this' is not assignable to type '(documentRef: DocumentReference, precondition?: Precondition | undefined) => Transaction'.
npm ERR! Types of parameters 'documentRef' and 'documentRef' are incompatible.
npm ERR! Type 'DocumentReference' is missing the following properties from type 'DocumentReference<unknown>': _firestore, _path, _converter, formattedName, and 3 more.
npm ERR!
npm ERR! 343 delete<T>(
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/src/transaction.ts:502:5 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 502 firestore.DocumentReference<T> | firestore.ReadOptions
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/types.ts:119:3 - error TS2322: Type '(snapshot: QueryDocumentSnapshot<DocumentData>) => DocumentData' is not assignable to type '(snapshot: QueryDocumentSnapshot) => DocumentData'.
npm ERR! Types of parameters 'snapshot' and 'snapshot' are incompatible.
npm ERR! Type 'QueryDocumentSnapshot' is missing the following properties from type 'QueryDocumentSnapshot<DocumentData>': _ref, _serializer, _readTime, _createTime, and 4 more.
npm ERR!
npm ERR! 119 fromFirestore(snapshot: QueryDocumentSnapshot): DocumentData {
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:98:5
npm ERR! 98 fromFirestore(snapshot: QueryDocumentSnapshot): T;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! The expected type comes from property 'fromFirestore' which is declared here on type 'FirestoreDataConverter<DocumentData>'
npm ERR!
npm ERR! dev/src/write-batch.ts:183:26 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 183 create<T>(documentRef: firestore.DocumentReference<T>, data: T): WriteBatch {
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:239:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 239 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:263:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 263 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:267:23 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 267 set<T>(documentRef: firestore.DocumentReference<T>, data: T): WriteBatch;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:269:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 269 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:303:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 303 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/src/write-batch.ts:400:18 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 400 documentRef: firestore.DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:152:54 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 152 const ref1 = randomCol.doc('doc1').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:153:54 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 153 const ref2 = randomCol.doc('doc2').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:158:12 - error TS2571: Object is of type 'unknown'.
npm ERR!
npm ERR! 158 expect(docs[0].data()!.toString()).to.deep.equal('post1, by author1');
npm ERR! ~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:159:12 - error TS2571: Object is of type 'unknown'.
npm ERR!
npm ERR! 159 expect(docs[1].data()!.toString()).to.deep.equal('post2, by author2');
npm ERR! ~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:291:7 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionGroup<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionGroup<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 291 postConverter
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:390:22 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 390 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:1186:44 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 1186 const resultsDeferred = new Deferred<QuerySnapshot<Post>>();
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1187:54 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 1187 const ref = randomCol.doc('doc').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:1190:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): Query<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): Query<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 1190 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:1191:21 - error TS7006: Parameter 'snapshot' implicitly has an 'any' type.
npm ERR!
npm ERR! 1191 .onSnapshot(snapshot => {
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1212:22 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 1212 .withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:1362:44 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1362 let res = await randomCol.where('zip', '!=', 98101).get();
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1373:40 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1373 res = await randomCol.where('zip', '!=', NaN).get();
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1384:40 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1384 res = await randomCol.where('zip', '!=', null).get();
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1400:38 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1400 .where(FieldPath.documentId(), '!=', refs[0].id)
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1414:44 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1414 let res = await randomCol.where('zip', 'not-in', [98101, 98103]).get();
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1423:40 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1423 res = await randomCol.where('zip', 'not-in', [NaN]).get();
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1434:40 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1434 res = await randomCol.where('zip', 'not-in', [null]).get();
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1441:38 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1441 .where(FieldPath.documentId(), 'not-in', [refs[0].id, refs[1]])
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1455:46 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1455 const res = await randomCol.where('zip', 'in', [98101, 98103]).get();
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1462:38 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1462 .where(FieldPath.documentId(), 'in', [refs[0].id, refs[1]])
npm ERR! ~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1479:23 - error TS2345: Argument of type '"array-contains-any"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1479 .where('array', 'array-contains-any', [42, 43])
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1511:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR! The types of 'query.firestore' are incompatible between these types.
npm ERR! Property 'getCollections' is missing in type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/index").Firestore' but required in type 'FirebaseFirestore.Firestore'.
npm ERR!
npm ERR! 1511 expectDocs(res, {foo: 'a'}, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:165:5
npm ERR! 165 getCollections() : Promise<CollectionReference[]>;
npm ERR! ~~~~~~~~~~~~~~
npm ERR! 'getCollections' is declared here.
npm ERR!
npm ERR! dev/system-test/firestore.ts:1514:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1514 expectDocs(res, {foo: 'b'}, {foo: 'a'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1534:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1534 expectDocs(res, {foo: 'a'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1540:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1540 expectDocs(res, {doc: 2}, {doc: 3});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1551:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1551 expectDocs(res, {doc: 2}, {doc: 3}, {doc: 4});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1557:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1557 expectDocs(res, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1624:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1624 expectDocs(res, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1630:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1630 expectDocs(res, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1636:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1636 expectDocs(res, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1642:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1642 expectDocs(res, {foo: 'a'}, {foo: 'b'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:1648:16 - error TS2345: Argument of type 'QuerySnapshot<DocumentData>' is not assignable to parameter of type 'QuerySnapshot'.
npm ERR!
npm ERR! 1648 expectDocs(res, {foo: 'a'});
npm ERR! ~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:2184:54 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2184 const ref1 = randomCol.doc('doc1').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:2185:54 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2185 const ref2 = randomCol.doc('doc2').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:2193:12 - error TS2571: Object is of type 'unknown'.
npm ERR!
npm ERR! 2193 expect(docs[0].data()!.toString()).to.equal('post1, by author1');
npm ERR! ~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:2194:12 - error TS2571: Object is of type 'unknown'.
npm ERR!
npm ERR! 2194 expect(docs[1].data()!.toString()).to.equal('post2, by author2');
npm ERR! ~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/system-test/firestore.ts:2198:53 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2198 const ref = randomCol.doc('doc1').withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:2385:52 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2385 const ref = randomCol.doc('doc').withConverter(postConverterMerge);
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/system-test/firestore.ts:2496:5 - error TS2322: Type 'Promise<QuerySnapshot | QuerySnapshot<DocumentData>>' is not assignable to type 'Promise<QuerySnapshot>'.
npm ERR! Type 'QuerySnapshot | QuerySnapshot<DocumentData>' is not assignable to type 'QuerySnapshot'.
npm ERR! Type 'QuerySnapshot<DocumentData>' is not assignable to type 'QuerySnapshot'.
npm ERR!
npm ERR! 2496 querySnapshot = Promise.all([
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/test/collection.ts:210:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR! Types of property 'fromFirestore' are incompatible.
npm ERR! Type '(snapshot: QueryDocumentSnapshot<DocumentData>) => Post' is not assignable to type '(snapshot: QueryDocumentSnapshot) => Post'.
npm ERR! Types of parameters 'snapshot' and 'snapshot' are incompatible.
npm ERR! Type 'QueryDocumentSnapshot' is not assignable to type 'QueryDocumentSnapshot<DocumentData>'.
npm ERR!
npm ERR! 210 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/collection.ts:271:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 271 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/collection.ts:284:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 284 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/collection.ts:295:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 295 .withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/document.ts:1259:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR! Types of property 'fromFirestore' are incompatible.
npm ERR! Type '(snapshot: QueryDocumentSnapshot<DocumentData>) => Post' is not assignable to type '(snapshot: QueryDocumentSnapshot) => Post'.
npm ERR! Types of parameters 'snapshot' and 'snapshot' are incompatible.
npm ERR! Type 'QueryDocumentSnapshot' is not assignable to type 'QueryDocumentSnapshot<DocumentData>'.
npm ERR!
npm ERR! 1259 .withConverter(postConverterMerge)
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/document.ts:1285:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 1285 .withConverter(postConverterMerge)
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/document.ts:2188:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2188 .withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/document.ts:2203:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 2203 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/index.ts:978:24 - error TS2345: Argument of type 'DocumentSnapshot<unknown>[]' is not assignable to parameter of type 'DocumentSnapshot<DocumentData>[]'.
npm ERR! Type 'DocumentSnapshot<unknown>' is not assignable to type 'DocumentSnapshot<DocumentData>'.
npm ERR! The types returned by '_ref._converter.fromFirestore(...)' are incompatible between these types.
npm ERR! Type 'unknown' is not assignable to type 'DocumentData'.
npm ERR!
npm ERR! 978 resultEquals(result, found('documentId'));
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/test/index.ts:1178:24 - error TS2345: Argument of type 'DocumentSnapshot<unknown>[]' is not assignable to parameter of type 'DocumentSnapshot<DocumentData>[]'.
npm ERR!
npm ERR! 1178 resultEquals(result, found('exists'), missing('missing'));
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/test/index.ts:1206:13 - error TS2345: Argument of type 'DocumentSnapshot<unknown>[]' is not assignable to parameter of type 'DocumentSnapshot<DocumentData>[]'.
npm ERR!
npm ERR! 1206 result,
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/test/index.ts:1233:24 - error TS2345: Argument of type 'DocumentSnapshot<unknown>[]' is not assignable to parameter of type 'DocumentSnapshot<DocumentData>[]'.
npm ERR!
npm ERR! 1233 resultEquals(result, found('a'), found('a'), found('b'), found('a'));
npm ERR! ~~~~~~
npm ERR!
npm ERR! dev/test/partition-query.ts:124:42 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/collection-group").CollectionGroup<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.CollectionGroup<FirebaseFirestore.DocumentData>'.
npm ERR!
npm ERR! 124 const result = await getPartitions(query, desiredPartitionsCount);
npm ERR! ~~~~~
npm ERR!
npm ERR! dev/test/partition-query.ts:138:42 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/collection-group").CollectionGroup<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.CollectionGroup<FirebaseFirestore.DocumentData>'.
npm ERR!
npm ERR! 138 const result = await getPartitions(query, desiredPartitionsCount);
npm ERR! ~~~~~
npm ERR!
npm ERR! dev/test/partition-query.ts:148:35 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/collection-group").CollectionGroup<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.CollectionGroup<FirebaseFirestore.DocumentData>'.
npm ERR! Types of property 'withConverter' are incompatible.
npm ERR! Type '{ (converter: null): CollectionGroup<DocumentData>; <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; }' is not assignable to type '{ <U>(converter: FirestoreDataConverter<U>): CollectionGroup<U>; (converter: null): CollectionGroup<DocumentData>; }'.
npm ERR! Types of parameters 'converter' and 'converter' are incompatible.
npm ERR! Type 'FirestoreDataConverter<any>' is not assignable to type 'null'.
npm ERR!
npm ERR! 148 return expect(getPartitions(query, 0)).to.eventually.be.rejectedWith(
npm ERR! ~~~~~
npm ERR!
npm ERR! dev/test/partition-query.ts:210:46 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/collection-group").CollectionGroup<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.CollectionGroup<FirebaseFirestore.DocumentData>'.
npm ERR!
npm ERR! 210 const partitions = await getPartitions(query, desiredPartitionsCount);
npm ERR! ~~~~~
npm ERR!
npm ERR! dev/test/partition-query.ts:248:42 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/collection-group").CollectionGroup<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.CollectionGroup<FirebaseFirestore.DocumentData>'.
npm ERR!
npm ERR! 248 const result = await getPartitions(query, desiredPartitionsCount);
npm ERR! ~~~~~
npm ERR!
npm ERR! dev/test/query.ts:700:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): Query<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): Query<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 700 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/query.ts:719:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 719 .withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/query.ts:740:24 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): CollectionReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): CollectionReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 740 .withConverter(postConverter)
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/query.ts:840:36 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 840 query = query.where('fooIn', 'in', ['barArray']);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:841:45 - error TS2345: Argument of type '"array-contains-any"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 841 query = query.where('fooContainsAny', 'array-contains-any', ['barArray']);
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:842:42 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 842 query = query.where('fooNotEqual', '!=', 'barEqualsLong');
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:843:39 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 843 query = query.where('fooNotIn', 'not-in', ['barArray']);
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:947:62 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 947 const query = collection.where(FieldPath.documentId(), 'in', [
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:984:23 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 984 .where('foo', 'in', ['bar'])
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:994:43 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 994 query.where(FieldPath.documentId(), 'in', ['foo', 42]);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:1000:43 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1000 query.where(FieldPath.documentId(), 'in', 42);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:1006:43 - error TS2345: Argument of type '"in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1006 query.where(FieldPath.documentId(), 'in', []);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:1012:43 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1012 query.where(FieldPath.documentId(), 'not-in', ['foo', 42]);
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:1018:43 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1018 query.where(FieldPath.documentId(), 'not-in', 42);
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:1024:43 - error TS2345: Argument of type '"not-in"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1024 query.where(FieldPath.documentId(), 'not-in', []);
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:1040:43 - error TS2345: Argument of type '"array-contains-any"' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1040 query.where(FieldPath.documentId(), 'array-contains-any', query.doc());
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/test/query.ts:1156:34 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1156 query = query.where('foo', '!=', NaN);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/query.ts:1157:34 - error TS2345: Argument of type '"!="' is not assignable to parameter of type 'WhereFilterOp'.
npm ERR!
npm ERR! 1157 query = query.where('bar', '!=', null);
npm ERR! ~~~~
npm ERR!
npm ERR! dev/test/transaction.ts:906:46 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Partial<Post>, options?: SetOptions | undefined): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 906 const postRef = docRef.withConverter(postConverterMerge);
npm ERR! ~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/transaction.ts:934:46 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR!
npm ERR! 934 const postRef = docRef.withConverter(postConverter);
npm ERR! ~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! dev/test/watch.ts:2108:46 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/document-change").DocumentChange<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.DocumentChange<FirebaseFirestore.DocumentData>'.
npm ERR! Types of property 'doc' are incompatible.
npm ERR! Type 'QueryDocumentSnapshot<DocumentData>' is not assignable to type 'QueryDocumentSnapshot'.
npm ERR!
npm ERR! 2108 snapshot.docChanges()[0].isEqual(firstSnapshot.docChanges()[0])
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/test/watch.ts:2118:48 - error TS2345: Argument of type 'import("/Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27/dev/src/document-change").DocumentChange<FirebaseFirestore.DocumentData>' is not assignable to parameter of type 'FirebaseFirestore.DocumentChange<FirebaseFirestore.DocumentData>'.
npm ERR!
npm ERR! 2118 snapshot.docChanges()[0].isEqual(firstSnapshot.docChanges()[0])
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! dev/test/write-batch.ts:93:56 - error TS2769: No overload matches this call.
npm ERR! Overload 1 of 2, '(converter: null): DocumentReference<DocumentData>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'null'.
npm ERR! Overload 2 of 2, '(converter: FirestoreDataConverter<Post>): DocumentReference<Post>', gave the following error.
npm ERR! Argument of type '{ toFirestore(post: Post): DocumentData; fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>): Post; }' is not assignable to parameter of type 'FirestoreDataConverter<Post>'.
npm ERR! Types of property 'fromFirestore' are incompatible.
npm ERR! Type '(snapshot: QueryDocumentSnapshot<DocumentData>) => Post' is not assignable to type '(snapshot: QueryDocumentSnapshot) => Post'.
npm ERR! Types of parameters 'snapshot' and 'snapshot' are incompatible.
npm ERR! Type 'QueryDocumentSnapshot' is not assignable to type 'QueryDocumentSnapshot<DocumentData>'.
npm ERR!
npm ERR! 93 const ref = firestore.doc('sub/doc').withConverter(converter);
npm ERR! ~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! types/firestore.d.ts:23:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentData, UpdateData, Firestore, GeoPoint, Transaction, WriteBatch, WriteResult, DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, OrderByDirection, WhereFilterOp, Query, QuerySnapshot, DocumentChangeType, CollectionReference, FieldValue, FieldPath, Timestamp, v1beta1, v1, FirebaseFirestore
npm ERR!
npm ERR! 23 declare namespace FirebaseFirestore {
npm ERR! ~~~~~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:23:1
npm ERR! 23 declare namespace FirebaseFirestore {
npm ERR! ~~~~~~~
npm ERR! Conflicts are in this file.
npm ERR!
npm ERR! types/firestore.d.ts:166:5 - error TS2374: Duplicate string index signature.
npm ERR!
npm ERR! 166 [key: string]: any; // Accept other properties, such as GRPC settings.
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:201:41 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 201 collection(collectionPath: string): CollectionReference<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:210:32 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 210 doc(documentPath: string): DocumentReference<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:239:9 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 239 DocumentReference<DocumentData> | ReadOptions
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:241:22 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 241 ): Promise<Array<DocumentSnapshot<DocumentData>>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:256:38 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 256 listCollections(): Promise<Array<CollectionReference<DocumentData>>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:366:19 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 366 get<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:366:38 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 366 get<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:375:25 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 375 get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:375:56 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 375 get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:392:43 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 392 ...documentRefsOrReadOptions: Array<DocumentReference<T> | ReadOptions>
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:393:22 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 393 ): Promise<Array<DocumentSnapshot<T>>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:404:28 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 404 create<T>(documentRef: DocumentReference<T>, data: T): Transaction;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:417:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 417 documentRef: DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:421:25 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 421 set<T>(documentRef: DocumentReference<T>, data: T): Transaction;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:438:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 438 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:463:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 463 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:477:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 477 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:502:28 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 502 create<T>(documentRef: DocumentReference<T>, data: T): Promise<WriteResult>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:519:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 519 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:545:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 545 documentRef: DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:549:25 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 549 set<T>(documentRef: DocumentReference<T>, data: T): Promise<WriteResult>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:575:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 575 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:605:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 605 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:620:22 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 620 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:713:27 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 713 readonly documentRef: DocumentReference<any>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:745:28 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 745 create<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:758:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 758 documentRef: DocumentReference<T>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:762:25 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 762 set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:779:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 779 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:803:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 803 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:817:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 817 documentRef: DocumentReference<any>,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:927:22 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 927 readonly parent: CollectionReference<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:942:41 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 942 collection(collectionPath: string): CollectionReference<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:949:38 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 949 listCollections(): Promise<Array<CollectionReference<DocumentData>>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1023:20 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1023 get(): Promise<DocumentSnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1036:26 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1036 onNext: (snapshot: DocumentSnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1046:20 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1046 isEqual(other: DocumentReference<T>): boolean;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1061:8 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1061 ): DocumentReference<U>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1062:37 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1062 withConverter(converter: null): DocumentReference<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1081:19 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1081 readonly ref: DocumentReference<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1129:20 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1129 isEqual(other: DocumentSnapshot<T>): boolean;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1221:8 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1221 ): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1238:8 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1238 ): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1250:27 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1250 limit(limit: number): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1265:33 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1265 limitToLast(limit: number): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1276:29 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1276 offset(offset: number): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1293:47 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1293 select(...field: (string | FieldPath)[]): Query<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1304:23 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1304 startAt(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1304:47 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1304 startAt(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1315:37 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1315 startAt(...fieldValues: any[]): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1326:26 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1326 startAfter(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1326:50 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1326 startAfter(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1337:40 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1337 startAfter(...fieldValues: any[]): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1348:25 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1348 endBefore(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1348:49 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1348 endBefore(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1359:39 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1359 endBefore(...fieldValues: any[]): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1370:21 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1370 endAt(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1370:45 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1370 endAt(snapshot: DocumentSnapshot<any>): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1381:35 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1381 endAt(...fieldValues: any[]): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1388:20 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 1388 get(): Promise<QuerySnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1408:26 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 1408 onNext: (snapshot: QuerySnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1418:20 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1418 isEqual(other: Query<T>): boolean;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1430:61 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1430 withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1431:37 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1431 withConverter(converter: null): Query<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1448:21 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1448 readonly query: Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1451:26 - error TS2315: Type 'QueryDocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1451 readonly docs: Array<QueryDocumentSnapshot<T>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1477:26 - error TS2315: Type 'QueryDocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1477 callback: (result: QueryDocumentSnapshot<T>) => void,
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1488:20 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 1488 isEqual(other: QuerySnapshot<T>): boolean;
npm ERR! ~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1505:19 - error TS2315: Type 'QueryDocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1505 readonly doc: QueryDocumentSnapshot<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1547:22 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1547 readonly parent: DocumentReference<DocumentData> | null;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1567:36 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1567 listDocuments(): Promise<Array<DocumentReference<T>>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1576:12 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1576 doc(): DocumentReference<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1585:32 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1585 doc(documentPath: string): DocumentReference<T>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1595:27 - error TS2315: Type 'DocumentReference' is not generic.
npm ERR!
npm ERR! 1595 add(data: T): Promise<DocumentReference<T>>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1603:20 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 1603 isEqual(other: CollectionReference<T>): boolean;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1617:8 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 1617 ): CollectionReference<U>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1618:37 - error TS2315: Type 'CollectionReference' is not generic.
npm ERR!
npm ERR! 1618 withConverter(converter: null): CollectionReference<DocumentData>;
npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1728:16 - error TS2315: Type 'Query' is not generic.
npm ERR!
npm ERR! 1728 toQuery(): Query<T>;
npm ERR! ~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1946:30 - error TS2315: Type 'DocumentSnapshot' is not generic.
npm ERR!
npm ERR! 1946 add<T>(documentSnapshot: DocumentSnapshot<T>): BundleBuilder;
npm ERR! ~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:1956:46 - error TS2315: Type 'QuerySnapshot' is not generic.
npm ERR!
npm ERR! 1956 add<T>(queryName: string, querySnapshot: QuerySnapshot<T>): BundleBuilder;
npm ERR! ~~~~~~~~~~~~~~~~
npm ERR!
npm ERR! ../../../../node_modules/@google-cloud/firestore/types/firestore.d.ts:23:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentData, UpdateData, Firestore, GeoPoint, Transaction, WriteBatch, WriteResult, DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, OrderByDirection, WhereFilterOp, Query, QuerySnapshot, DocumentChangeType, CollectionReference, FieldValue, FieldPath, Timestamp, v1beta1, v1, FirebaseFirestore
npm ERR!
npm ERR! 23 declare namespace FirebaseFirestore {
npm ERR! ~~~~~~~
npm ERR!
npm ERR! types/firestore.d.ts:23:1
npm ERR! 23 declare namespace FirebaseFirestore {
npm ERR! ~~~~~~~
npm ERR! Conflicts are in this file.
npm ERR!
npm ERR!
npm ERR! Found 244 errors.
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm ERR! npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/ayyappa/.npm/_cacache/tmp/git-clone-7fb5ea27
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c npm run compile
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/ayyappa/.npm/_logs/2021-04-20T07_07_59_993Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ayyappa/.npm/_logs/2021-04-20T07_08_02_932Z-debug.log
Ayyappas-iMac:testing ayyappa$
@manwithsteelnerves I was able to install this with node v12.15.0, npm v6.13.4, and tsc v.4.2.3.
If you're already in a repo, have you tried running removing your package-lock.json
file and your node_modules
directory, and running the command again?
@thebrianchen The above errors are from a fresh folder.
mkdir test
npm init
npm install https://github.com/manwithsteelnerves/nodejs-firestore-rest.git
Ayyappas-iMac:test ayyappa$ tsc -v
Version 4.2.3
Ayyappas-iMac:test ayyappa$ npm -v
7.10.0
Ayyappas-iMac:test ayyappa$ node -v
v12.16.1
I am able to compile your clone of this repo.
$ tsc -v
Version 3.7.4
$ npm -v
6.14.4
$ node -v
v14.3.0
I am intrigued by the name of your repo. We are considering adding a REST client to this Repo as well.
May ne i need to downgrade my npm and give a try.
Regarding REST api fallback, its some thing i(lots others as well) waited for 2 years long :(
Any timelines how fast it will be available. I'm in half way of development currently(done with the rest api models and currently converting the protos to rest models)
However, as you might be aware, the only reason for us to start on rest client is to have a library which is drop in replacement with rest fallback - to avoid cold starts. We are spending nearly $80 just for the min instaces currently which is a big burden for small teams like us.
I am able to compile your clone of this repo.
$ tsc -v Version 3.7.4 $ npm -v 6.14.4 $ node -v v14.3.0
I am intrigued by the name of your repo. We are considering adding a REST client to this Repo as well.
I tried downgrading npm to 6.14.4 and typescript to 3.7.4 Unfortunately, it's still the same way.
https://i.ibb.co/h22yy3x/Screen-Recording-2021-04-22-at-10-55-11-AM.gif
Is this something related to this by any chance? -
Can someone help on this? If i download the repo locally and run
npm run compile
It is working but not when installing from git.
Is there a difference in the output of npm list
? While we don't have a lock file, this is the only explanation I have for the difference in behavior you are observing.
Our CI and all other automated systems that use this repo install all dependencies from scratch and we have not seen any similar problems. I will ask internally if someone on our wider team has encountered anything like it.
FWIW, it looks like all your compile errors are for features we have introduced in the last year or two. I wonder if you have a really old version of our types cached somewhere.
FWIW, it looks like all your compile errors are for features we have introduced in the last year or two. I wonder if you have a really old version of our types cached somewhere.
Anyway i can igone the cache? Above shared gif has complete setup from scratch. But unfortunately its failing.
@manwithsteelnerves I am not sure how to disable the cache on your system. I am not sure if we can help you here further since this is likely an issue with your specific setup. I will leave this open for now to see if someone else has a suggestion (none of our maintainers do).
Thanks @schmidt-sebastian, I understand. For now I'm pushing to npm and using it as dependency. But I wanted to have a git link in dependency as I was looking for something like a drop-in replacement without any change in code (module name).
I'm done with the rest api integration, currently mocking grpc libraries to avoid the additional load time. May I know if your rest solution is in any particular branch or when it can be public?
Our goal is to only have minimal changes in this repro, and to push all major changes to google-gax.
@thebrianchen - Do you have any code changes that we could upload to a branch?
Would be looking forward for @thebrianchen updates.
Meanwhile, here is the progress so far! Pretty exciting numbers as i can totally ditch min instances costs :P and also a drop in replacement for existing one until we get one official!
@manwithsteelnerves We're currently working on adding a {fallback: 'rest'}
setting to the google-gax library that would support using the REST API. In its current state, some proto3 types aren't working, and we still have to figure out how to convert streamed APIs like runQuery
and batchGet
into the appropriate HTTP responses. Super awesome to hear that the REST implementation has the potential to decrease cold start times though!
The branch bc/rest-setting
in this repo has the one line change to enable the setting, if you're interested in checking it out. Because google.protobuf.Value
is one of the types that isn't supported yet, most calls will fail in its current state.
@thebrianchen Thanks for sharing. Just few points what i noticed as i went that approach already.
Grpc fallback was the first attemp i had but unfortunately once the data is received from node-fetch, it failed converting to response types(as Rest response returns json timestamp string instead of is protobufs ITimestamp).
Rather than the actual grpc connection, its the grpc module loading too much time taking. So make sure you offload the actual grpc loading when using fallback.
point 1, you guys can fix easily with update of generated response parsing code. I didn't find a way to do it on our end as it has some process which isn't exposed to public.
Point 2, i'm curious as it may need some significant changes in gax modules.
However, i love the way its going. Using grpc fallback is the best way to minimise the changes on this repo. So looking forward to watch the progress.
if anyway i can help, please do let me know. I will post in the fallback pull request thread and leave this thread opened for now until i avoid the problem.
@manwithsteelnerves If you are still having problems installing from GitHub, can you open a new issue? We are still working on the Rest client (to catch up with your work) and will share details publicly when we get closer.
I revisited the rest project again to fix few issues and publish. Unfortunately, still i can't install with git repo link. Will file a new issue soon as suggested. However, I started using npm for publishing so installing through git isn't a priority now but issue exists.
Finally finished REST version of firestore and see nice improvements when it comes to performance(Cold Starts). Would love to know your feedback. Steps to integrate:
1. npm install @bountyrush/firestore
2. Replace require('@google-cloud/firestore') with require('@bountyrush/firestore')
3. Have FIRESTORE_USE_REST_API = 'true' in your environment variables. (process.env.FIRESTORE_USE_REST_API should be set to 'true' for using in rest mode. If its not set, it just standard firestore with grpc connections)
I'm trying to install from github repository(forked) as I have some changes in the library. But unfortunatley, it fails. Are they any steps to make the build so that I can install from github repo?
1) Is this a client library issue or a product issue? Client Installation
Steps to reproduce
Thanks!