Reputation: 95
I'd like to use google's closure library in my typescript based environment and I wonder if there is an existing type definition file for the library?
I know that there is a converter for the opposite (i.e. a converter from typescript to closure) here but I'd like to stay in typescript environment.
I'll probably start defining modules/methods that I use in a type definition file and update the file as I go but obviously it would be much better if there is an existing file already.
Upvotes: 5
Views: 1404
Reputation: 363
The Angular team has starting working on a tool to use the Closure Library JSDocs to create .d.ts files. It will still be up to you to use the tool to generate the type definitions.
https://github.com/angular/clutz
That library also include the Gents tool though, which converts goog.module and goog.require modules into TS-type modules. Seems like it would be worth it for someone to generate those types and contribute them to DefinitelyTyped for others to use.
EDIT: This library seems to be aimed at processing existing projects that have Closure's JSDoc-style annotations. Rather than being used on the Closure Library itself.
Upvotes: 1
Reputation: 517
See Github: Closure Library declaration files for TypeScript
Also, see this alternative to bolinfest's TypeScript fork: Github: typescript-closure-compiler
Upvotes: 3
Reputation: 276085
The definitive source for TypeScript definitions is https://github.com/borisyankov/DefinitelyTyped and considering its not there I suspect no one has gotten around to creating a type definition for Google Closure Library.
Upvotes: 3