Skip to content

Commit 40f0de8

Browse files
Merge branch 'master' into javascriptLanguageservice
Conflicts: src/services/services.ts
2 parents 1b06677 + 9141bfc commit 40f0de8

573 files changed

Lines changed: 14139 additions & 3504 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Jakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var compilerSources = [
3939
"utilities.ts",
4040
"binder.ts",
4141
"checker.ts",
42+
"declarationEmitter.ts",
4243
"emitter.ts",
4344
"program.ts",
4445
"commandLineParser.ts",
@@ -57,6 +58,7 @@ var servicesSources = [
5758
"utilities.ts",
5859
"binder.ts",
5960
"checker.ts",
61+
"declarationEmitter.ts",
6062
"emitter.ts",
6163
"program.ts",
6264
"commandLineParser.ts",
@@ -65,7 +67,7 @@ var servicesSources = [
6567
return path.join(compilerDirectory, f);
6668
}).concat([
6769
"breakpoints.ts",
68-
"navigateTo.ts",
70+
"navigateTo.ts",
6971
"navigationBar.ts",
7072
"outliningElementsCollector.ts",
7173
"patternMatcher.ts",
@@ -539,7 +541,7 @@ function cleanTestDirs() {
539541
}
540542

541543
jake.mkdirP(localRwcBaseline);
542-
jake.mkdirP(localTest262Baseline);
544+
jake.mkdirP(localTest262Baseline);
543545
jake.mkdirP(localBaseline);
544546
}
545547

@@ -718,7 +720,7 @@ file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function() {
718720

719721
var instrumenterPath = harnessDirectory + 'instrumenter.ts';
720722
var instrumenterJsPath = builtLocalDirectory + 'instrumenter.js';
721-
compileFile(instrumenterJsPath, [instrumenterPath], [tscFile, instrumenterPath], [], /*useBuiltCompiler*/ true);
723+
compileFile(instrumenterJsPath, [instrumenterPath], [tscFile, instrumenterPath].concat(libraryTargets), [], /*useBuiltCompiler*/ true);
722724

723725
desc("Builds an instrumented tsc.js");
724726
task('tsc-instrumented', [loggedIOJsPath, instrumenterJsPath, tscFile], function() {

scripts/processDiagnosticMessages.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, nameMap:
6565
' ' + convertPropertyName(nameMap[name]) +
6666
': { code: ' + diagnosticDetails.code +
6767
', category: DiagnosticCategory.' + diagnosticDetails.category +
68-
', key: "' + name.replace('"', '\\"') + '"' +
69-
(diagnosticDetails.isEarly ? ', isEarly: true' : '') +
68+
', key: "' + name.replace(/[\"]/g, '\\"') + '"' +
7069
' },\r\n';
7170
}
7271

src/compiler/checker.ts

Lines changed: 137 additions & 36 deletions
Large diffs are not rendered by default.

src/compiler/core.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ module ts {
122122
}
123123

124124
export function addRange<T>(to: T[], from: T[]): void {
125-
for (let v of from) {
126-
to.push(v);
125+
if (to && from) {
126+
for (let v of from) {
127+
to.push(v);
128+
}
127129
}
128130
}
129131

src/compiler/declarationEmitter.ts

Lines changed: 1466 additions & 0 deletions
Large diffs are not rendered by default.

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ module ts {
159159
Unterminated_Unicode_escape_sequence: { code: 1199, category: DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." },
160160
Line_terminator_not_permitted_before_arrow: { code: 1200, category: DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." },
161161
A_type_annotation_on_an_export_statement_is_only_allowed_in_an_ambient_external_module_declaration: { code: 1201, category: DiagnosticCategory.Error, key: "A type annotation on an export statement is only allowed in an ambient external module declaration." },
162+
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." },
163+
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." },
164+
Cannot_compile_external_modules_into_amd_or_commonjs_when_targeting_es6_or_higher: { code: 1204, category: DiagnosticCategory.Error, key: "Cannot compile external modules into amd or commonjs when targeting es6 or higher." },
162165
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
163166
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." },
164167
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
@@ -341,7 +344,8 @@ module ts {
341344
Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" },
342345
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
343346
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." },
344-
Type_0_is_not_an_array_type_or_a_string_type: { code: 2461, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." },
347+
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." },
348+
The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 2496, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." },
345349
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
346350
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
347351
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -411,6 +415,7 @@ module ts {
411415
Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
412416
Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." },
413417
Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: DiagnosticCategory.Error, key: "Exported type alias '{0}' has or is using private name '{1}'." },
418+
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: DiagnosticCategory.Error, key: "Default export of the module has or is using private name '{0}'." },
414419
Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: DiagnosticCategory.Error, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." },
415420
The_current_host_does_not_support_the_0_option: { code: 5001, category: DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." },
416421
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." },
@@ -503,6 +508,5 @@ module ts {
503508
type_assertion_expressions_can_only_be_used_in_TypeScript: { code: 8016, category: DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in TypeScript." },
504509
yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." },
505510
Generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "Generators are not currently supported." },
506-
The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." },
507511
};
508512
}

src/compiler/diagnosticMessages.json

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,18 @@
627627
"category": "Error",
628628
"code": 1201
629629
},
630+
"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.": {
631+
"category": "Error",
632+
"code": 1202
633+
},
634+
"Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead.": {
635+
"category": "Error",
636+
"code": 1203
637+
},
638+
"Cannot compile external modules into amd or commonjs when targeting es6 or higher.": {
639+
"category": "Error",
640+
"code": 1204
641+
},
630642

631643
"Duplicate identifier '{0}'.": {
632644
"category": "Error",
@@ -1358,7 +1370,11 @@
13581370
},
13591371
"Type '{0}' is not an array type or a string type.": {
13601372
"category": "Error",
1361-
"code": 2461
1373+
"code": 2495
1374+
},
1375+
"The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.": {
1376+
"category": "Error",
1377+
"code": 2496
13621378
},
13631379

13641380
"Import declaration '{0}' is using private name '{1}'.": {
@@ -1637,6 +1653,10 @@
16371653
"category": "Error",
16381654
"code": 4081
16391655
},
1656+
"Default export of the module has or is using private name '{0}'.": {
1657+
"category": "Error",
1658+
"code": 4082
1659+
},
16401660
"Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher.": {
16411661
"category": "Error",
16421662
"code": 4091
@@ -2006,9 +2026,5 @@
20062026
"Generators are not currently supported.": {
20072027
"category": "Error",
20082028
"code": 9001
2009-
},
2010-
"The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.": {
2011-
"category": "Error",
2012-
"code": 9002
20132029
}
20142030
}

0 commit comments

Comments
 (0)