Skip to content

Update spec for scoping of interface member names #537

Closed

Description

Courtesy of Dan Quirk (@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.

Metadata

Metadata

Labels

Spec

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions