TypeScript/tests/cases/conformance/jsdoc/exportedEnumTypeAndValue.ts
Eli Barzilay 620e260576 Avoid the double-symbol trick for enums
Nameless jsdoc typedefs have their exportedness controlled by the
exportedness of the location they pull their name from.

Fixes #33575.
2020-08-12 18:40:57 -04:00

18 lines
248 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: def.js
/** @enum {number} */
const MyEnum = {
a: 1,
b: 2
};
export default MyEnum;
// @Filename: use.js
import MyEnum from "./def";
/** @type {MyEnum} */
const v = MyEnum.b;