4

I am trying to use promises with Firebase in Typescript using this definition file: https://www.nuget.org/packages/firebase.TypeScript.DefinitelyTyped/ But I am getting this error trying to use promises: Supplied parameters do not match any signature of call target. I guess it is because the definition files does not support Promises right ? I am just starting getting Typescript to know, can anyone tell me how I can change the definition file to support promises ?

jona jürgen
  • 1,789
  • 4
  • 22
  • 31
  • 1
    The current firebase typings don't appear to contain any Promises, probably best to wait for someone else to update them. – Vadim Macagon Jan 27 '16 at 13:07
  • It looks like the definitions file needs to be updated, yes. This would be a conversation best taken up with the author of the package (too bad it's not on GitHub or somewhere with an issue tracker). – Kato Jan 27 '16 at 15:46

1 Answers1

0

At the time of writing this, definition file for Firebase has supported Promise: firebase.d.ts

However, you will still need to either install es6-promise package, or configure tsc for ES6. More detail can be found at other SO question: How to use Typescript with native ES6 Promises

Community
  • 1
  • 1
bizi
  • 3,398
  • 2
  • 27
  • 28
  • If I do this: typings install --global es6-promise I get this error: Attempted to compile "es6-promise" as a global module, but it looks like an external module. You'll need to remove the global option to continue. – jona jürgen Jun 26 '16 at 09:27