Closed freshp86 closed 9 years ago
Maybe worth looking at https://github.com/fivetran/typescript-closure-tools, which converts Closure style JSDoc to Typescript externs. There is also a live page we could try to see if this works well at http://fivetran.github.io/typescript-closure-tools/.
Typescript definitions have been added at https://github.com/google/lovefield/commit/2af8c8079b042942f5cbce77100d5b48ed85cf60. We are still lacking an automated mechanism to do this, but given that our public API odes not change that often, not sure if investigating an automated solution is worth it.
Still keeping this bug open to track what is needed to get Lovefield's definitions to https://github.com/borisyankov/DefinitelyTyped repository.
FYI, sent out pull request, https://github.com/borisyankov/DefinitelyTyped/pull/4558.
Lovefield TypeScript definitions can now be fetched using the tsd tool (https://github.com/DefinitelyTyped/tsd) as follows,
tsd install lovefield --save
I will be updating the example at https://github.com/google/lovefield/blob/master/demos/todo_typescript/gulpfile.js shortly, and then will close this issue.
Need a mechanism to automatically generate a d.ts file from the source code. The generated file should be hosted in our dist/ folder, but probably also a good idea to put it in https://github.com/borisyankov/DefinitelyTyped repository.
Benefit of this would be that TypeScript users can use Lovefield library without forfeiting type checking.