Skip to content

Commit 59a1afa

Browse files
Merge branch 'master' into theyreNotTHATSpecial
Conflicts: src/compiler/checker.ts
2 parents ae9a12b + 31bbac3 commit 59a1afa

File tree

775 files changed

+134290
-20682
lines changed

Some content is hidden

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

775 files changed

+134290
-20682
lines changed

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
# Instructions for Logging Issues
2+
3+
## 1. Read the FAQ
4+
5+
Please [read the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) before logging new issues, even if you think you have found a bug.
6+
7+
Issues that ask questions answered in the FAQ will be closed without elaboration.
8+
9+
## 2. Search for Duplicates
10+
11+
[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one.
12+
13+
## 3. Do you have a question?
14+
15+
The issue tracker is for **issues**, in other words, bugs and suggestions.
16+
If you have a *question*, please use [http://stackoverflow.com/questions/tagged/typescript](Stack Overflow), [https://gitter.im/Microsoft/TypeScript](Gitter), your favorite search engine, or other resources.
17+
Due to increased traffic, we can no longer answer questions in the issue tracker.
18+
19+
## 4. Did you find a bug?
20+
21+
When logging a bug, please be sure to include the following:
22+
* What version of TypeScript you're using (run `tsc --v`)
23+
* If at all possible, an *isolated* way to reproduce the behavior
24+
* The behavior you expect to see, and the actual behavior
25+
26+
You can try out the nightly build of TypeScript (`npm install typescript@next`) to see if the bug has already been fixed.
27+
28+
## 5. Do you have a suggestion?
29+
30+
We also accept suggestions in the issue tracker.
31+
Be sure to [check the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) and [search](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) first.
32+
33+
In general, things we find useful when reviewing suggestins are:
34+
* A description of the problem you're trying to solve
35+
* An overview of the suggested solution
36+
* Examples of how the suggestion would work in various places
37+
* Code examples showing e.g. "this would be an error, this wouldn't"
38+
* Code examples showing the generated JavaScript (if applicable)
39+
* If relevant, precedent in other languages can be useful for establishing context and expected behavior
40+
41+
# Instructions for Contributing Code
42+
143
## Contributing bug fixes
244

345
TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.

Jakefile.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ var harnessSources = harnessCoreSources.concat([
163163
}));
164164

165165
var librarySourceMap = [
166-
{ target: "lib.core.d.ts", sources: ["core.d.ts"] },
166+
{ target: "lib.core.d.ts", sources: ["header.d.ts", "core.d.ts"] },
167167
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "dom.generated.d.ts"], },
168168
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "webworker.generated.d.ts"], },
169169
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
170-
{ target: "lib.d.ts", sources: ["core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
171-
{ target: "lib.core.es6.d.ts", sources: ["core.d.ts", "es6.d.ts"]},
172-
{ target: "lib.es6.d.ts", sources: ["es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
170+
{ target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
171+
{ target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"]},
172+
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
173173
];
174174

175175
var libraryTargets = librarySourceMap.map(function (f) {
@@ -893,6 +893,7 @@ function getLinterOptions() {
893893

894894
function lintFileContents(options, path, contents) {
895895
var ll = new Linter(path, contents, options);
896+
console.log("Linting '" + path + "'.")
896897
return ll.lint();
897898
}
898899

lib/lib.core.es6.d.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,7 +3847,7 @@ interface Symbol {
38473847
/** Returns the primitive value of the specified object. */
38483848
valueOf(): Object;
38493849

3850-
[Symbol.toStringTag]: string;
3850+
[Symbol.toStringTag]: "Symbol";
38513851
}
38523852

38533853
interface SymbolConstructor {
@@ -4405,7 +4405,7 @@ interface IterableIterator<T> extends Iterator<T> {
44054405
}
44064406

44074407
interface GeneratorFunction extends Function {
4408-
4408+
[Symbol.toStringTag]: "GeneratorFunction";
44094409
}
44104410

44114411
interface GeneratorFunctionConstructor {
@@ -4530,7 +4530,7 @@ interface Math {
45304530
*/
45314531
cbrt(x: number): number;
45324532

4533-
[Symbol.toStringTag]: string;
4533+
[Symbol.toStringTag]: "Math";
45344534
}
45354535

45364536
interface Date {
@@ -4647,7 +4647,7 @@ interface Map<K, V> {
46474647
size: number;
46484648
values(): IterableIterator<V>;
46494649
[Symbol.iterator]():IterableIterator<[K,V]>;
4650-
[Symbol.toStringTag]: string;
4650+
[Symbol.toStringTag]: "Map";
46514651
}
46524652

46534653
interface MapConstructor {
@@ -4664,7 +4664,7 @@ interface WeakMap<K, V> {
46644664
get(key: K): V;
46654665
has(key: K): boolean;
46664666
set(key: K, value?: V): WeakMap<K, V>;
4667-
[Symbol.toStringTag]: string;
4667+
[Symbol.toStringTag]: "WeakMap";
46684668
}
46694669

46704670
interface WeakMapConstructor {
@@ -4686,7 +4686,7 @@ interface Set<T> {
46864686
size: number;
46874687
values(): IterableIterator<T>;
46884688
[Symbol.iterator]():IterableIterator<T>;
4689-
[Symbol.toStringTag]: string;
4689+
[Symbol.toStringTag]: "Set";
46904690
}
46914691

46924692
interface SetConstructor {
@@ -4702,7 +4702,7 @@ interface WeakSet<T> {
47024702
clear(): void;
47034703
delete(value: T): boolean;
47044704
has(value: T): boolean;
4705-
[Symbol.toStringTag]: string;
4705+
[Symbol.toStringTag]: "WeakSet";
47064706
}
47074707

47084708
interface WeakSetConstructor {
@@ -4714,7 +4714,7 @@ interface WeakSetConstructor {
47144714
declare var WeakSet: WeakSetConstructor;
47154715

47164716
interface JSON {
4717-
[Symbol.toStringTag]: string;
4717+
[Symbol.toStringTag]: "JSON";
47184718
}
47194719

47204720
/**
@@ -4724,11 +4724,11 @@ interface JSON {
47244724
* buffer as needed.
47254725
*/
47264726
interface ArrayBuffer {
4727-
[Symbol.toStringTag]: string;
4727+
[Symbol.toStringTag]: "ArrayBuffer";
47284728
}
47294729

47304730
interface DataView {
4731-
[Symbol.toStringTag]: string;
4731+
[Symbol.toStringTag]: "DataView";
47324732
}
47334733

47344734
/**
@@ -4749,6 +4749,7 @@ interface Int8Array {
47494749
*/
47504750
values(): IterableIterator<number>;
47514751
[Symbol.iterator](): IterableIterator<number>;
4752+
[Symbol.toStringTag]: "Int8Array";
47524753
}
47534754

47544755
interface Int8ArrayConstructor {
@@ -4781,6 +4782,7 @@ interface Uint8Array {
47814782
*/
47824783
values(): IterableIterator<number>;
47834784
[Symbol.iterator](): IterableIterator<number>;
4785+
[Symbol.toStringTag]: "UInt8Array";
47844786
}
47854787

47864788
interface Uint8ArrayConstructor {
@@ -4816,6 +4818,7 @@ interface Uint8ClampedArray {
48164818
values(): IterableIterator<number>;
48174819

48184820
[Symbol.iterator](): IterableIterator<number>;
4821+
[Symbol.toStringTag]: "Uint8ClampedArray";
48194822
}
48204823

48214824
interface Uint8ClampedArrayConstructor {
@@ -4853,6 +4856,7 @@ interface Int16Array {
48534856

48544857

48554858
[Symbol.iterator](): IterableIterator<number>;
4859+
[Symbol.toStringTag]: "Int16Array";
48564860
}
48574861

48584862
interface Int16ArrayConstructor {
@@ -4885,6 +4889,7 @@ interface Uint16Array {
48854889
*/
48864890
values(): IterableIterator<number>;
48874891
[Symbol.iterator](): IterableIterator<number>;
4892+
[Symbol.toStringTag]: "Uint16Array";
48884893
}
48894894

48904895
interface Uint16ArrayConstructor {
@@ -4917,6 +4922,7 @@ interface Int32Array {
49174922
*/
49184923
values(): IterableIterator<number>;
49194924
[Symbol.iterator](): IterableIterator<number>;
4925+
[Symbol.toStringTag]: "Int32Array";
49204926
}
49214927

49224928
interface Int32ArrayConstructor {
@@ -4949,6 +4955,7 @@ interface Uint32Array {
49494955
*/
49504956
values(): IterableIterator<number>;
49514957
[Symbol.iterator](): IterableIterator<number>;
4958+
[Symbol.toStringTag]: "Uint32Array";
49524959
}
49534960

49544961
interface Uint32ArrayConstructor {
@@ -4981,6 +4988,7 @@ interface Float32Array {
49814988
*/
49824989
values(): IterableIterator<number>;
49834990
[Symbol.iterator](): IterableIterator<number>;
4991+
[Symbol.toStringTag]: "Float32Array";
49844992
}
49854993

49864994
interface Float32ArrayConstructor {
@@ -5013,6 +5021,7 @@ interface Float64Array {
50135021
*/
50145022
values(): IterableIterator<number>;
50155023
[Symbol.iterator](): IterableIterator<number>;
5024+
[Symbol.toStringTag]: "Float64Array";
50165025
}
50175026

50185027
interface Float64ArrayConstructor {
@@ -5064,7 +5073,7 @@ declare namespace Reflect {
50645073
function isExtensible(target: any): boolean;
50655074
function ownKeys(target: any): Array<PropertyKey>;
50665075
function preventExtensions(target: any): boolean;
5067-
function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
5076+
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
50685077
function setPrototypeOf(target: any, proto: any): boolean;
50695078
}
50705079

@@ -5089,7 +5098,7 @@ interface Promise<T> {
50895098
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
50905099
catch(onrejected?: (reason: any) => void): Promise<T>;
50915100

5092-
[Symbol.toStringTag]: string;
5101+
[Symbol.toStringTag]: "Promise";
50935102
}
50945103

50955104
interface PromiseConstructor {
@@ -5112,7 +5121,16 @@ interface PromiseConstructor {
51125121
* @param values An array of Promises.
51135122
* @returns A new Promise.
51145123
*/
5115-
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
5124+
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
5125+
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
5126+
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
5127+
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
5128+
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
5129+
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
5130+
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
5131+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
5132+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
5133+
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
51165134

51175135
/**
51185136
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved

0 commit comments

Comments
 (0)