How to use the @posva/vuefire-core.rtdbOptions.serialize function in @posva/vuefire-core

To help you get started, we’ve selected a few @posva/vuefire-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vuefire / packages / vuefire / src / rtdb.ts View on Github external
delete vm._firebaseSources[key]
  delete vm._firebaseUnbinds[key]
}

interface PluginOptions {
  bindName?: string
  unbindName?: string
  serialize?: RTDBOptions['serialize']
  reset?: RTDBOptions['reset']
  wait?: RTDBOptions['wait']
}

const defaultOptions: Readonly> = {
  bindName: '$rtdbBind',
  unbindName: '$rtdbUnbind',
  serialize: rtdbOptions.serialize,
  reset: rtdbOptions.reset,
  wait: rtdbOptions.wait,
}

declare module 'vue/types/vue' {
  // TODO: export types to allow custom function names
  interface Vue {
    $rtdbBind(
      name: string,
      reference: database.Reference | database.Query,
      options?: RTDBOptions
    ): Promise
    $rtdbUnbind: (name: string, reset?: RTDBOptions['reset']) => void
    $firebaseRefs: Readonly>
    _firebaseSources: Readonly>
    _firebaseUnbinds: Readonly>>