Skip to content

Deriving namespace of types #9102

@falsandtru

Description

@falsandtru

A extends keyword derives only namespace of variables.

TypeScript Version:

master

Code

class B {
}
namespace B {
    export type M = number;
    export var m = 0;
}
class D extends B {}
var m: D.M = D.m;

Expected behavior:

$ node built/local/tsc.js index.ts

Actual behavior:

$ node built/local/tsc.js index.ts
index.ts(8,8): error TS2503: Cannot find namespace 'D'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions