mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
merge with master
This commit is contained in:
+16
-16
@@ -582,7 +582,7 @@ module ts {
|
||||
if (moduleSymbol) {
|
||||
let exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]);
|
||||
if (!exportDefaultSymbol) {
|
||||
error(node.name, Diagnostics.External_module_0_has_no_default_export, symbolToString(moduleSymbol));
|
||||
error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
|
||||
}
|
||||
return exportDefaultSymbol;
|
||||
}
|
||||
@@ -870,10 +870,10 @@ module ts {
|
||||
if (sourceFile.symbol) {
|
||||
return sourceFile.symbol;
|
||||
}
|
||||
error(moduleReferenceLiteral, Diagnostics.File_0_is_not_an_external_module, sourceFile.fileName);
|
||||
error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName);
|
||||
return;
|
||||
}
|
||||
error(moduleReferenceLiteral, Diagnostics.Cannot_find_external_module_0, moduleName);
|
||||
error(moduleReferenceLiteral, Diagnostics.Cannot_find_module_0, moduleName);
|
||||
}
|
||||
|
||||
// An external module with an 'export =' declaration resolves to the target of the 'export =' declaration,
|
||||
@@ -888,7 +888,7 @@ module ts {
|
||||
function resolveESModuleSymbol(moduleSymbol: Symbol, moduleReferenceExpression: Expression): Symbol {
|
||||
let symbol = resolveExternalModuleSymbol(moduleSymbol);
|
||||
if (symbol && !(symbol.flags & (SymbolFlags.Module | SymbolFlags.Variable))) {
|
||||
error(moduleReferenceExpression, Diagnostics.External_module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
|
||||
error(moduleReferenceExpression, Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
|
||||
symbol = undefined;
|
||||
}
|
||||
return symbol;
|
||||
@@ -5508,7 +5508,7 @@ module ts {
|
||||
|
||||
switch (container.kind) {
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
error(node, Diagnostics.this_cannot_be_referenced_in_a_module_body);
|
||||
error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
|
||||
// do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
|
||||
break;
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
@@ -9079,7 +9079,7 @@ module ts {
|
||||
let parent = getDeclarationContainer(node);
|
||||
if (parent.kind === SyntaxKind.SourceFile && isExternalModule(<SourceFile>parent)) {
|
||||
// If the declaration happens to be in external module, report error that require and exports are reserved keywords
|
||||
error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module,
|
||||
error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,
|
||||
declarationNameToString(name), declarationNameToString(name));
|
||||
}
|
||||
}
|
||||
@@ -10494,10 +10494,10 @@ module ts {
|
||||
let firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
|
||||
if (firstNonAmbientClassOrFunc) {
|
||||
if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) {
|
||||
error(node.name, Diagnostics.A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged);
|
||||
error(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged);
|
||||
}
|
||||
else if (node.pos < firstNonAmbientClassOrFunc.pos) {
|
||||
error(node.name, Diagnostics.A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
|
||||
error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10513,10 +10513,10 @@ module ts {
|
||||
// Checks for ambient external modules.
|
||||
if (node.name.kind === SyntaxKind.StringLiteral) {
|
||||
if (!isGlobalSourceFile(node.parent)) {
|
||||
error(node.name, Diagnostics.Ambient_external_modules_cannot_be_nested_in_other_modules);
|
||||
error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules);
|
||||
}
|
||||
if (isExternalModuleNameRelative(node.name.text)) {
|
||||
error(node.name, Diagnostics.Ambient_external_module_declaration_cannot_specify_relative_module_name);
|
||||
error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10548,8 +10548,8 @@ module ts {
|
||||
let inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (<ModuleDeclaration>node.parent.parent).name.kind === SyntaxKind.StringLiteral;
|
||||
if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) {
|
||||
error(moduleName, node.kind === SyntaxKind.ExportDeclaration ?
|
||||
Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module :
|
||||
Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module);
|
||||
Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
|
||||
Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
|
||||
return false;
|
||||
}
|
||||
if (inAmbientExternalModule && isExternalModuleNameRelative((<LiteralExpression>moduleName).text)) {
|
||||
@@ -10557,7 +10557,7 @@ module ts {
|
||||
// An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference
|
||||
// other external modules only through top - level external module names.
|
||||
// Relative external module names are not permitted.
|
||||
error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name);
|
||||
error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -10651,14 +10651,14 @@ module ts {
|
||||
|
||||
let inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (<ModuleDeclaration>node.parent.parent).name.kind === SyntaxKind.StringLiteral;
|
||||
if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) {
|
||||
error(node, Diagnostics.Export_declarations_are_not_permitted_in_an_internal_module);
|
||||
error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// export * from "foo"
|
||||
let moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
|
||||
if (moduleSymbol && moduleSymbol.exports["export="]) {
|
||||
error(node.moduleSpecifier, Diagnostics.External_module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
|
||||
error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10674,7 +10674,7 @@ module ts {
|
||||
function checkExportAssignment(node: ExportAssignment) {
|
||||
let container = node.parent.kind === SyntaxKind.SourceFile ? <SourceFile>node.parent : <ModuleDeclaration>node.parent.parent;
|
||||
if (container.kind === SyntaxKind.ModuleDeclaration && (<ModuleDeclaration>container).name.kind === SyntaxKind.Identifier) {
|
||||
error(node, Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module);
|
||||
error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
|
||||
return;
|
||||
}
|
||||
// Grammar checking
|
||||
|
||||
@@ -46,7 +46,7 @@ module ts {
|
||||
A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." },
|
||||
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." },
|
||||
Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." },
|
||||
An_export_assignment_cannot_be_used_in_an_internal_module: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in an internal module." },
|
||||
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." },
|
||||
Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." },
|
||||
Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." },
|
||||
A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." },
|
||||
@@ -107,8 +107,8 @@ module ts {
|
||||
or_expected: { code: 1144, category: DiagnosticCategory.Error, key: "'{' or ';' expected." },
|
||||
Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
|
||||
Declaration_expected: { code: 1146, category: DiagnosticCategory.Error, key: "Declaration expected." },
|
||||
Import_declarations_in_an_internal_module_cannot_reference_an_external_module: { code: 1147, category: DiagnosticCategory.Error, key: "Import declarations in an internal module cannot reference an external module." },
|
||||
Cannot_compile_external_modules_unless_the_module_flag_is_provided: { code: 1148, category: DiagnosticCategory.Error, key: "Cannot compile external modules unless the '--module' flag is provided." },
|
||||
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." },
|
||||
Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." },
|
||||
File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" },
|
||||
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
|
||||
var_let_or_const_expected: { code: 1152, category: DiagnosticCategory.Error, key: "'var', 'let' or 'const' expected." },
|
||||
@@ -150,9 +150,9 @@ module ts {
|
||||
The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." },
|
||||
The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." },
|
||||
An_import_declaration_cannot_have_modifiers: { code: 1191, category: DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." },
|
||||
External_module_0_has_no_default_export: { code: 1192, category: DiagnosticCategory.Error, key: "External module '{0}' has no default export." },
|
||||
Module_0_has_no_default_export: { code: 1192, category: DiagnosticCategory.Error, key: "Module '{0}' has no default export." },
|
||||
An_export_declaration_cannot_have_modifiers: { code: 1193, category: DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." },
|
||||
Export_declarations_are_not_permitted_in_an_internal_module: { code: 1194, category: DiagnosticCategory.Error, key: "Export declarations are not permitted in an internal module." },
|
||||
Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." },
|
||||
Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." },
|
||||
Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." },
|
||||
Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." },
|
||||
@@ -161,20 +161,18 @@ module ts {
|
||||
Line_terminator_not_permitted_before_arrow: { code: 1200, category: DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." },
|
||||
Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." },
|
||||
Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." },
|
||||
Cannot_compile_external_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher." },
|
||||
Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher." },
|
||||
Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." },
|
||||
Decorators_are_not_valid_here: { code: 1206, category: DiagnosticCategory.Error, key: "Decorators are not valid here." },
|
||||
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." },
|
||||
Cannot_compile_non_external_modules_when_the_separateCompilation_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile non-external modules when the '--separateCompilation' flag is provided." },
|
||||
Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided: { code: 1208, category: DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--separateCompilation' flag is provided." },
|
||||
Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided: { code: 1209, category: DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--separateCompilation' flag is provided." },
|
||||
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
|
||||
A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
|
||||
Identifier_expected_0_is_a_reserved_word_in_strict_mode_External_Module_is_automatically_in_strict_mode: { code: 1214, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. External Module is automatically in strict mode." },
|
||||
Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" },
|
||||
Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
|
||||
Type_expected_0_is_a_reserved_word_in_strict_mode_Module_is_automatically_in_strict_mode: { code: 1217, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Module is automatically in strict mode." },
|
||||
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
|
||||
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
|
||||
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
|
||||
@@ -182,8 +180,8 @@ module ts {
|
||||
Circular_definition_of_import_alias_0: { code: 2303, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
|
||||
Cannot_find_name_0: { code: 2304, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
|
||||
Module_0_has_no_exported_member_1: { code: 2305, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },
|
||||
File_0_is_not_an_external_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not an external module." },
|
||||
Cannot_find_external_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find external module '{0}'." },
|
||||
File_0_is_not_a_module: { code: 2306, category: DiagnosticCategory.Error, key: "File '{0}' is not a module." },
|
||||
Cannot_find_module_0: { code: 2307, category: DiagnosticCategory.Error, key: "Cannot find module '{0}'." },
|
||||
A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." },
|
||||
An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." },
|
||||
Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." },
|
||||
@@ -206,7 +204,7 @@ module ts {
|
||||
Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." },
|
||||
Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
|
||||
Index_signatures_are_incompatible: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible." },
|
||||
this_cannot_be_referenced_in_a_module_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." },
|
||||
this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." },
|
||||
this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
|
||||
this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
|
||||
this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." },
|
||||
@@ -298,15 +296,15 @@ module ts {
|
||||
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
|
||||
Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" },
|
||||
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
|
||||
A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: DiagnosticCategory.Error, key: "A module declaration cannot be in a different file from a class or function with which it is merged" },
|
||||
A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: DiagnosticCategory.Error, key: "A module declaration cannot be located prior to a class or function with which it is merged" },
|
||||
Ambient_external_modules_cannot_be_nested_in_other_modules: { code: 2435, category: DiagnosticCategory.Error, key: "Ambient external modules cannot be nested in other modules." },
|
||||
Ambient_external_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.Error, key: "Ambient external module declaration cannot specify relative module name." },
|
||||
A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
|
||||
A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
|
||||
Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." },
|
||||
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." },
|
||||
Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" },
|
||||
Import_name_cannot_be_0: { code: 2438, category: DiagnosticCategory.Error, key: "Import name cannot be '{0}'" },
|
||||
Import_or_export_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: DiagnosticCategory.Error, key: "Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name." },
|
||||
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
|
||||
Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" },
|
||||
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." },
|
||||
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
|
||||
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." },
|
||||
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
|
||||
Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." },
|
||||
@@ -360,8 +358,8 @@ module ts {
|
||||
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
|
||||
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." },
|
||||
The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." },
|
||||
External_module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: DiagnosticCategory.Error, key: "External module '{0}' resolves to a non-module entity and cannot be imported using this construct." },
|
||||
External_module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: DiagnosticCategory.Error, key: "External module '{0}' uses 'export =' and cannot be used with 'export *'." },
|
||||
Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." },
|
||||
Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." },
|
||||
An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." },
|
||||
A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." },
|
||||
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." },
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
"category": "Error",
|
||||
"code": 1061
|
||||
},
|
||||
"An export assignment cannot be used in an internal module.": {
|
||||
"An export assignment cannot be used in a namespace.": {
|
||||
"category": "Error",
|
||||
"code": 1063
|
||||
},
|
||||
@@ -415,11 +415,11 @@
|
||||
"category": "Error",
|
||||
"code": 1146
|
||||
},
|
||||
"Import declarations in an internal module cannot reference an external module.": {
|
||||
"Import declarations in a namespace cannot reference a module.": {
|
||||
"category": "Error",
|
||||
"code": 1147
|
||||
},
|
||||
"Cannot compile external modules unless the '--module' flag is provided.": {
|
||||
"Cannot compile modules unless the '--module' flag is provided.": {
|
||||
"category": "Error",
|
||||
"code": 1148
|
||||
},
|
||||
@@ -587,7 +587,7 @@
|
||||
"category": "Error",
|
||||
"code": 1191
|
||||
},
|
||||
"External module '{0}' has no default export.": {
|
||||
"Module '{0}' has no default export.": {
|
||||
"category": "Error",
|
||||
"code": 1192
|
||||
},
|
||||
@@ -595,7 +595,7 @@
|
||||
"category": "Error",
|
||||
"code": 1193
|
||||
},
|
||||
"Export declarations are not permitted in an internal module.": {
|
||||
"Export declarations are not permitted in a namespace.": {
|
||||
"category": "Error",
|
||||
"code": 1194
|
||||
},
|
||||
@@ -631,7 +631,7 @@
|
||||
"category": "Error",
|
||||
"code": 1203
|
||||
},
|
||||
"Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.": {
|
||||
"Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.": {
|
||||
"category": "Error",
|
||||
"code": 1204
|
||||
},
|
||||
@@ -647,7 +647,7 @@
|
||||
"category": "Error",
|
||||
"code": 1207
|
||||
},
|
||||
"Cannot compile non-external modules when the '--separateCompilation' flag is provided.": {
|
||||
"Cannot compile namespaces when the '--separateCompilation' flag is provided.": {
|
||||
"category": "Error",
|
||||
"code": 1208
|
||||
},
|
||||
@@ -671,10 +671,6 @@
|
||||
"category": "Error",
|
||||
"code": 1213
|
||||
},
|
||||
"Identifier expected. '{0}' is a reserved word in strict mode. External Module is automatically in strict mode.": {
|
||||
"category": "Error",
|
||||
"code": 1214
|
||||
},
|
||||
"Type expected. '{0}' is a reserved word in strict mode": {
|
||||
"category": "Error",
|
||||
"code": 1215
|
||||
@@ -683,14 +679,11 @@
|
||||
"category": "Error",
|
||||
"code": 1216
|
||||
},
|
||||
"Type expected. '{0}' is a reserved word in strict mode. Module is automatically in strict mode.": {
|
||||
"category": "Error",
|
||||
"code": 1217
|
||||
},
|
||||
"Export assignment is not supported when '--module' flag is 'system'.": {
|
||||
"category": "Error",
|
||||
"code": 1218
|
||||
},
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2300
|
||||
@@ -715,11 +708,11 @@
|
||||
"category": "Error",
|
||||
"code": 2305
|
||||
},
|
||||
"File '{0}' is not an external module.": {
|
||||
"File '{0}' is not a module.": {
|
||||
"category": "Error",
|
||||
"code": 2306
|
||||
},
|
||||
"Cannot find external module '{0}'.": {
|
||||
"Cannot find module '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2307
|
||||
},
|
||||
@@ -811,7 +804,7 @@
|
||||
"category": "Error",
|
||||
"code": 2330
|
||||
},
|
||||
"'this' cannot be referenced in a module body.": {
|
||||
"'this' cannot be referenced in a module or namespace body.": {
|
||||
"category": "Error",
|
||||
"code": 2331
|
||||
},
|
||||
@@ -1179,19 +1172,19 @@
|
||||
"category": "Error",
|
||||
"code": 2432
|
||||
},
|
||||
"A module declaration cannot be in a different file from a class or function with which it is merged": {
|
||||
"A namespace declaration cannot be in a different file from a class or function with which it is merged": {
|
||||
"category": "Error",
|
||||
"code": 2433
|
||||
},
|
||||
"A module declaration cannot be located prior to a class or function with which it is merged": {
|
||||
"A namespace declaration cannot be located prior to a class or function with which it is merged": {
|
||||
"category": "Error",
|
||||
"code": 2434
|
||||
},
|
||||
"Ambient external modules cannot be nested in other modules.": {
|
||||
"Ambient modules cannot be nested in other modules.": {
|
||||
"category": "Error",
|
||||
"code": 2435
|
||||
},
|
||||
"Ambient external module declaration cannot specify relative module name.": {
|
||||
"Ambient module declaration cannot specify relative module name.": {
|
||||
"category": "Error",
|
||||
"code": 2436
|
||||
},
|
||||
@@ -1203,7 +1196,7 @@
|
||||
"category": "Error",
|
||||
"code": 2438
|
||||
},
|
||||
"Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name.": {
|
||||
"Import or export declaration in an ambient module declaration cannot reference module through relative module name.": {
|
||||
"category": "Error",
|
||||
"code": 2439
|
||||
},
|
||||
@@ -1211,7 +1204,7 @@
|
||||
"category": "Error",
|
||||
"code": 2440
|
||||
},
|
||||
"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.": {
|
||||
"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.": {
|
||||
"category": "Error",
|
||||
"code": 2441
|
||||
},
|
||||
@@ -1427,11 +1420,11 @@
|
||||
"category": "Error",
|
||||
"code": 2496
|
||||
},
|
||||
"External module '{0}' resolves to a non-module entity and cannot be imported using this construct.": {
|
||||
"Module '{0}' resolves to a non-module entity and cannot be imported using this construct.": {
|
||||
"category": "Error",
|
||||
"code": 2497
|
||||
},
|
||||
"External module '{0}' uses 'export =' and cannot be used with 'export *'.": {
|
||||
"Module '{0}' uses 'export =' and cannot be used with 'export *'.": {
|
||||
"category": "Error",
|
||||
"code": 2498
|
||||
},
|
||||
|
||||
+16
-6
@@ -3704,6 +3704,7 @@ module ts {
|
||||
return !isConstEnum;
|
||||
case SyntaxKind.InterfaceKeyword:
|
||||
case SyntaxKind.ModuleKeyword:
|
||||
case SyntaxKind.NamespaceKeyword:
|
||||
case SyntaxKind.EnumKeyword:
|
||||
case SyntaxKind.TypeKeyword:
|
||||
// When followed by an identifier, these do not start a statement but might
|
||||
@@ -4371,14 +4372,14 @@ module ts {
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseInternalModuleTail(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray, flags: NodeFlags): ModuleDeclaration {
|
||||
function parseModuleOrNamespaceDeclaration(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray, flags: NodeFlags): ModuleDeclaration {
|
||||
let node = <ModuleDeclaration>createNode(SyntaxKind.ModuleDeclaration, fullStart);
|
||||
node.decorators = decorators;
|
||||
setModifiers(node, modifiers);
|
||||
node.flags |= flags;
|
||||
node.name = parseIdentifier();
|
||||
node.body = parseOptional(SyntaxKind.DotToken)
|
||||
? parseInternalModuleTail(getNodePos(), /*decorators*/ undefined, /*modifiers:*/undefined, NodeFlags.Export)
|
||||
? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers:*/undefined, NodeFlags.Export)
|
||||
: parseModuleBlock();
|
||||
return finishNode(node);
|
||||
}
|
||||
@@ -4393,10 +4394,17 @@ module ts {
|
||||
}
|
||||
|
||||
function parseModuleDeclaration(fullStart: number, decorators: NodeArray<Decorator>, modifiers: ModifiersArray): ModuleDeclaration {
|
||||
parseExpected(SyntaxKind.ModuleKeyword);
|
||||
return token === SyntaxKind.StringLiteral
|
||||
? parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers)
|
||||
: parseInternalModuleTail(fullStart, decorators, modifiers, modifiers ? modifiers.flags : 0);
|
||||
let flags = modifiers ? modifiers.flags : 0;
|
||||
if (parseOptional(SyntaxKind.NamespaceKeyword)) {
|
||||
flags |= NodeFlags.Namespace;
|
||||
}
|
||||
else {
|
||||
parseExpected(SyntaxKind.ModuleKeyword);
|
||||
if (token === SyntaxKind.StringLiteral) {
|
||||
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
|
||||
}
|
||||
}
|
||||
return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags);
|
||||
}
|
||||
|
||||
function isExternalModuleReference() {
|
||||
@@ -4631,6 +4639,7 @@ module ts {
|
||||
// Not true keywords so ensure an identifier follows or is string literal or asterisk or open brace
|
||||
return lookAhead(nextTokenCanFollowImportKeyword);
|
||||
case SyntaxKind.ModuleKeyword:
|
||||
case SyntaxKind.NamespaceKeyword:
|
||||
// Not a true keyword so ensure an identifier or string literal follows
|
||||
return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral);
|
||||
case SyntaxKind.ExportKeyword:
|
||||
@@ -4715,6 +4724,7 @@ module ts {
|
||||
case SyntaxKind.EnumKeyword:
|
||||
return parseEnumDeclaration(fullStart, decorators, modifiers);
|
||||
case SyntaxKind.ModuleKeyword:
|
||||
case SyntaxKind.NamespaceKeyword:
|
||||
return parseModuleDeclaration(fullStart, decorators, modifiers);
|
||||
case SyntaxKind.ImportKeyword:
|
||||
return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers);
|
||||
|
||||
@@ -102,11 +102,11 @@ module ts {
|
||||
};
|
||||
}
|
||||
|
||||
export function getPreEmitDiagnostics(program: Program): Diagnostic[] {
|
||||
let diagnostics = program.getSyntacticDiagnostics().concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics());
|
||||
export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile): Diagnostic[] {
|
||||
let diagnostics = program.getSyntacticDiagnostics(sourceFile).concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics(sourceFile));
|
||||
|
||||
if (program.getCompilerOptions().declaration) {
|
||||
diagnostics.concat(program.getDeclarationDiagnostics());
|
||||
diagnostics.concat(program.getDeclarationDiagnostics(sourceFile));
|
||||
}
|
||||
|
||||
return sortAndDeduplicateDiagnostics(diagnostics);
|
||||
@@ -575,18 +575,18 @@ module ts {
|
||||
let firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined);
|
||||
if (firstNonExternalModuleSourceFile) {
|
||||
let span = getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
|
||||
diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_non_external_modules_when_the_separateCompilation_flag_is_provided));
|
||||
diagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided));
|
||||
}
|
||||
}
|
||||
else if (firstExternalModuleSourceFile && languageVersion < ScriptTarget.ES6 && !options.module) {
|
||||
// We cannot use createDiagnosticFromNode because nodes do not have parents yet
|
||||
let span = getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator);
|
||||
diagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided));
|
||||
diagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided));
|
||||
}
|
||||
|
||||
// Cannot specify module gen target when in es6 or above
|
||||
if (options.module && languageVersion >= ScriptTarget.ES6) {
|
||||
diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_external_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher));
|
||||
diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher));
|
||||
}
|
||||
|
||||
// there has to be common source directory if user specified --outdir || --sourceRoot
|
||||
|
||||
@@ -76,6 +76,7 @@ module ts {
|
||||
"interface": SyntaxKind.InterfaceKeyword,
|
||||
"let": SyntaxKind.LetKeyword,
|
||||
"module": SyntaxKind.ModuleKeyword,
|
||||
"namespace": SyntaxKind.NamespaceKeyword,
|
||||
"new": SyntaxKind.NewKeyword,
|
||||
"null": SyntaxKind.NullKeyword,
|
||||
"number": SyntaxKind.NumberKeyword,
|
||||
|
||||
@@ -138,6 +138,7 @@ module ts {
|
||||
DeclareKeyword,
|
||||
GetKeyword,
|
||||
ModuleKeyword,
|
||||
NamespaceKeyword,
|
||||
RequireKeyword,
|
||||
NumberKeyword,
|
||||
SetKeyword,
|
||||
@@ -312,8 +313,9 @@ module ts {
|
||||
DeclarationFile = 0x00000800, // Node is a .d.ts file
|
||||
Let = 0x00001000, // Variable declaration
|
||||
Const = 0x00002000, // Variable declaration
|
||||
OctalLiteral = 0x00004000,
|
||||
ExportContext = 0x00008000, // Export context (initialized by binding)
|
||||
OctalLiteral = 0x00004000, // Octal numeric literal
|
||||
Namespace = 0x00008000, // Namespace declaration
|
||||
ExportContext = 0x00010000, // Export context (initialized by binding)
|
||||
|
||||
Modifier = Export | Ambient | Public | Private | Protected | Static | Default,
|
||||
AccessibilityModifier = Public | Private | Protected,
|
||||
|
||||
+34
-10
@@ -2192,38 +2192,62 @@ module FourSlash {
|
||||
xmlData.push(xml);
|
||||
}
|
||||
|
||||
// We don't want to recompile 'fourslash.ts' for every test, so
|
||||
// here we cache the JS output and reuse it for every test.
|
||||
let fourslashJsOutput: string;
|
||||
{
|
||||
let host = Harness.Compiler.createCompilerHost([{ unitName: Harness.Compiler.fourslashFileName, content: undefined }],
|
||||
(fn, contents) => fourslashJsOutput = contents,
|
||||
ts.ScriptTarget.Latest,
|
||||
ts.sys.useCaseSensitiveFileNames);
|
||||
|
||||
let program = ts.createProgram([Harness.Compiler.fourslashFileName], { noResolve: true, target: ts.ScriptTarget.ES3 }, host);
|
||||
|
||||
program.emit(host.getSourceFile(Harness.Compiler.fourslashFileName, ts.ScriptTarget.ES3));
|
||||
}
|
||||
|
||||
|
||||
export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): TestXmlData {
|
||||
// Parse out the files and their metadata
|
||||
var testData = parseTestData(basePath, content, fileName);
|
||||
let testData = parseTestData(basePath, content, fileName);
|
||||
|
||||
currentTestState = new TestState(basePath, testType, testData);
|
||||
|
||||
var result = '';
|
||||
var host = Harness.Compiler.createCompilerHost([{ unitName: Harness.Compiler.fourslashFileName, content: undefined },
|
||||
{ unitName: fileName, content: content }],
|
||||
let result = '';
|
||||
let host = Harness.Compiler.createCompilerHost(
|
||||
[
|
||||
{ unitName: Harness.Compiler.fourslashFileName, content: undefined },
|
||||
{ unitName: fileName, content: content }
|
||||
],
|
||||
(fn, contents) => result = contents,
|
||||
ts.ScriptTarget.Latest,
|
||||
ts.sys.useCaseSensitiveFileNames);
|
||||
// TODO (drosen): We need to enforce checking on these tests.
|
||||
var program = ts.createProgram([Harness.Compiler.fourslashFileName, fileName], { out: "fourslashTestOutput.js", noResolve: true, target: ts.ScriptTarget.ES3 }, host);
|
||||
|
||||
var diagnostics = ts.getPreEmitDiagnostics(program);
|
||||
let program = ts.createProgram([Harness.Compiler.fourslashFileName, fileName], { out: "fourslashTestOutput.js", noResolve: true, target: ts.ScriptTarget.ES3 }, host);
|
||||
|
||||
let sourceFile = host.getSourceFile(fileName, ts.ScriptTarget.ES3);
|
||||
|
||||
let diagnostics = ts.getPreEmitDiagnostics(program, sourceFile);
|
||||
if (diagnostics.length > 0) {
|
||||
throw new Error('Error compiling ' + fileName + ': ' +
|
||||
diagnostics.map(e => ts.flattenDiagnosticMessageText(e.messageText, ts.sys.newLine)).join('\r\n'));
|
||||
}
|
||||
program.emit();
|
||||
|
||||
program.emit(sourceFile);
|
||||
result = result || ''; // Might have an empty fourslash file
|
||||
|
||||
result = fourslashJsOutput + "\r\n" + result;
|
||||
|
||||
// Compile and execute the test
|
||||
try {
|
||||
eval(result);
|
||||
} catch (err) {
|
||||
}
|
||||
catch (err) {
|
||||
// Debugging: FourSlash.currentTestState.printCurrentFileState();
|
||||
throw err;
|
||||
}
|
||||
|
||||
var xmlData = currentTestState.getTestXmlData();
|
||||
let xmlData = currentTestState.getTestXmlData();
|
||||
xmlData.originalName = fileName;
|
||||
return xmlData;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
/// <reference path='rwcRunner.ts' />
|
||||
|
||||
function runTests(runners: RunnerBase[]) {
|
||||
if (reverse) {
|
||||
runners = runners.reverse();
|
||||
}
|
||||
for (var i = iterations; i > 0; i--) {
|
||||
for (var j = 0; j < runners.length; j++) {
|
||||
runners[j].initializeTests();
|
||||
@@ -31,8 +28,6 @@ function runTests(runners: RunnerBase[]) {
|
||||
}
|
||||
|
||||
var runners: RunnerBase[] = [];
|
||||
global.runners = runners;
|
||||
var reverse: boolean = false;
|
||||
var iterations: number = 1;
|
||||
|
||||
// users can define tests to run in mytest.config that will override cmd line args, otherwise use cmd line args (test.config), otherwise no options
|
||||
@@ -78,9 +73,6 @@ if (testConfigFile !== '') {
|
||||
case 'test262':
|
||||
runners.push(new Test262BaselineRunner());
|
||||
break;
|
||||
case 'reverse':
|
||||
reverse = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ module ts.formatting {
|
||||
this.NoSpaceAfterModuleImport = new Rule(RuleDescriptor.create2(Shared.TokenRange.FromTokens([SyntaxKind.ModuleKeyword, SyntaxKind.RequireKeyword]), SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
|
||||
// Add a space around certain TypeScript keywords
|
||||
this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.SpaceAfterCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.ClassKeyword, SyntaxKind.DeclareKeyword, SyntaxKind.EnumKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ExtendsKeyword, SyntaxKind.GetKeyword, SyntaxKind.ImplementsKeyword, SyntaxKind.ImportKeyword, SyntaxKind.InterfaceKeyword, SyntaxKind.ModuleKeyword, SyntaxKind.NamespaceKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.PublicKeyword, SyntaxKind.SetKeyword, SyntaxKind.StaticKeyword]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.SpaceBeforeCertainTypeScriptKeywords = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.ExtendsKeyword, SyntaxKind.ImplementsKeyword])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
|
||||
// Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" {
|
||||
|
||||
@@ -2991,7 +2991,8 @@ module ts {
|
||||
case SyntaxKind.OpenBracketToken:
|
||||
return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ |
|
||||
|
||||
case SyntaxKind.ModuleKeyword: // module |
|
||||
case SyntaxKind.ModuleKeyword: // module |
|
||||
case SyntaxKind.NamespaceKeyword: // namespace |
|
||||
return true;
|
||||
|
||||
case SyntaxKind.DotToken:
|
||||
@@ -3644,7 +3645,9 @@ module ts {
|
||||
}
|
||||
if (symbolFlags & SymbolFlags.Module) {
|
||||
addNewLineIfDisplayPartsExist();
|
||||
displayParts.push(keywordPart(SyntaxKind.ModuleKeyword));
|
||||
let declaration = <ModuleDeclaration>getDeclarationOfKind(symbol, SyntaxKind.ModuleDeclaration);
|
||||
let isNamespace = declaration && declaration.name && declaration.name.kind === SyntaxKind.Identifier;
|
||||
displayParts.push(keywordPart(isNamespace ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword));
|
||||
displayParts.push(spacePart());
|
||||
addFullSymbolName(symbol);
|
||||
}
|
||||
|
||||
@@ -75,26 +75,26 @@ function delint(sourceFile) {
|
||||
delintNode(sourceFile);
|
||||
function delintNode(node) {
|
||||
switch (node.kind) {
|
||||
case 186 /* ForStatement */:
|
||||
case 187 /* ForInStatement */:
|
||||
case 185 /* WhileStatement */:
|
||||
case 184 /* DoStatement */:
|
||||
if (node.statement.kind !== 179 /* Block */) {
|
||||
case 187 /* ForStatement */:
|
||||
case 188 /* ForInStatement */:
|
||||
case 186 /* WhileStatement */:
|
||||
case 185 /* DoStatement */:
|
||||
if (node.statement.kind !== 180 /* Block */) {
|
||||
report(node, "A looping statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 183 /* IfStatement */:
|
||||
case 184 /* IfStatement */:
|
||||
var ifStatement = node;
|
||||
if (ifStatement.thenStatement.kind !== 179 /* Block */) {
|
||||
if (ifStatement.thenStatement.kind !== 180 /* Block */) {
|
||||
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
if (ifStatement.elseStatement &&
|
||||
ifStatement.elseStatement.kind !== 179 /* Block */ &&
|
||||
ifStatement.elseStatement.kind !== 183 /* IfStatement */) {
|
||||
ifStatement.elseStatement.kind !== 180 /* Block */ &&
|
||||
ifStatement.elseStatement.kind !== 184 /* IfStatement */) {
|
||||
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 169 /* BinaryExpression */:
|
||||
case 170 /* BinaryExpression */:
|
||||
var op = node.operatorToken.kind;
|
||||
if (op === 28 /* EqualsEqualsToken */ || op == 29 /* ExclamationEqualsToken */) {
|
||||
report(node, "Use '===' and '!=='.");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ====
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ====
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name
|
||||
==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ====
|
||||
export class C {
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
}
|
||||
|
||||
export = B;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name
|
||||
==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ====
|
||||
export = B;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'.
|
||||
|
||||
@@ -14,7 +14,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T
|
||||
module A {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ====
|
||||
module A {
|
||||
~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
export var Instance = new A();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
|
||||
module A {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro
|
||||
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'.
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ====
|
||||
export module A {
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/consumer.ts (1 errors) ====
|
||||
/// <reference path="decls.ts" />
|
||||
import imp1 = require('equ');
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
|
||||
|
||||
@@ -11,8 +11,8 @@ tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializ
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1184: An implementation cannot be declared in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
|
||||
|
||||
@@ -91,13 +91,13 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export
|
||||
module M2 {
|
||||
declare module 'nope' { }
|
||||
~~~~~~
|
||||
!!! error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules.
|
||||
}
|
||||
|
||||
// Ambient external module with a string literal name that isn't a top level external module name
|
||||
declare module '../foo' { }
|
||||
~~~~~~~~
|
||||
!!! error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
!!! error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
|
||||
// Ambient external module with export assignment and other exported members
|
||||
declare module 'bar' {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find external module 'ext'.
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find module 'ext'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ====
|
||||
@@ -9,12 +9,12 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): err
|
||||
|
||||
declare module "ext" {
|
||||
~~~~~
|
||||
!!! error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules.
|
||||
export class C { }
|
||||
}
|
||||
|
||||
// Cannot resolve this ext module reference
|
||||
import ext = require("ext");
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find external module 'ext'.
|
||||
!!! error TS2307: Cannot find module 'ext'.
|
||||
var x = ext;
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (1 errors) ====
|
||||
module M {
|
||||
export declare module "M" { }
|
||||
~~~
|
||||
!!! error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules.
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ====
|
||||
export declare module "M" { }
|
||||
~~~
|
||||
!!! error TS2435: Ambient external modules cannot be nested in other modules.
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules.
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find external module './SubModule'.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ====
|
||||
declare module "OuterModule" {
|
||||
import m2 = require("./SubModule");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2439: Import or export declaration in an ambient external module declaration cannot reference external module through relative external module name.
|
||||
!!! error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './SubModule'.
|
||||
!!! error TS2307: Cannot find module './SubModule'.
|
||||
class SubModule {
|
||||
public static StaticVar: number;
|
||||
public InstanceVar: number;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ====
|
||||
declare module "./relativeModule" {
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
!!! error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
var x: string;
|
||||
}
|
||||
|
||||
declare module ".\\relativeModule" {
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2436: Ambient external module declaration cannot specify relative module name.
|
||||
!!! error TS2436: Ambient module declaration cannot specify relative module name.
|
||||
var x: string;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find external module 'm2'.
|
||||
tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find e
|
||||
|
||||
import m1 = require("m2")
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find external module 'm2'.
|
||||
!!! error TS2307: Cannot find module 'm2'.
|
||||
m1.f();
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find external module 'm2'.
|
||||
tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find e
|
||||
|
||||
import m1 = require("m2")
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find external module 'm2'.
|
||||
!!! error TS2307: Cannot find module 'm2'.
|
||||
m1.f();
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find external module 'm2'.
|
||||
tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyCommentName1.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi
|
||||
|
||||
import m1 = require("m2")
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find external module 'm2'.
|
||||
!!! error TS2307: Cannot find module 'm2'.
|
||||
m1.f();
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find external module 'm2'.
|
||||
tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi
|
||||
|
||||
import m1 = require("m2")
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find external module 'm2'.
|
||||
!!! error TS2307: Cannot find module 'm2'.
|
||||
m1.f();
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find external module 'm2'.
|
||||
tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi
|
||||
|
||||
import m1 = require("m2")
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find external module 'm2'.
|
||||
!!! error TS2307: Cannot find module 'm2'.
|
||||
m1.f();
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find external module 'aliasedModule1'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find external module 'aliasedModule2'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find external module 'aliasedModule3'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find external module 'aliasedModule4'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3'.
|
||||
tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ====
|
||||
@@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f
|
||||
|
||||
import r1 = require("aliasedModule1");
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'aliasedModule1'.
|
||||
!!! error TS2307: Cannot find module 'aliasedModule1'.
|
||||
r1;
|
||||
|
||||
import {p1, p2, p3} from "aliasedModule2";
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'aliasedModule2'.
|
||||
!!! error TS2307: Cannot find module 'aliasedModule2'.
|
||||
p1;
|
||||
|
||||
import d from "aliasedModule3";
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'aliasedModule3'.
|
||||
!!! error TS2307: Cannot find module 'aliasedModule3'.
|
||||
d;
|
||||
|
||||
import * as ns from "aliasedModule4";
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'aliasedModule4'.
|
||||
!!! error TS2307: Cannot find module 'aliasedModule4'.
|
||||
ns;
|
||||
|
||||
import "unaliasedModule2";
|
||||
@@ -4,9 +4,9 @@ tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate iden
|
||||
tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ====
|
||||
@@ -48,12 +48,12 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module decl
|
||||
|
||||
module m2a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
// should be errors to have function first
|
||||
@@ -78,7 +78,7 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module decl
|
||||
|
||||
module m3a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
|
||||
class m3b { foo() { } }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ====
|
||||
@@ -10,12 +10,12 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module dec
|
||||
|
||||
module m2a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
function m2c() { };
|
||||
@@ -23,7 +23,7 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A module dec
|
||||
|
||||
module m2cc { export var y = 2; }
|
||||
~~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
function m2cc() { }; // error to have module first
|
||||
|
||||
module m2d { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A module decl
|
||||
|
||||
module m3a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find external module 'garbage'.
|
||||
tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ====
|
||||
import a1 = require("garbage");
|
||||
~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'garbage'.
|
||||
!!! error TS2307: Cannot find module 'garbage'.
|
||||
export declare var a: {
|
||||
test1: a1.connectModule;
|
||||
(): a1.connectExport;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(9,12): error TS2339: Property 'x' does not exist on type 'C1'.
|
||||
tests/cases/conformance/externalModules/foo2.ts(8,12): error TS2339: Property 'y' does not exist on type 'C1'.
|
||||
tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x' does not exist on type 'C1'.
|
||||
@@ -29,7 +29,7 @@ tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ====
|
||||
import foo2 = require('./foo2');
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
export module M1 {
|
||||
export class C1 {
|
||||
m1: foo2.M1.C1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error T
|
||||
};
|
||||
export class Test1 {
|
||||
~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
constructor(private field1: string) {
|
||||
}
|
||||
messageHandler = () => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2304: Cannot find name 'field1'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ====
|
||||
export var field1: string;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ====
|
||||
declare var console: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/cloduleSplitAcrossFiles_class.ts (0 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A mod
|
||||
==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ====
|
||||
module D {
|
||||
~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var y = "hi";
|
||||
}
|
||||
D.y;
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts (1 errors) ====
|
||||
// Non-ambient & instantiated module.
|
||||
module Moclodule {
|
||||
~~~~~~~~~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
export interface Someinterface {
|
||||
foo(): void;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts (2 errors) ====
|
||||
import require = require('collisionExportsRequireAndAlias_file1'); // Error
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
import exports = require('collisionExportsRequireAndAlias_file3333'); // Error
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
export function foo() {
|
||||
require.bar();
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts (2 errors) ====
|
||||
export class require {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
}
|
||||
export class exports {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
}
|
||||
module m1 {
|
||||
class require {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts (2 errors) ====
|
||||
export enum require { // Error
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
_thisVal1,
|
||||
_thisVal2,
|
||||
}
|
||||
export enum exports { // Error
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
_thisVal1,
|
||||
_thisVal2,
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndFunction.ts (2 errors) ====
|
||||
export function exports() {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
return 1;
|
||||
}
|
||||
export function require() {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
return "require";
|
||||
}
|
||||
module m1 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ====
|
||||
@@ -9,10 +9,10 @@ tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts(6,8): erro
|
||||
}
|
||||
import exports = m.c;
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
import require = m.c;
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
new exports();
|
||||
new require();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(1,15): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts (2 errors) ====
|
||||
export module require {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
export interface I {
|
||||
}
|
||||
export class C {
|
||||
@@ -16,7 +16,7 @@ tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts(10,15):
|
||||
}
|
||||
export module exports {
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
export interface I {
|
||||
}
|
||||
export class C {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
|
||||
|
||||
==== tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts (2 errors) ====
|
||||
@@ -7,10 +7,10 @@ tests/cases/compiler/collisionExportsRequireAndVar_externalmodule.ts(4,5): error
|
||||
}
|
||||
var exports = 1;
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
|
||||
var require = "require";
|
||||
~~~~~~~
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module.
|
||||
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
|
||||
module m1 {
|
||||
var exports = 0;
|
||||
var require = "require";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find external module './foo'.
|
||||
tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi
|
||||
|
||||
import foo = require('./foo');
|
||||
~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './foo'.
|
||||
!!! error TS2307: Cannot find module './foo'.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find external module './foo'.
|
||||
tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/commentOnImportStatement2.ts (1 errors) ====
|
||||
/* not copyright */
|
||||
import foo = require('./foo');
|
||||
~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './foo'.
|
||||
!!! error TS2307: Cannot find module './foo'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find external module './foo'.
|
||||
tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/commentOnImportStatement3.ts (1 errors) ====
|
||||
@@ -7,4 +7,4 @@ tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot fi
|
||||
/* not copyright */
|
||||
import foo = require('./foo');
|
||||
~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './foo'.
|
||||
!!! error TS2307: Cannot find module './foo'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3,10): error TS2331: 'this' cannot be referenced in a module body.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3,10): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts (1 errors) ====
|
||||
@@ -6,6 +6,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts(3,
|
||||
var obj = {
|
||||
[this.bar]: 0
|
||||
~~~~
|
||||
!!! error TS2331: 'this' cannot be referenced in a module body.
|
||||
!!! error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3,10): error TS2331: 'this' cannot be referenced in a module body.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3,10): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts (1 errors) ====
|
||||
@@ -6,6 +6,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts(3,
|
||||
var obj = {
|
||||
[this.bar]: 0
|
||||
~~~~
|
||||
!!! error TS2331: 'this' cannot be referenced in a module body.
|
||||
!!! error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
tests/cases/compiler/constDeclarations_access_2.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead.
|
||||
tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
|
||||
tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
|
||||
@@ -20,7 +20,7 @@ tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The oper
|
||||
tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/constDeclarations_access_2.ts (19 errors) ====
|
||||
///<reference path='constDeclarations_access_1.ts'/>
|
||||
import m = require('constDeclarations_access_1');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find external module './greeter'.
|
||||
tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter'.
|
||||
tests/cases/compiler/copyrightWithNewLine1.ts(6,10): error TS2304: Cannot find name 'document'.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(6,10): error TS2304: Cannot find n
|
||||
|
||||
import model = require("./greeter")
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './greeter'.
|
||||
!!! error TS2307: Cannot find module './greeter'.
|
||||
var el = document.getElementById('content');
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'document'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find external module './greeter'.
|
||||
tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter'.
|
||||
tests/cases/compiler/copyrightWithoutNewLine1.ts(5,10): error TS2304: Cannot find name 'document'.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(5,10): error TS2304: Cannot fin
|
||||
****************************/
|
||||
import model = require("./greeter")
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module './greeter'.
|
||||
!!! error TS2307: Cannot find module './greeter'.
|
||||
var el = document.getElementById('content');
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'document'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10): error TS2331: 'this' cannot be referenced in a module body.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts (1 errors) ====
|
||||
@@ -8,7 +8,7 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts(5,10
|
||||
|
||||
@this.decorator
|
||||
~~~~
|
||||
!!! error TS2331: 'this' cannot be referenced in a module body.
|
||||
!!! error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
method() { }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'export='.
|
||||
tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'export='.
|
||||
tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'export='.
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id
|
||||
var y = 20;
|
||||
export = x;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'export='.
|
||||
export = y;
|
||||
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(43,16): error TS2395: Ind
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(44,9): error TS2395: Individual declarations in merged declaration w must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(45,16): error TS2395: Individual declarations in merged declaration w must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2395: Individual declarations in merged declaration F must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(52,21): error TS2395: Individual declarations in merged declaration F must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(56,11): error TS2395: Individual declarations in merged declaration C must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(57,12): error TS2395: Individual declarations in merged declaration C must be all exported or all local.
|
||||
@@ -91,7 +91,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(65,18): error TS2395: Ind
|
||||
~
|
||||
!!! error TS2395: Individual declarations in merged declaration F must be all exported or all local.
|
||||
~
|
||||
!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
var t;
|
||||
}
|
||||
export function F() { } // Only one error for duplicate identifier (don't consider visibility)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (8 errors) ====
|
||||
@@ -33,27 +33,27 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Expor
|
||||
// Reexports
|
||||
export {M_V as v};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_I as i};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_C as c};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_M as m};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_MU as mu};
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_F as f};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_E as e};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_A as a};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts (1 errors) ====
|
||||
export class A
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
{
|
||||
constructor ()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6-amd.ts (0 errors) ====
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6-declaration-amd.ts (0 errors) ====
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6-sourcemap-amd.ts (0 errors) ====
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6-umd.ts (0 errors) ====
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6-umd2.ts (0 errors) ====
|
||||
|
||||
export class A
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
tests/cases/compiler/main.ts(15,1): error TS2304: Cannot find name 'z1'.
|
||||
tests/cases/compiler/main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'.
|
||||
tests/cases/compiler/main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'.
|
||||
tests/cases/compiler/main.ts(27,8): error TS1192: External module '"interface"' has no default export.
|
||||
tests/cases/compiler/main.ts(28,8): error TS1192: External module '"variable"' has no default export.
|
||||
tests/cases/compiler/main.ts(29,8): error TS1192: External module '"interface-variable"' has no default export.
|
||||
tests/cases/compiler/main.ts(30,8): error TS1192: External module '"module"' has no default export.
|
||||
tests/cases/compiler/main.ts(31,8): error TS1192: External module '"interface-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(32,8): error TS1192: External module '"variable-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(33,8): error TS1192: External module '"function"' has no default export.
|
||||
tests/cases/compiler/main.ts(34,8): error TS1192: External module '"function-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(35,8): error TS1192: External module '"class"' has no default export.
|
||||
tests/cases/compiler/main.ts(36,8): error TS1192: External module '"class-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(39,21): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(45,21): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(47,21): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(62,25): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(68,25): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(70,25): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(85,25): error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(91,25): error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(93,25): error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(97,15): error TS2498: External module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(98,15): error TS2498: External module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(99,15): error TS2498: External module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(100,15): error TS2498: External module '"module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(101,15): error TS2498: External module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(102,15): error TS2498: External module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(103,15): error TS2498: External module '"function"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(104,15): error TS2498: External module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(105,15): error TS2498: External module '"class"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(27,8): error TS1192: Module '"interface"' has no default export.
|
||||
tests/cases/compiler/main.ts(28,8): error TS1192: Module '"variable"' has no default export.
|
||||
tests/cases/compiler/main.ts(29,8): error TS1192: Module '"interface-variable"' has no default export.
|
||||
tests/cases/compiler/main.ts(30,8): error TS1192: Module '"module"' has no default export.
|
||||
tests/cases/compiler/main.ts(31,8): error TS1192: Module '"interface-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(32,8): error TS1192: Module '"variable-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(33,8): error TS1192: Module '"function"' has no default export.
|
||||
tests/cases/compiler/main.ts(34,8): error TS1192: Module '"function-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(35,8): error TS1192: Module '"class"' has no default export.
|
||||
tests/cases/compiler/main.ts(36,8): error TS1192: Module '"class-module"' has no default export.
|
||||
tests/cases/compiler/main.ts(39,21): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(45,21): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(47,21): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(62,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(68,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(70,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(85,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(91,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(93,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
tests/cases/compiler/main.ts(97,15): error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(98,15): error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(99,15): error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(100,15): error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(101,15): error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(102,15): error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(103,15): error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(104,15): error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(105,15): error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'.
|
||||
tests/cases/compiler/main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/main.ts (32 errors) ====
|
||||
@@ -67,39 +67,39 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
// default import
|
||||
import x1 from "interface";
|
||||
~~
|
||||
!!! error TS1192: External module '"interface"' has no default export.
|
||||
!!! error TS1192: Module '"interface"' has no default export.
|
||||
import x2 from "variable";
|
||||
~~
|
||||
!!! error TS1192: External module '"variable"' has no default export.
|
||||
!!! error TS1192: Module '"variable"' has no default export.
|
||||
import x3 from "interface-variable";
|
||||
~~
|
||||
!!! error TS1192: External module '"interface-variable"' has no default export.
|
||||
!!! error TS1192: Module '"interface-variable"' has no default export.
|
||||
import x4 from "module";
|
||||
~~
|
||||
!!! error TS1192: External module '"module"' has no default export.
|
||||
!!! error TS1192: Module '"module"' has no default export.
|
||||
import x5 from "interface-module";
|
||||
~~
|
||||
!!! error TS1192: External module '"interface-module"' has no default export.
|
||||
!!! error TS1192: Module '"interface-module"' has no default export.
|
||||
import x6 from "variable-module";
|
||||
~~
|
||||
!!! error TS1192: External module '"variable-module"' has no default export.
|
||||
!!! error TS1192: Module '"variable-module"' has no default export.
|
||||
import x7 from "function";
|
||||
~~
|
||||
!!! error TS1192: External module '"function"' has no default export.
|
||||
!!! error TS1192: Module '"function"' has no default export.
|
||||
import x8 from "function-module";
|
||||
~~
|
||||
!!! error TS1192: External module '"function-module"' has no default export.
|
||||
!!! error TS1192: Module '"function-module"' has no default export.
|
||||
import x9 from "class";
|
||||
~~
|
||||
!!! error TS1192: External module '"class"' has no default export.
|
||||
!!! error TS1192: Module '"class"' has no default export.
|
||||
import x0 from "class-module";
|
||||
~~
|
||||
!!! error TS1192: External module '"class-module"' has no default export.
|
||||
!!! error TS1192: Module '"class-module"' has no default export.
|
||||
|
||||
// namespace import
|
||||
import * as y1 from "interface";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import * as y2 from "variable";
|
||||
import * as y3 from "interface-variable";
|
||||
import * as y4 from "module";
|
||||
@@ -107,11 +107,11 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
import * as y6 from "variable-module";
|
||||
import * as y7 from "function";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import * as y8 from "function-module";
|
||||
import * as y9 from "class";
|
||||
~~~~~~~
|
||||
!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import * as y0 from "class-module";
|
||||
|
||||
y1.a;
|
||||
@@ -128,7 +128,7 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
// named import
|
||||
import { a as a1 } from "interface";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import { a as a2 } from "variable";
|
||||
import { a as a3 } from "interface-variable";
|
||||
import { a as a4 } from "module";
|
||||
@@ -136,11 +136,11 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
import { a as a6 } from "variable-module";
|
||||
import { a as a7 } from "function";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import { a as a8 } from "function-module";
|
||||
import { a as a9 } from "class";
|
||||
~~~~~~~
|
||||
!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
import { a as a0 } from "class-module";
|
||||
|
||||
a1;
|
||||
@@ -157,7 +157,7 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
// named export
|
||||
export { a as a1 } from "interface";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2497: External module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
export { a as a2 } from "variable";
|
||||
export { a as a3 } from "interface-variable";
|
||||
export { a as a4 } from "module";
|
||||
@@ -165,44 +165,44 @@ tests/cases/compiler/main.ts(106,15): error TS2498: External module '"class-modu
|
||||
export { a as a6 } from "variable-module";
|
||||
export { a as a7 } from "function";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2497: External module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
export { a as a8 } from "function-module";
|
||||
export { a as a9 } from "class";
|
||||
~~~~~~~
|
||||
!!! error TS2497: External module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
||||
export { a as a0 } from "class-module";
|
||||
|
||||
// export-star
|
||||
export * from "interface";
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "variable";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2498: External module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "interface-variable";
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "module";
|
||||
~~~~~~~~
|
||||
!!! error TS2498: External module '"module"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "interface-module";
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "variable-module";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "function";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2498: External module '"function"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "function-module";
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "class";
|
||||
~~~~~~~
|
||||
!!! error TS2498: External module '"class"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'.
|
||||
export * from "class-module";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2498: External module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
!!! error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
||||
|
||||
==== tests/cases/compiler/modules.d.ts (0 errors) ====
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport_0.ts (0 errors) ====
|
||||
|
||||
export var a = 10;
|
||||
|
||||
+12
-12
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(2,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(4,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(6,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(9,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(11,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(1,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(2,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(4,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(6,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(9,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(11,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/server.ts (0 errors) ====
|
||||
@@ -18,26 +18,26 @@ tests/cases/compiler/client.ts(11,8): error TS1192: External module '"tests/case
|
||||
==== tests/cases/compiler/client.ts (6 errors) ====
|
||||
import defaultBinding1, { } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
import defaultBinding2, { a } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x1 = new a();
|
||||
import defaultBinding3, { a11 as b } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x2 = new b();
|
||||
import defaultBinding4, { x, a12 as y } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x4 = new x();
|
||||
export var x5 = new y();
|
||||
import defaultBinding5, { x11 as z, } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x3 = new z();
|
||||
import defaultBinding6, { m, } from "server";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x6 = new m();
|
||||
|
||||
+12
-12
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(2,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(4,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(6,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(9,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(2,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(4,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(6,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(9,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0.ts (0 errors) ====
|
||||
@@ -15,26 +15,26 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts (6 errors) ====
|
||||
import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
var x1: number = a;
|
||||
import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
var x1: number = b;
|
||||
import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
var x1: number = x;
|
||||
var x1: number = y;
|
||||
import defaultBinding5, { x as z, } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
var x1: number = z;
|
||||
import defaultBinding6, { m, } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export.
|
||||
var x1: number = m;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0.ts (0 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts(1,
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_1.ts (1 errors) ====
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding_0"' has no default export.
|
||||
var x: number = nameSpaceBinding.a;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(1,8): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/server.ts (0 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/client.ts(1,8): error TS1192: External module '"tests/cases
|
||||
==== tests/cases/compiler/client.ts (1 errors) ====
|
||||
import defaultBinding, * as nameSpaceBinding from "server";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x = new nameSpaceBinding.a();
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.ts (0 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.ts (1 errors) ====
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0"' has no default export.
|
||||
var x: number = nameSpaceBinding.a;
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/client.ts(1,1): error TS1191: An import declaration cannot have modifiers.
|
||||
tests/cases/compiler/client.ts(1,15): error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
tests/cases/compiler/client.ts(1,15): error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/server.ts (0 errors) ====
|
||||
@@ -11,5 +11,5 @@ tests/cases/compiler/client.ts(1,15): error TS1192: External module '"tests/case
|
||||
~~~~~~
|
||||
!!! error TS1191: An import declaration cannot have modifiers.
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/server"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/server"' has no default export.
|
||||
export var x: number = nameSpaceBinding.a;
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingInEs5_0.ts (0 errors) ====
|
||||
@@ -9,4 +9,4 @@ tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1192: Exter
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingInEs5_1.ts (1 errors) ====
|
||||
import defaultBinding from "es6ImportDefaultBindingInEs5_0";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingInEs5_0"' has no default export.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0.ts (0 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts(1,8): error T
|
||||
==== tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_1.ts (1 errors) ====
|
||||
import defaultBinding from "es6ImportDefaultBindingNoDefaultProperty_0";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty_0"' has no default export.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ImportNameSpaceImport_0.ts (0 errors) ====
|
||||
|
||||
export var a = 10;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ImportNamedImport_0.ts (0 errors) ====
|
||||
|
||||
export var a = 10;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS2300: Duplicate identifier 'yield'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,23): error TS2307: Cannot find external module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,23): error TS2307: Cannot find module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,10): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,10): error TS2300: Duplicate identifier 'default'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,25): error TS2307: Cannot find external module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,25): error TS2307: Cannot find module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,19): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,19): error TS2300: Duplicate identifier 'default'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find external module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS2300: Duplicate identifier 'yield'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,34): error TS2307: Cannot find external module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,34): error TS2307: Cannot find module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,21): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,21): error TS2300: Duplicate identifier 'default'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS2307: Cannot find external module 'somemodule'.
|
||||
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS2307: Cannot find module 'somemodule'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts (13 errors) ====
|
||||
@@ -19,30 +19,30 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(6,36): error TS23
|
||||
~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'yield'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'somemodule'.
|
||||
!!! error TS2307: Cannot find module 'somemodule'.
|
||||
import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier
|
||||
~~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'default'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'somemodule'.
|
||||
!!! error TS2307: Cannot find module 'somemodule'.
|
||||
import { yield as default } from "somemodule"; // error to use default as binding name
|
||||
~~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'default'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'somemodule'.
|
||||
!!! error TS2307: Cannot find module 'somemodule'.
|
||||
import { default as yield } from "somemodule"; // no error
|
||||
~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'yield'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'somemodule'.
|
||||
!!! error TS2307: Cannot find module 'somemodule'.
|
||||
import { default as default } from "somemodule"; // default as is ok, error of default binding name
|
||||
~~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'default'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'somemodule'.
|
||||
!!! error TS2307: Cannot find module 'somemodule'.
|
||||
@@ -1,8 +1,8 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
tests/cases/compiler/es6ImportNamedImportInExportAssignment_1.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ImportNamedImportInExportAssignment_0.ts (0 errors) ====
|
||||
|
||||
export var a = 10;
|
||||
|
||||
@@ -3,7 +3,7 @@ tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,10): error TS1141:
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,12): error TS1109: Expression expected.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,14): error TS2304: Cannot find name 'from'.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(1,19): error TS1005: ';' expected.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,8): error TS1192: External module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,8): error TS1192: Module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(2,24): error TS1005: '{' expected.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(3,8): error TS1128: Declaration or statement expected.
|
||||
@@ -34,7 +34,7 @@ tests/cases/compiler/es6ImportNamedImportParsingError_1.ts(4,20): error TS1005:
|
||||
!!! error TS1005: ';' expected.
|
||||
import defaultBinding, from "es6ImportNamedImportParsingError_0";
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/compiler/es6ImportNamedImportParsingError_0"' has no default export.
|
||||
~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
import , { a } from "es6ImportNamedImportParsingError_0";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(23,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(24,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(25,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(26,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(27,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ModuleInternalNamedImports.ts (8 errors) ====
|
||||
@@ -33,27 +33,27 @@ tests/cases/compiler/es6ModuleInternalNamedImports.ts(30,5): error TS1194: Expor
|
||||
// Reexports
|
||||
export {M_V as v};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_I as i};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_C as c};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_M as m};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_MU as mu};
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_F as f};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_E as e};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_A as a};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(25,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(26,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(27,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(28,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(29,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(30,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Export declarations are not permitted in an internal module.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(25,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(26,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(27,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(28,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(29,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(30,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Export declarations are not permitted in a namespace.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ModuleInternalNamedImports2.ts (8 errors) ====
|
||||
@@ -35,27 +35,27 @@ tests/cases/compiler/es6ModuleInternalNamedImports2.ts(32,5): error TS1194: Expo
|
||||
// Reexports
|
||||
export {M_V as v};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_I as i};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_C as c};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_M as m};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_MU as mu};
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_F as f};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_E as e};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
export {M_A as a};
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1194: Export declarations are not permitted in an internal module.
|
||||
!!! error TS1194: Export declarations are not permitted in a namespace.
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ModuleWithModuleGenTargetAmd.ts (0 errors) ====
|
||||
export class A
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
|
||||
|
||||
!!! error TS1204: Cannot compile external modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
!!! error TS1204: Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher.
|
||||
==== tests/cases/compiler/es6ModuleWithModuleGenTargetCommonjs.ts (0 errors) ====
|
||||
export class A
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
@@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
export function x(){
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
export function x(){
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo3.ts(1,16): error TS9003: 'class' expressions are not currently supported.
|
||||
tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected.
|
||||
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression
|
||||
var x = 10;
|
||||
export = typeof x; // Ok
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
export = "sausages"; // Ok
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/consumer.ts (0 errors) ====
|
||||
@@ -27,7 +27,7 @@ tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot
|
||||
var x = "test";
|
||||
export = x;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ====
|
||||
var x = 42;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
@@ -12,5 +12,5 @@ tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compi
|
||||
}
|
||||
export = M1;
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compi
|
||||
var x: I1 = {a: "test", b: 42};
|
||||
export = x; // Should fail, I1 not exported.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ====
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module
|
||||
==== tests/cases/conformance/es6/modules/main.ts (1 errors) ====
|
||||
import hello, { x, y, z, foo } from "./t4";
|
||||
~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
hello;
|
||||
x;
|
||||
y;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/modules/t1.ts (0 errors) ====
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/main.ts(1,8): error TS1192: External module
|
||||
==== tests/cases/conformance/es6/modules/main.ts (1 errors) ====
|
||||
import hello, { x, y, z, foo } from "./t4";
|
||||
~~~~~
|
||||
!!! error TS1192: External module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
!!! error TS1192: Module '"tests/cases/conformance/es6/modules/t4"' has no default export.
|
||||
hello;
|
||||
x;
|
||||
y;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/exportStarFromEmptyModule_module3.ts(1,15): error TS2306: File 'tests/cases/compiler/exportStarFromEmptyModule_module2.ts' is not an external module.
|
||||
tests/cases/compiler/exportStarFromEmptyModule_module3.ts(1,15): error TS2306: File 'tests/cases/compiler/exportStarFromEmptyModule_module2.ts' is not a module.
|
||||
tests/cases/compiler/exportStarFromEmptyModule_module4.ts(4,5): error TS2339: Property 'r' does not exist on type 'typeof A'.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ tests/cases/compiler/exportStarFromEmptyModule_module4.ts(4,5): error TS2339: Pr
|
||||
==== tests/cases/compiler/exportStarFromEmptyModule_module3.ts (1 errors) ====
|
||||
export * from "exportStarFromEmptyModule_module2";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2306: File 'exportStarFromEmptyModule_module2.ts' is not an external module.
|
||||
!!! error TS2306: File 'exportStarFromEmptyModule_module2.ts' is not a module.
|
||||
export * from "exportStarFromEmptyModule_module1";
|
||||
|
||||
export class A {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148:
|
||||
// Not on line 0 because we want to verify the error is placed in the appropriate location.
|
||||
export module M {
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
|
||||
|
||||
==== tests/cases/compiler/funduleSplitAcrossFiles_function.ts (0 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A mod
|
||||
==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ====
|
||||
module D {
|
||||
~
|
||||
!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
export var y = "hi";
|
||||
}
|
||||
D.y;
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
|
||||
Property 'length' is missing in type 'ObservableArray<T>'.
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'Obse
|
||||
==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ====
|
||||
export declare class ObservableArray<T> implements Array<T> { // MS.Entertainment.ObservableArray
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
|
||||
!!! error TS2420: Property 'length' is missing in type 'ObservableArray<T>'.
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts (0 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(
|
||||
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ====
|
||||
export module m {
|
||||
~
|
||||
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
export function foo() { }
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user