google / lovefield

Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.
https://google.github.io/lovefield/
Apache License 2.0
6.81k stars 366 forks source link

Typescript type definition file contains errors #152

Closed theblang closed 8 years ago

theblang commented 8 years ago

It looks like like the type definition file included in the npm package references ../es6-promise/es6-promise.d.ts, which does not exist. This is causing multiple errors throughout the definition file.

arthurhsu commented 8 years ago

I'll let Demetrios to decide whether this is a bug or not. But if you use DefinitelyTyped, you need to configure your tsd.json like https://github.com/google/lovefield/blob/master/demos/todo_typescript/tsd.json.

I believe our design is to have you get the type definition files from DefinitelyTyped's repo, in that case this design makes much more sense.

freshp86 commented 8 years ago

As Arthur said, the typescript definitions file is designed to be pulled from the DefinitelyTyped repository. For an example of how it is supposed to be used see todo_typescript demo (see tsd.json which pulls in the es6 dependency).

theblang commented 8 years ago

@arthurhsu @freshp86 Thanks so much! What I am doing now (using typings sincetsd was deprecated) is issuing the command typings install dt~lovefield --global --save. I read on the typings GitHub page that as of 1.x the repository has to be explicitly specified.

Also, on a side note, it looks like it works when I import * as lf from 'lf'!

arthurhsu commented 8 years ago

Closing the bug, filed https://github.com/google/lovefield/issues/156 for improvement on our demo.