How to play with firebase-functions on Ionic 4?

Hi everyone,

I’m trying to show a local notification when there is a new firestore document on 1 collection, but i’m getting the error when i import into .ts this:

[ng] ERROR in node_modules/firebase-functions/lib/function-configuration.d.ts(4,64): error TS1005: ']' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(4,66): error TS1134: Variable declaration expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(4,153): error TS1005: ';' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,61): error TS1005: ']' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,63): error TS1134: Variable declaration expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,93): error TS1005: ';' expected.

My code on TS:

import * as functions from 'firebase-functions';
 initializeApp() {
    this.platform.ready().then(() => {

  activateNotifications() {
    var x = functions.firestore
      .onCreate((snap, context) => {
        const data =;
        const name =
        const title = data.title
        const message = `${name} uploaded ${title}, this one looks interesting :P`
          badge: 1,
          title: 'New OBject!!!',
          text: message,
          foreground: true,