Skip to content

[Errors][Message] Module in type reference #102

@mhegazy

Description

@mhegazy

tests/cases/compiler/primaryExpressionMods.ts

module M
{
export interface P { x: number; y: number; }
export var a = 1;
}

var p: M.P; // Used as ModuleName

var m: M = M; // Used as TypeName and PrimaryExpression (error on TypeName)

var m2: typeof M = M; // Used as PrimaryExpression in TypeQuery

var x1 = M.a; // Used as PrimaryExpression

var x2 = m.a; // Same as M.a

var q: m.P; // Error

Old Compiler

Type reference cannot refer to container 'M'.

New Compiler

Cannot find name 'M'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions