I am writing my first cloud function for Firebase and it requires the firebase-tools
module. I've installing it by adding it to my dependencies in the package.json file and running npm install
.
Then I tried to import it using import * as tools from 'firebase-tools';
, but I get this error:
Could not find a declaration file for module 'firebase-tools'. 'c:/Users/LENOVO/Nouveau dossier/functions/node_modules/firebase-tools/lib/index.js' implicitly has an 'any' type. Try
npm install @types/firebase-tools
if it exists or add a new declaration (.d.ts) file containing `declare module 'firebase-tools';
I also tried running npm install @types/firebase-tools
, but apparently it does not exist and I'm not sure what I should put in the (.d.ts) file for this module.
So I'm asking if there's another solution and if I need to create a (.d.ts) file what should I put there beside declare module 'firebase-tools
.