clutz icon indicating copy to clipboard operation
clutz copied to clipboard

clutz does not emit typedefs nested in default exported object

Open rkirov opened this issue 9 years ago • 0 comments

goog.module(...);

const x = {}

exports = x;
/** @typedef {...} */
exports.T;

Clutz does not emit a definition for T.

Purely for typedefs we can emit something like:

declare let m: {};

declare namespace m {
  type T = string;
}

export default m;

This will break if a value is assigned to m, like m.v = 0.

rkirov avatar Mar 29 '17 22:03 rkirov