openlayers/ol3 — pull request #930 by elemoine (2013-08-27 21:48:00+00:00)
Title: Use @exportSymbol instead of @exportClass|Function

This commit uses @exportSymbol in place of @exportClass and @exportFunction for exporting single-arg constructors and functions. This is a simplification, removing the need for the specific @exportClass and @exportFunction statements, and the corresponding Export constructors/functions doing "external objects to internal objects" translations in the generated code (exports.js).

The definitions of @interface properties in the generated externs file do in themselves prevent renaming of object properties, unless DisambiguateProperties and AmbiguateProperties are set to true. DisambiguateProperties and AmbiguateProperties indeed make the equation more complex. But, by defining the @typedefs alongside the @interfaces in the externs file, as suggested by John Lenz on the Closure Compiler mailing list [*], it looks like DisambiguateProperties and AmbiguateProperties no longer mess up with property renaming - properties defined in the externs file are not renamed.

Other notes:

This change, by removing the use of @exportClass and @exportFunction, may allow using the @export annotation in the future. Also, with this change, and @exportClass and @exportFunction not being used anymore, the generate-exports.py script can be simplified. This will be done in a future commit if this simplification works as expected.

[*]