Closed
Description
Courtesy of @danquirk
interface N {
y: number;
x: typeof y; // error (y is not a value)
}
Section 2.4 Scopes says:
Note that class and enum members are never directly in scope—they can only be accessed by applying the dot (‘.’) operator to a class instance or enum object.
but it means to say:
Note that class and interface members are never directly in scope—they can only be accessed by applying the dot (‘.’) operator to a class instance or enum object.