Merge remote-tracking branch 'ms/master'
This commit is contained in:
commit
8c95bf3cd7
|
@ -56,13 +56,13 @@ function updateTsFile(tsFilePath: string, tsFileContents: string, majorMinor: st
|
||||||
const majorMinorRgx = /export const versionMajorMinor = "(\d+\.\d+)"/;
|
const majorMinorRgx = /export const versionMajorMinor = "(\d+\.\d+)"/;
|
||||||
const majorMinorMatch = majorMinorRgx.exec(tsFileContents);
|
const majorMinorMatch = majorMinorRgx.exec(tsFileContents);
|
||||||
assert(majorMinorMatch !== null, `The file seems to no longer have a string matching '${majorMinorRgx}'.`);
|
assert(majorMinorMatch !== null, `The file seems to no longer have a string matching '${majorMinorRgx}'.`);
|
||||||
const parsedMajorMinor = majorMinorMatch[1];
|
const parsedMajorMinor = majorMinorMatch![1];
|
||||||
assert(parsedMajorMinor === majorMinor, `versionMajorMinor does not match. ${tsFilePath}: '${parsedMajorMinor}'; package.json: '${majorMinor}'`);
|
assert(parsedMajorMinor === majorMinor, `versionMajorMinor does not match. ${tsFilePath}: '${parsedMajorMinor}'; package.json: '${majorMinor}'`);
|
||||||
|
|
||||||
const versionRgx = /export const version = `\$\{versionMajorMinor\}\.(\d)(-dev)?`;/;
|
const versionRgx = /export const version = `\$\{versionMajorMinor\}\.(\d)(-dev)?`;/;
|
||||||
const patchMatch = versionRgx.exec(tsFileContents);
|
const patchMatch = versionRgx.exec(tsFileContents);
|
||||||
assert(patchMatch !== null, "The file seems to no longer have a string matching " + versionRgx.toString());
|
assert(patchMatch !== null, "The file seems to no longer have a string matching " + versionRgx.toString());
|
||||||
const parsedPatch = patchMatch[1];
|
const parsedPatch = patchMatch![1];
|
||||||
if (parsedPatch !== patch) {
|
if (parsedPatch !== patch) {
|
||||||
throw new Error(`patch does not match. ${tsFilePath}: '${parsedPatch}; package.json: '${patch}'`);
|
throw new Error(`patch does not match. ${tsFilePath}: '${parsedPatch}; package.json: '${patch}'`);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ function parsePackageJsonVersion(versionString: string): { majorMinor: string, p
|
||||||
const versionRgx = /(\d+\.\d+)\.(\d+)($|\-)/;
|
const versionRgx = /(\d+\.\d+)\.(\d+)($|\-)/;
|
||||||
const match = versionString.match(versionRgx);
|
const match = versionString.match(versionRgx);
|
||||||
assert(match !== null, "package.json 'version' should match " + versionRgx.toString());
|
assert(match !== null, "package.json 'version' should match " + versionRgx.toString());
|
||||||
return { majorMinor: match[1], patch: match[2] };
|
return { majorMinor: match![1], patch: match![2] };
|
||||||
}
|
}
|
||||||
|
|
||||||
/** e.g. 0-dev.20170707 */
|
/** e.g. 0-dev.20170707 */
|
||||||
|
|
|
@ -24153,6 +24153,16 @@ namespace ts {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name cannot be used as 'Object' of user defined types with special target.
|
||||||
|
*/
|
||||||
|
function checkClassNameCollisionWithObject(name: Identifier): void {
|
||||||
|
if (languageVersion === ScriptTarget.ES5 && name.escapedText === "Object"
|
||||||
|
&& moduleKind !== ModuleKind.ES2015 && moduleKind !== ModuleKind.ESNext) {
|
||||||
|
error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); // https://github.com/Microsoft/TypeScript/issues/17494
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check each type parameter and check that type parameters have no duplicate type parameter declarations
|
* Check each type parameter and check that type parameters have no duplicate type parameter declarations
|
||||||
*/
|
*/
|
||||||
|
@ -24279,6 +24289,9 @@ namespace ts {
|
||||||
checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0);
|
checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0);
|
||||||
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
|
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
|
||||||
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
|
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
|
||||||
|
if (!(node.flags & NodeFlags.Ambient)) {
|
||||||
|
checkClassNameCollisionWithObject(node.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
checkTypeParameters(getEffectiveTypeParameterDeclarations(node));
|
checkTypeParameters(getEffectiveTypeParameterDeclarations(node));
|
||||||
checkExportsOnMergedDeclarations(node);
|
checkExportsOnMergedDeclarations(node);
|
||||||
|
|
|
@ -2357,6 +2357,11 @@
|
||||||
"category": "Error",
|
"category": "Error",
|
||||||
"code": 2724
|
"code": 2724
|
||||||
},
|
},
|
||||||
|
"Class name cannot be 'Object' when targeting ES5 with module {0}.": {
|
||||||
|
"category": "Error",
|
||||||
|
"code": 2725
|
||||||
|
},
|
||||||
|
|
||||||
"Import declaration '{0}' is using private name '{1}'.": {
|
"Import declaration '{0}' is using private name '{1}'.": {
|
||||||
"category": "Error",
|
"category": "Error",
|
||||||
"code": 4000
|
"code": 4000
|
||||||
|
|
|
@ -1008,6 +1008,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Add missing 'typeof']]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[添加缺少的 "typeof"]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
||||||
|
@ -1125,6 +1134,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[All variables are unused.]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[所有变量均未使用。]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
||||||
|
@ -2538,6 +2556,12 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
||||||
|
@ -6564,6 +6588,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove all unused labels]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[删除所有未使用的标签]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||||
|
@ -6603,6 +6636,24 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove unused label]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[删除未使用的标签]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
|
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove variable statement]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[删除变量语句]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
||||||
|
|
|
@ -1017,6 +1017,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Add missing 'typeof']]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Přidat chybějící typeof]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
||||||
|
@ -1134,6 +1143,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[All variables are unused.]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Žádná z proměnných se nepoužívá.]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
||||||
|
@ -2547,6 +2565,12 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
||||||
|
@ -6573,6 +6597,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove all unused labels]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Odebrat všechny nepoužívané popisky]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||||
|
@ -6612,6 +6645,24 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove unused label]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Odebrat nepoužitý popisek]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
|
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove variable statement]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Odebrat příkaz proměnné]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
||||||
|
|
|
@ -1005,6 +1005,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Add missing 'typeof']]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Fehlenden "typeof" hinzufügen]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
||||||
|
@ -1122,6 +1131,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[All variables are unused.]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Alle Variablen werden nicht verwendet.]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
||||||
|
@ -2535,6 +2553,12 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
||||||
|
@ -6558,6 +6582,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove all unused labels]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Alle nicht verwendeten Bezeichnungen entfernen]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||||
|
@ -6597,6 +6630,24 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove unused label]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Nicht verwendete Bezeichnung entfernen]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
|
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove variable statement]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Variablenanweisung entfernen]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
||||||
|
|
|
@ -1019,10 +1019,13 @@
|
||||||
</Item>
|
</Item>
|
||||||
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Add missing typeof]]></Val>
|
<Val><![CDATA[Add missing 'typeof']]></Val>
|
||||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
<Val><![CDATA[Agregar el objeto typeof que falta]]></Val>
|
<Val><![CDATA[Agregar el elemento "typeof" que falta]]></Val>
|
||||||
</Tgt>
|
</Tgt>
|
||||||
|
<Prev Cat="Text">
|
||||||
|
<Val><![CDATA[Add missing typeof]]></Val>
|
||||||
|
</Prev>
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
@ -1143,6 +1146,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[All variables are unused.]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Todas las variables son no utilizadas.]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
||||||
|
@ -2556,6 +2568,12 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
||||||
|
@ -6585,6 +6603,9 @@
|
||||||
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove all unused labels]]></Val>
|
<Val><![CDATA[Remove all unused labels]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Quitar todas las etiquetas no utilizadas]]></Val>
|
||||||
|
</Tgt>
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
@ -6630,6 +6651,18 @@
|
||||||
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove unused label]]></Val>
|
<Val><![CDATA[Remove unused label]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Quitar etiqueta no utilizada]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
|
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove variable statement]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[Quitar la declaración de variable]]></Val>
|
||||||
|
</Tgt>
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
|
|
@ -1008,6 +1008,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Add missing 'typeof']]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[不足している 'typeof' を追加します]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
|
||||||
|
@ -1125,6 +1134,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[All variables are unused.]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[すべての変数は未使用です。]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
|
||||||
|
@ -2538,6 +2556,12 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
|
||||||
|
@ -6564,6 +6588,15 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove all unused labels]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[すべての未使用のラベルを削除します]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||||
|
@ -6603,6 +6636,24 @@
|
||||||
</Str>
|
</Str>
|
||||||
<Disp Icon="Str" />
|
<Disp Icon="Str" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove unused label]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[未使用のラベルを削除します]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
|
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||||
|
<Str Cat="Text">
|
||||||
|
<Val><![CDATA[Remove variable statement]]></Val>
|
||||||
|
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||||
|
<Val><![CDATA[変数のステートメントを削除します]]></Val>
|
||||||
|
</Tgt>
|
||||||
|
</Str>
|
||||||
|
<Disp Icon="Str" />
|
||||||
|
</Item>
|
||||||
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
|
||||||
<Str Cat="Text">
|
<Str Cat="Text">
|
||||||
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
<Val><![CDATA[Replace import with '{0}'.]]></Val>
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
namespace ts.server.typingsInstaller {
|
namespace ts.server.typingsInstaller {
|
||||||
const fs: {
|
const fs: {
|
||||||
appendFileSync(file: string, content: string): void;
|
appendFileSync(file: string, content: string): void
|
||||||
existsSync(path: string): boolean;
|
|
||||||
} = require("fs");
|
} = require("fs");
|
||||||
|
|
||||||
const path: {
|
const path: {
|
||||||
|
@ -33,12 +32,11 @@ namespace ts.server.typingsInstaller {
|
||||||
/** Used if `--npmLocation` is not passed. */
|
/** Used if `--npmLocation` is not passed. */
|
||||||
function getDefaultNPMLocation(processName: string) {
|
function getDefaultNPMLocation(processName: string) {
|
||||||
if (path.basename(processName).indexOf("node") === 0) {
|
if (path.basename(processName).indexOf("node") === 0) {
|
||||||
const npmPath = `"${path.join(path.dirname(process.argv[0]), "npm")}"`;
|
return `"${path.join(path.dirname(process.argv[0]), "npm")}"`;
|
||||||
if (fs.existsSync(npmPath)) {
|
}
|
||||||
return npmPath;
|
else {
|
||||||
}
|
return "npm";
|
||||||
}
|
}
|
||||||
return "npm";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TypesRegistryFile {
|
interface TypesRegistryFile {
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
//// [es6modulekindExportClassNameWithObject.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [es6modulekindExportClassNameWithObject.js]
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
export { Object };
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/es6/es6modulekindExportClassNameWithObject.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(es6modulekindExportClassNameWithObject.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/es6/es6modulekindExportClassNameWithObject.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
//// [exnextmodulekindExportClassNameWithObject.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exnextmodulekindExportClassNameWithObject.js]
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
export { Object };
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/esnext/exnextmodulekindExportClassNameWithObject.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exnextmodulekindExportClassNameWithObject.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/esnext/exnextmodulekindExportClassNameWithObject.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
//// [exportAmbientClassNameWithObject.ts]
|
||||||
|
export declare class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportAmbientClassNameWithObject.js]
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportAmbientClassNameWithObject.ts ===
|
||||||
|
export declare class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportAmbientClassNameWithObject.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportAmbientClassNameWithObject.ts ===
|
||||||
|
export declare class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
tests/cases/conformance/externalModules/exportClassNameWithObjectAMD.ts(1,14): error TS2725: Class name cannot be 'Object' when targeting ES5 with module AMD.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/conformance/externalModules/exportClassNameWithObjectAMD.ts (1 errors) ====
|
||||||
|
export class Object {}
|
||||||
|
~~~~~~
|
||||||
|
!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module AMD.
|
||||||
|
|
15
tests/baselines/reference/exportClassNameWithObjectAMD.js
Normal file
15
tests/baselines/reference/exportClassNameWithObjectAMD.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
//// [exportClassNameWithObjectAMD.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportClassNameWithObjectAMD.js]
|
||||||
|
define(["require", "exports"], function (require, exports) {
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
exports.Object = Object;
|
||||||
|
});
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectAMD.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportClassNameWithObjectAMD.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectAMD.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
tests/cases/conformance/externalModules/exportClassNameWithObjectCommonJS.ts(1,14): error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/conformance/externalModules/exportClassNameWithObjectCommonJS.ts (1 errors) ====
|
||||||
|
export class Object {}
|
||||||
|
~~~~~~
|
||||||
|
!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
//// [exportClassNameWithObjectCommonJS.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportClassNameWithObjectCommonJS.js]
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
exports.Object = Object;
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectCommonJS.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportClassNameWithObjectCommonJS.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectCommonJS.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
tests/cases/conformance/externalModules/exportClassNameWithObjectSystem.ts(1,14): error TS2725: Class name cannot be 'Object' when targeting ES5 with module System.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/conformance/externalModules/exportClassNameWithObjectSystem.ts (1 errors) ====
|
||||||
|
export class Object {}
|
||||||
|
~~~~~~
|
||||||
|
!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module System.
|
||||||
|
|
21
tests/baselines/reference/exportClassNameWithObjectSystem.js
Normal file
21
tests/baselines/reference/exportClassNameWithObjectSystem.js
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
//// [exportClassNameWithObjectSystem.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportClassNameWithObjectSystem.js]
|
||||||
|
System.register([], function (exports_1, context_1) {
|
||||||
|
"use strict";
|
||||||
|
var Object;
|
||||||
|
var __moduleName = context_1 && context_1.id;
|
||||||
|
return {
|
||||||
|
setters: [],
|
||||||
|
execute: function () {
|
||||||
|
Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
exports_1("Object", Object);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectSystem.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportClassNameWithObjectSystem.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectSystem.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
tests/cases/conformance/externalModules/exportClassNameWithObjectUMD.ts(1,14): error TS2725: Class name cannot be 'Object' when targeting ES5 with module UMD.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/conformance/externalModules/exportClassNameWithObjectUMD.ts (1 errors) ====
|
||||||
|
export class Object {}
|
||||||
|
~~~~~~
|
||||||
|
!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module UMD.
|
||||||
|
|
23
tests/baselines/reference/exportClassNameWithObjectUMD.js
Normal file
23
tests/baselines/reference/exportClassNameWithObjectUMD.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
//// [exportClassNameWithObjectUMD.ts]
|
||||||
|
export class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportClassNameWithObjectUMD.js]
|
||||||
|
(function (factory) {
|
||||||
|
if (typeof module === "object" && typeof module.exports === "object") {
|
||||||
|
var v = factory(require, exports);
|
||||||
|
if (v !== undefined) module.exports = v;
|
||||||
|
}
|
||||||
|
else if (typeof define === "function" && define.amd) {
|
||||||
|
define(["require", "exports"], factory);
|
||||||
|
}
|
||||||
|
})(function (require, exports) {
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
exports.Object = Object;
|
||||||
|
});
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectUMD.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportClassNameWithObjectUMD.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportClassNameWithObjectUMD.ts ===
|
||||||
|
export class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
tests/cases/conformance/externalModules/exportDefaultClassNameWithObject.ts(1,22): error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/conformance/externalModules/exportDefaultClassNameWithObject.ts (1 errors) ====
|
||||||
|
export default class Object {}
|
||||||
|
~~~~~~
|
||||||
|
!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
//// [exportDefaultClassNameWithObject.ts]
|
||||||
|
export default class Object {}
|
||||||
|
|
||||||
|
|
||||||
|
//// [exportDefaultClassNameWithObject.js]
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var Object = /** @class */ (function () {
|
||||||
|
function Object() {
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}());
|
||||||
|
exports.default = Object;
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportDefaultClassNameWithObject.ts ===
|
||||||
|
export default class Object {}
|
||||||
|
>Object : Symbol(Object, Decl(exportDefaultClassNameWithObject.ts, 0, 0))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
=== tests/cases/conformance/externalModules/exportDefaultClassNameWithObject.ts ===
|
||||||
|
export default class Object {}
|
||||||
|
>Object : Object
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: es2015
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: esnext
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,2 @@
|
||||||
|
// @target: ES5
|
||||||
|
export declare class Object {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: amd
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: commonjs
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: system
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// @target: ES5
|
||||||
|
// @module: umd
|
||||||
|
export class Object {}
|
|
@ -0,0 +1,2 @@
|
||||||
|
// @target: ES5
|
||||||
|
export default class Object {}
|
Loading…
Reference in a new issue