TypeScript/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.errors.txt
2014-09-12 13:35:07 -07:00

137 lines
11 KiB
Plaintext

tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(3,5): error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(5,5): error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(8,5): error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(10,5): error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(26,12): error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes' has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(28,12): error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes1' has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(32,5): error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(33,5): error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(34,5): error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(35,5): error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(37,12): error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes' has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts(38,12): error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes1' has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_consumer.ts (12 errors) ====
import exporter = require("privacyCannotNameVarTypeDeclFile_exporter");
export class publicClassWithWithPrivatePropertyTypes {
static myPublicStaticProperty = exporter.createExportedWidget1(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
private static myPrivateStaticProperty = exporter.createExportedWidget1();
myPublicProperty = exporter.createExportedWidget1(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
private myPrivateProperty = exporter.createExportedWidget1();
static myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
private static myPrivateStaticProperty1 = exporter.createExportedWidget3();
myPublicProperty1 = exporter.createExportedWidget3(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
private myPrivateProperty1 = exporter.createExportedWidget3();
}
class privateClassWithWithPrivatePropertyTypes {
static myPublicStaticProperty = exporter.createExportedWidget1();
private static myPrivateStaticProperty = exporter.createExportedWidget1();
myPublicProperty = exporter.createExportedWidget1();
private myPrivateProperty = exporter.createExportedWidget1();
static myPublicStaticProperty1 = exporter.createExportedWidget3();
private static myPrivateStaticProperty1 = exporter.createExportedWidget3();
myPublicProperty1 = exporter.createExportedWidget3();
private myPrivateProperty1 = exporter.createExportedWidget3();
}
export var publicVarWithPrivatePropertyTypes= exporter.createExportedWidget1(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes' has or is using name 'Widget1' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
var privateVarWithPrivatePropertyTypes= exporter.createExportedWidget1();
export var publicVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4023: Exported variable 'publicVarWithPrivatePropertyTypes1' has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named.
var privateVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3();
export class publicClassWithPrivateModulePropertyTypes {
static myPublicStaticProperty= exporter.createExportedWidget2(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4026: Public static property 'myPublicStaticProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
myPublicProperty = exporter.createExportedWidget2(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4029: Public property 'myPublicProperty' of exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
static myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4026: Public static property 'myPublicStaticProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
myPublicProperty1 = exporter.createExportedWidget4(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4029: Public property 'myPublicProperty1' of exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
}
export var publicVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes' has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets" but cannot be named.
export var publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4023: Exported variable 'publicVarWithPrivateModulePropertyTypes1' has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named.
class privateClassWithPrivateModulePropertyTypes {
static myPublicStaticProperty= exporter.createExportedWidget2();
myPublicProperty= exporter.createExportedWidget2();
static myPublicStaticProperty1 = exporter.createExportedWidget4();
myPublicProperty1 = exporter.createExportedWidget4();
}
var privateVarWithPrivateModulePropertyTypes= exporter.createExportedWidget2();
var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4();
==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_GlobalWidgets.ts (0 errors) ====
declare module "GlobalWidgets" {
export class Widget3 {
name: string;
}
export function createWidget3(): Widget3;
export module SpecializedGlobalWidget {
export class Widget4 {
name: string;
}
function createWidget4(): Widget4;
}
}
==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_Widgets.ts (0 errors) ====
export class Widget1 {
name = 'one';
}
export function createWidget1() {
return new Widget1();
}
export module SpecializedWidget {
export class Widget2 {
name = 'one';
}
export function createWidget2() {
return new Widget2();
}
}
==== tests/cases/compiler/privacyCannotNameVarTypeDeclFile_exporter.ts (0 errors) ====
///<reference path='privacyCannotNameVarTypeDeclFile_GlobalWidgets.ts'/>
import Widgets = require("privacyCannotNameVarTypeDeclFile_Widgets");
import Widgets1 = require("GlobalWidgets");
export function createExportedWidget1() {
return Widgets.createWidget1();
}
export function createExportedWidget2() {
return Widgets.SpecializedWidget.createWidget2();
}
export function createExportedWidget3() {
return Widgets1.createWidget3();
}
export function createExportedWidget4() {
return Widgets1.SpecializedGlobalWidget.createWidget4();
}