Created a static method that will handle destroying a destroyable
object when you are done with it.
Issue #1248
Change-Id: I4df0569f5f5e00002600702cf24caf1ed2da7c5b
We were not able to get our externs generated by the Closure compiler.
There were many issues with the Closure-generated externs, including
the order of the externs and the replacement of record types and enums
with their underlying types.
We made a few attempts to patch the compiler, but could not get our
patches accepted upstream.
This change introduces a new script to generate our externs from
scratch. It uses a JavaScript parser called 'esprima'.
Some interfaces need to be exported to the generated externs, but are
not actually attached to the namespace by the compiler. For this, we
introduce a new annotation. These are the currently-supported export
annotations:
- @export: truly exported (attached to namespace) by the compiler
- @expose: truly exposed (not renamed) by the compiler
- @exportDoc: considered part of the exports in the docs
- @exportInterface: considered part of the exports in generated externs
These annotations are now documented in docs/design/export.md
Change-Id: I33bf7384889c14c9edb0fa5f11caa7c4f4d79af6
An upcoming compiler release will allow us to generate externs from
exports. Because of that, we are adding some extra exports which are
otherwise not needed at runtime.
- Export properties which implement an interface
- Export classes which are referenced in external APIs
- Export base classes of other exported classes
Change-Id: I78b3a4569b4b82b0a9d8993978faf268c2a791d9