Closed
Description
enum Color {
Red,
Green,
Blue
}
let a1: Color.Red.toString; // TS2694: The Namespace 'Color' has no exported member 'Red'
let a2: Color.Red["toString"];
The type of a1
is invalid - it should be like the type of a2
. It would be nice if the error indicated as much (which would also allow us to offer a code fix).