tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(3,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(7,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,59): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(11,110): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(15,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(19,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,59): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(23,110): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(52,56): error TS4076: Parameter 'param' of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(56,57): error TS4076: Parameter 'param' of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(63,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(65,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,58): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(67,108): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(71,33): error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(73,20): error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,17): error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,58): error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(75,108): error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(78,63): error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts(80,64): error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. ==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts (24 errors) ==== import exporter = require("./privacyFunctionCannotNameParameterTypeDeclFile_exporter"); export class publicClassWithWithPrivateParmeterTypes { static myPublicStaticMethod(param = exporter.createExportedWidget1()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { } myPublicMethod(param = exporter.createExportedWidget1()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } private myPrivateMethod(param = exporter.createExportedWidget1()) { } constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } } export class publicClassWithWithPrivateParmeterTypes1 { static myPublicStaticMethod(param = exporter.createExportedWidget3()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. } private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { } myPublicMethod(param = exporter.createExportedWidget3()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. } private myPrivateMethod(param = exporter.createExportedWidget3()) { } constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. } } class privateClassWithWithPrivateParmeterTypes { static myPublicStaticMethod(param = exporter.createExportedWidget1()) { } private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) { } myPublicMethod(param = exporter.createExportedWidget1()) { } private myPrivateMethod(param = exporter.createExportedWidget1()) { } constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidget1(), public param2 = exporter.createExportedWidget1()) { } } class privateClassWithWithPrivateParmeterTypes2 { static myPublicStaticMethod(param = exporter.createExportedWidget3()) { } private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) { } myPublicMethod(param = exporter.createExportedWidget3()) { } private myPrivateMethod(param = exporter.createExportedWidget3()) { } constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidget3(), public param2 = exporter.createExportedWidget3()) { } } export function publicFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4076: Parameter 'param' of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } function privateFunctionWithPrivateParmeterTypes(param = exporter.createExportedWidget1()) { } export function publicFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4076: Parameter 'param' of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. } function privateFunctionWithPrivateParmeterTypes1(param = exporter.createExportedWidget3()) { } export class publicClassWithPrivateModuleParameterTypes { static myPublicStaticMethod(param= exporter.createExportedWidget2()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } myPublicMethod(param= exporter.createExportedWidget2()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } } export class publicClassWithPrivateModuleParameterTypes2 { static myPublicStaticMethod(param= exporter.createExportedWidget4()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4068: Parameter 'param' of public static method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. } myPublicMethod(param= exporter.createExportedWidget4()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4071: Parameter 'param' of public method from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. } constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param1' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4061: Parameter 'param2' of constructor from exported class has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. } } export function publicFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_Widgets" but cannot be named. } export function publicFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4076: Parameter 'param' of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. } class privateClassWithPrivateModuleParameterTypes { static myPublicStaticMethod(param= exporter.createExportedWidget2()) { } myPublicMethod(param= exporter.createExportedWidget2()) { } constructor(param= exporter.createExportedWidget2(), private param1= exporter.createExportedWidget2(), public param2= exporter.createExportedWidget2()) { } } class privateClassWithPrivateModuleParameterTypes1 { static myPublicStaticMethod(param= exporter.createExportedWidget4()) { } myPublicMethod(param= exporter.createExportedWidget4()) { } constructor(param= exporter.createExportedWidget4(), private param1= exporter.createExportedWidget4(), public param2= exporter.createExportedWidget4()) { } } function privateFunctionWithPrivateModuleParameterTypes(param= exporter.createExportedWidget2()) { } function privateFunctionWithPrivateModuleParameterTypes1(param= exporter.createExportedWidget4()) { } ==== tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile_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/privacyFunctionCannotNameParameterTypeDeclFile_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/privacyFunctionCannotNameParameterTypeDeclFile_exporter.ts (0 errors) ==== /// import Widgets = require("./privacyFunctionCannotNameParameterTypeDeclFile_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(); }