firebase-functions
firebase-functions copied to clipboard
Imports
Related issues
[REQUIRED] Version info
node: v22.6.0
firebase-functions: 6.0.1
firebase-tools: 13.17.9
firebase-admin: 12.5.0
In firebase-functions 3.13.2 I was able to import using typescript thus:
import * as functions from 'firebase-functions'; import { UserRecord } from 'firebase-functions/lib/providers/auth';
These import statements do not work with firebase-functions 6.0.1
I get these errors:
error TS2307: Cannot find module 'firebase-functions' or its corresponding type declarations.
import * as functions from 'firebase-functions';
error TS2307: Cannot find module 'firebase-functions/lib/providers/auth' or its corresponding type declarations.
import { UserRecord } from 'firebase-functions/lib/providers/auth';
There are examples using require e.g. const functions = require("firebase-functions/v1");
Is it possible to use import with firebase-functions 6.0.1?
How do I import the type definition of UserRecord?