Open supersteves opened 7 years ago
Input 0
/** @enum {string} */ export default { CIRCLE: "circle", SQUARE: "square", };
Input 1
import ShapeType from "./input0"; let /** ShapeType */ something = ShapeType.CIRCLE;
Error [debugger]:
input1:2: WARNING - Bad type annotation. Unknown type ShapeType$$module$input0 let /** ShapeType */ something = ShapeType.CIRCLE;
Workaround [debugger]:
/** * @enum {string} */ const ShapeType = { CIRCLE: "circle", SQUARE: "square", }; export default ShapeType;
I think I've seen the same issue with export default class {...}, too.
export default class {...}
I'm guessing this is due to commonjs module rewriting.
Whoops for some reason I saw this as CommonJS - not ES6.
I see you are getting the warning even without NTI, so this isn't NTI specific.
Input 0
Input 1
Error [debugger]:
Workaround [debugger]:
I think I've seen the same issue with
export default class {...}
, too.