Skip to content

Commit 8a04815

Browse files
authored
Merge branch 'master' into add-codefix-cannot-find-name-in-for-loop
2 parents 1fd2371 + a9c5a04 commit 8a04815

File tree

1,254 files changed

+47654
-174080
lines changed

Some content is hidden

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

1,254 files changed

+47654
-174080
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please fill in the *entire* template below.
1616
-->
1717

1818
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
19-
**TypeScript Version:** 3.2.0-dev.201xxxxx
19+
**TypeScript Version:** 3.3.0-dev.201xxxxx
2020

2121
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
2222
**Search Terms:**

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ matrix:
1616
branches:
1717
only:
1818
- master
19-
- release-2.7
20-
- release-2.8
21-
- release-2.9
22-
- release-3.0
23-
- release-3.1
19+
- /^release-.*/
2420

2521
install:
2622
- npm uninstall typescript --no-save

CONTRIBUTING.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,26 @@ Your pull request should:
8282
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
8383

8484
## Contributing `lib.d.ts` fixes
85-
86-
The library sources are in: [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib)
8785

88-
Library files in `built/local/` are updated by running
89-
```Shell
86+
There are three relevant locations to be aware of when it comes to TypeScript's library declaration files:
87+
88+
* `src/lib`: the location of the sources themselves.
89+
* `lib`: the location of the last-known-good (LKG) versions of the files which are updated periodically.
90+
* `built/local`: the build output location, including where `src/lib` files will be copied to.
91+
92+
Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib). **Most** of these files can be updated by hand, with the exception of any generated files (see below).
93+
94+
Library files in `built/local/` are updated automatically by running the standard build task:
95+
96+
```sh
9097
jake
9198
```
9299

93-
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
100+
The files in `lib/` are used to bootstrap compilation and usually **should not** be updated unless publishing a new version or updating the LKG.
94101

95-
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
102+
### Modifying generated library files
96103

97-
These two files represent the DOM typings and are auto-generated. To make any modifications to them, please submit a PR to https://github.com/Microsoft/TSJS-lib-generator
104+
The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` both represent type declarations for the DOM and are auto-generated. To make any modifications to them, you will have to direct changes to https://github.com/Microsoft/TSJS-lib-generator
98105

99106
## Running the Tests
100107

Gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ const generatedLCGFile = "built/local/enu/diagnosticMessages.generated.json.lcg"
117117
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
118118
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
119119
*/
120-
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"]
120+
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]
121+
.map(f => f.toLowerCase())
121122
.map(f => `built/local/${f}/diagnosticMessages.generated.json`)
122123
.concat(generatedLCGFile);
123124

Jakefile.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ else if (process.env.PATH !== undefined) {
2424

2525
const host = process.env.TYPESCRIPT_HOST || process.env.host || "node";
2626

27-
const locales = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"];
28-
2927
const defaultTestTimeout = 40000;
3028

3129
let useDebugMode = true;
@@ -709,19 +707,6 @@ const Travis = {
709707
}
710708
};
711709

712-
function buildLocalizedTargets() {
713-
/**
714-
* The localization target produces the two following transformations:
715-
* 1. 'src\loc\lcl\<locale>\diagnosticMessages.generated.json.lcl' => 'built\local\<locale>\diagnosticMessages.generated.json'
716-
* convert localized resources into a .json file the compiler can understand
717-
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
718-
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
719-
*/
720-
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]
721-
.map(f => path.join(Paths.builtLocal,f))
722-
.concat(path.dirname(Paths.generatedLCGFile));
723-
}
724-
725710
function toNs(diff) {
726711
return diff[0] * 1e9 + diff[1];
727712
}

completionAtDottedNamespace.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
////namespace wwer./**/w
4+
5+
verify.completions({ marker: "", exact: [], isNewIdentifierLocation: true });

lib/enu/diagnosticMessages.generated.json.lcg

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,21 @@
5151
</Str>
5252
<Disp Icon="Str" />
5353
</Item>
54-
<Item ItemId=";A_class_declaration_without_the_default_modifier_must_have_a_name_1211" ItemType="0" PsrId="306" Leaf="true">
54+
<Item ItemId=";A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422" ItemType="0" PsrId="306" Leaf="true">
5555
<Str Cat="Text">
56-
<Val><![CDATA[A class declaration without the 'default' modifier must have a name.]]></Val>
56+
<Val><![CDATA[A class can only implement an object type or intersection of object types with statically known members.]]></Val>
5757
</Str>
5858
<Disp Icon="Str" />
5959
</Item>
60-
<Item ItemId=";A_class_may_only_extend_another_class_2311" ItemType="0" PsrId="306" Leaf="true">
60+
<Item ItemId=";A_class_declaration_without_the_default_modifier_must_have_a_name_1211" ItemType="0" PsrId="306" Leaf="true">
6161
<Str Cat="Text">
62-
<Val><![CDATA[A class may only extend another class.]]></Val>
62+
<Val><![CDATA[A class declaration without the 'default' modifier must have a name.]]></Val>
6363
</Str>
6464
<Disp Icon="Str" />
6565
</Item>
66-
<Item ItemId=";A_class_may_only_implement_another_class_or_interface_2422" ItemType="0" PsrId="306" Leaf="true">
66+
<Item ItemId=";A_class_may_only_extend_another_class_2311" ItemType="0" PsrId="306" Leaf="true">
6767
<Str Cat="Text">
68-
<Val><![CDATA[A class may only implement another class or interface.]]></Val>
68+
<Val><![CDATA[A class may only extend another class.]]></Val>
6969
</Str>
7070
<Disp Icon="Str" />
7171
</Item>
@@ -693,6 +693,18 @@
693693
</Str>
694694
<Disp Icon="Str" />
695695
</Item>
696+
<Item ItemId=";Add_missing_new_operator_to_all_calls_95072" ItemType="0" PsrId="306" Leaf="true">
697+
<Str Cat="Text">
698+
<Val><![CDATA[Add missing 'new' operator to all calls]]></Val>
699+
</Str>
700+
<Disp Icon="Str" />
701+
</Item>
702+
<Item ItemId=";Add_missing_new_operator_to_call_95071" ItemType="0" PsrId="306" Leaf="true">
703+
<Str Cat="Text">
704+
<Val><![CDATA[Add missing 'new' operator to call]]></Val>
705+
</Str>
706+
<Disp Icon="Str" />
707+
</Item>
696708
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
697709
<Str Cat="Text">
698710
<Val><![CDATA[Add missing 'super()' call]]></Val>
@@ -705,12 +717,24 @@
705717
</Str>
706718
<Disp Icon="Str" />
707719
</Item>
720+
<Item ItemId=";Add_names_to_all_parameters_without_names_95073" ItemType="0" PsrId="306" Leaf="true">
721+
<Str Cat="Text">
722+
<Val><![CDATA[Add names to all parameters without names]]></Val>
723+
</Str>
724+
<Disp Icon="Str" />
725+
</Item>
708726
<Item ItemId=";Add_or_remove_braces_in_an_arrow_function_95058" ItemType="0" PsrId="306" Leaf="true">
709727
<Str Cat="Text">
710728
<Val><![CDATA[Add or remove braces in an arrow function]]></Val>
711729
</Str>
712730
<Disp Icon="Str" />
713731
</Item>
732+
<Item ItemId=";Add_parameter_name_90034" ItemType="0" PsrId="306" Leaf="true">
733+
<Str Cat="Text">
734+
<Val><![CDATA[Add parameter name]]></Val>
735+
</Str>
736+
<Disp Icon="Str" />
737+
</Item>
714738
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
715739
<Str Cat="Text">
716740
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1077,9 +1101,9 @@
10771101
</Str>
10781102
<Disp Icon="Str" />
10791103
</Item>
1080-
<Item ItemId=";An_interface_may_only_extend_a_class_or_another_interface_2312" ItemType="0" PsrId="306" Leaf="true">
1104+
<Item ItemId=";An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312" ItemType="0" PsrId="306" Leaf="true">
10811105
<Str Cat="Text">
1082-
<Val><![CDATA[An interface may only extend a class or another interface.]]></Val>
1106+
<Val><![CDATA[An interface can only extend an object type or intersection of object types with statically known members.]]></Val>
10831107
</Str>
10841108
<Disp Icon="Str" />
10851109
</Item>
@@ -1209,9 +1233,9 @@
12091233
</Str>
12101234
<Disp Icon="Str" />
12111235
</Item>
1212-
<Item ItemId=";Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509" ItemType="0" PsrId="306" Leaf="true">
1236+
<Item ItemId=";Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509" ItemType="0" PsrId="306" Leaf="true">
12131237
<Str Cat="Text">
1214-
<Val><![CDATA[Base constructor return type '{0}' is not a class or interface type.]]></Val>
1238+
<Val><![CDATA[Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.]]></Val>
12151239
</Str>
12161240
<Disp Icon="Str" />
12171241
</Item>
@@ -1317,9 +1341,15 @@
13171341
</Str>
13181342
<Disp Icon="Str" />
13191343
</Item>
1320-
<Item ItemId=";Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540" ItemType="0" PsrId="306" Leaf="true">
1344+
<Item ItemId=";Cannot_assign_to_0_because_it_is_a_constant_2588" ItemType="0" PsrId="306" Leaf="true">
1345+
<Str Cat="Text">
1346+
<Val><![CDATA[Cannot assign to '{0}' because it is a constant.]]></Val>
1347+
</Str>
1348+
<Disp Icon="Str" />
1349+
</Item>
1350+
<Item ItemId=";Cannot_assign_to_0_because_it_is_a_read_only_property_2540" ItemType="0" PsrId="306" Leaf="true">
13211351
<Str Cat="Text">
1322-
<Val><![CDATA[Cannot assign to '{0}' because it is a constant or a read-only property.]]></Val>
1352+
<Val><![CDATA[Cannot assign to '{0}' because it is a read-only property.]]></Val>
13231353
</Str>
13241354
<Disp Icon="Str" />
13251355
</Item>
@@ -4299,6 +4329,12 @@
42994329
</Str>
43004330
<Disp Icon="Str" />
43014331
</Item>
4332+
<Item ItemId=";Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051" ItemType="0" PsrId="306" Leaf="true">
4333+
<Str Cat="Text">
4334+
<Val><![CDATA[Parameter has a name but no type. Did you mean '{0}: {1}'?]]></Val>
4335+
</Str>
4336+
<Disp Icon="Str" />
4337+
</Item>
43024338
<Item ItemId=";Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036" ItemType="0" PsrId="306" Leaf="true">
43034339
<Str Cat="Text">
43044340
<Val><![CDATA[Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.]]></Val>
@@ -5541,6 +5577,12 @@
55415577
</Str>
55425578
<Disp Icon="Str" />
55435579
</Item>
5580+
<Item ItemId=";The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742" ItemType="0" PsrId="306" Leaf="true">
5581+
<Str Cat="Text">
5582+
<Val><![CDATA[The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.]]></Val>
5583+
</Str>
5584+
<Disp Icon="Str" />
5585+
</Item>
55445586
<Item ItemId=";The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527" ItemType="0" PsrId="306" Leaf="true">
55455587
<Str Cat="Text">
55465588
<Val><![CDATA[The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.]]></Val>

0 commit comments

Comments
 (0)