Ошибка при получении доступа к экспортированной переменной в журнале Firebase Cloud Functions.
Ошибка:
ReferenceError: arrayMilestones не определено
importCase.ts
import {arrayMilestones} from './milestone';
function createMilestone(path : String){
let ref = db.collection('caseStatus').doc(path).collection("0").doc("0")
batch.set(ref ,arrayMilestones[0]);
batch.commit().then(function () {
console.log("doneeee")
});
}
milestone.ts
export var arrayMilestones = new Array()
const milestone0 = {
Milestone_Complete : false,
Milestone_Text : "We've started work on your case, please ensure you have reviewed the customer promise documentation",
Milestone_Title : "Case Accepted"
}
arrayMilestones.push(milestone0);