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.
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.
See Github: Closure Library declaration files for TypeScript
Also, see this alternative to bolinfest's TypeScript fork: Github: typescript-closure-compiler
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With