TypeScript/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts
Sheetal Nandi d6fb678222 Test cases for type alias declaration emit and privacy check.
Also removed the unnecessary error messages for type alias privacy check
2014-11-10 18:28:05 -08:00

44 lines
786 B
TypeScript

// @target: ES5
// @module: commonjs
// @declaration: true
interface Window {
someMethod();
}
module M {
type W = Window | string;
export module N {
export class Window { }
export var p: W; // Should report error that W is private
}
}
module M1 {
export type W = Window | string;
export module N {
export class Window { }
export var p: W; // No error
}
}
module M2 {
class private1 {
}
class public1 {
}
module m3 {
export class public1 {
}
}
type t1 = private1;
export type t2 = private1; // error
type t11 = public1;
export type t12 = public1;
type t111 = m3.public1;
export type t112 = m3.public1; // error
}