This is my code:
export const newPost = functions.firestore .document(\'post/{postId}/\') .onCreate((snap, context) => { const postData = snap.data()
A bit hacky, but a quick fix const postData: any = snap.data()
const postData: any = snap.data()