TypeScript/tests/cases/compiler/jsEnumCrossFileExport.ts
Wesley Wigham 6b4f730535
Fix binding of jsdoc typedefs with no in-comment name attached to an expression statement (#32610)
* Fix binding of jsdoc typedefs with no in-comment name attached to an expression statement

* Check toplevel flag before bind

* Small renames
2019-08-02 16:14:19 -07:00

44 lines
757 B
TypeScript

// @noEmit: true
// @checkJs: true
// @allowJs: true
// @filename: enumDef.js
var Host = {};
Host.UserMetrics = {};
/** @enum {number} */
Host.UserMetrics.Action = {
WindowDocked: 1,
WindowUndocked: 2,
ScriptsBreakpointSet: 3,
TimelineStarted: 4,
};
/**
* @typedef {string} Host.UserMetrics.Bargh
*/
/**
* @typedef {string}
*/
Host.UserMetrics.Blah = {
x: 12
}
// @filename: index.js
var Other = {};
Other.Cls = class {
/**
* @param {!Host.UserMetrics.Action} p
*/
method(p) {}
usage() {
this.method(Host.UserMetrics.Action.WindowDocked);
}
}
/**
* @type {Host.UserMetrics.Bargh}
*/
var x = "ok";
/**
* @type {Host.UserMetrics.Blah}
*/
var y = "ok";