Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Include condensed type definition file of Closure library #23

Open
jgiles opened this issue Jul 26, 2014 · 2 comments
Open

Include condensed type definition file of Closure library #23

jgiles opened this issue Jul 26, 2014 · 2 comments

Comments

@jgiles
Copy link
Contributor

jgiles commented Jul 26, 2014

We should include a JSON type definition file for the contents of the Closure library, and optionally load that definition according to a configuration setting.

The file could be rather large - it's possible we would need to settle for a subset, or break up the library into chunks.

There could be some trickiness to encoding all the type information we are interested in, since some aspects of the Closure type system (inheritance, unions, etc) are not explicitly supported as part of Tern.

@angelozerr
Copy link
Contributor

Just for your information, I'm developping several tern plugins,I use JSON type definition and I follow those rules :

  1. JSON type definition must be generated (from Javascript source by using YUIDoc, JSDoc, JSDuck, etc according the JS framework).
  2. the tern plugin is generated too to manage several version of the JSON type definition. I have a tern plugin per version.
  3. the generation is done with Grunt task and grunt template.

See for example https://github.com/angelozerr/tern.jsduck

Perhaps you could do the same thing to provide a closure plugin per version.

@jgiles
Copy link
Contributor Author

jgiles commented Jul 27, 2014

Hmm, I hadn't thought about generating defs/plugins for each version of Closure.

The Closure library is weird in that as far as I can tell there aren't explicit release versions - everyone just runs against HEAD all the time.

I will probably just include a current snapshot of the Closure library with each new release of tern-closure. Automating that through Grunt is a good idea though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants