angular / clutz

Closure to TypeScript `.d.ts` generator
MIT License
162 stars 60 forks source link

Correctly output common enum export style in clutz. #964

Closed tsjs-copybara-bot closed 4 years ago

tsjs-copybara-bot commented 4 years ago

Correctly output common enum export style in clutz.

goog.module('foo.bar');
goog.module.declareLegacyNamespace();

const Enum = {...};
exports.Enum = Enum;

The change adds unnecessary empty declare namespace in enum_alias_declare_legacy_namespace test but it shouldn't affect anything. Ideally for that test the namespace will contain proper alias pointing to goog.require, but it's a bigger issue and separate bug.

Tested: unit tests