firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

Imports

Open jmc420 opened this issue 5 months ago • 2 comments

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?

jmc420 avatar Sep 18 '24 17:09 jmc420