In TS 4.1.2, depending on how you import FieldValue (a firestore type), the class won't be defined. This affects only 4.1.2, as it seems to have been fixed in 4.2.
TypeScript Version: 4.1.2
Search Terms:
FieldValue undefined cannot
Code
const{FieldValue}=require('firebase-admin').firestore;console.info(FieldValue);Expected behavior:
No error is raised.
Actual behavior:
Cannot find name 'FieldValue'.
Note that the code correctly prints out:
Note also that the following code compiles without errors:
constadmin=require('firebase-admin');const{FieldValue}=admin.firestore;console.info(FieldValue);const{equal}=require('assert').strictconsole.info(equal);Playground Link:
Related Issues:
In TS 4.1.2, depending on how you import
FieldValue(a firestore type), the class won't be defined. This affects only 4.1.2, as it seems to have been fixed in 4.2.TypeScript Version: 4.1.2
Search Terms:
FieldValue undefined cannot
Code
Expected behavior:
No error is raised.
Actual behavior:
Note that the code correctly prints out:
Note also that the following code compiles without errors:
Playground Link:
Related Issues: