Skip to content

Update spec for scoping of interface member names #537

Closed
@mhegazy

Description

@mhegazy

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.

Metadata

Metadata

Assignees

Labels

SpecIssues related to the TypeScript language specification

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions