On Mon, Oct 22, 2012 at 10:05 AM, Andrew Grieve <agri...@chromium.org>wrote:
> I'm well accustomed to writing typed JS from my past experience with > Closure Compiler. I haven't looked enough at TypeScript yet to know which > tool might give better type checking, but if people are interested in type > checking, it'd be worth considering Closure Compiler as well. My primary interest here would be to do something similar to what Isaac was suggesting: have a separate "header file" (prolly header-file-per-plugin) that describes the API of the plugin using a typed description language. Then make use of that typed information in various ways. I've tried this a number of times over the years, even doing whacky things like describing JS interfaces in Java - Java interfaces are easy to introspect over - and "Web IDL" - which is frankly a bit horrifying (but can be greatly simplified). So, I'm pretty open-minded about HOW we describe our interfaces. We just need a way to get the interface description out of the headers, programmatically. Does Closure Compiler support that in any way? It appears to me that it consumes JSDoc comments, and then uses them internally for validation, etc. -- Patrick Mueller http://muellerware.org