I have a Firebase cloud function written in Typescript where I access a Google storage bucket.
If I get the bucket like this:
const storageBucket = admin.storage().bucket(storageBucketName);
VScode shows storageBucket has the type Bucket.
But if I try to use this as parameter on a function:
async function deleteOldBackup(storageBucket: Bucket) {
the type Bucket is underline in red as "cannot find Bucket".
If I try to import the Bucket type like this:
import { Bucket, File } from "@google-cloud/storage"
I get the error that Bucket from admin is different than the Bucket in my deleteOldBackup functions.
How can I get propper Typescript type for google storage in my firebase cloud functions?