Skip to content

Commit a85c277

Browse files
Merge branch 'master' into binderSimplification3
Conflicts: src/compiler/binder.ts
2 parents 31932e1 + ea2c9e8 commit a85c277

2,093 files changed

Lines changed: 69116 additions & 21811 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.

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.js linguist-language=TypeScript
1+
*.js linguist-language=TypeScript
2+
* -text

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tests/services/baselines/local/*
2121
tests/baselines/prototyping/local/*
2222
tests/baselines/rwc/*
2323
tests/baselines/test262/*
24+
tests/baselines/reference/projectOutput/*
2425
tests/baselines/local/projectOutput/*
2526
tests/services/baselines/prototyping/local/*
2627
tests/services/browser/typescriptServices.js
@@ -46,3 +47,5 @@ scripts/*.js.map
4647
coverage/
4748
internal/
4849
**/.DS_Store
50+
.settings/*
51+
!.settings/tasks.json

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ scripts
44
src
55
tests
66
Jakefile
7-
.travis.yml
7+
.travis.yml
8+
.settings/

.settings/tasks.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Available variables which can be used inside of strings.
2+
// ${workspaceRoot}: the root folder of the team
3+
// ${file}: the current opened file
4+
// ${fileBasename}: the current opened file's basename
5+
// ${fileDirname}: the current opened file's dirname
6+
// ${fileExtname}: the current opened file's extension
7+
// ${cwd}: the current working directory of the spawned process
8+
{
9+
"version": "0.1.0",
10+
"command": "jake",
11+
"isShellCommand": true,
12+
"showOutput": "silent",
13+
"tasks": [
14+
{
15+
"taskName": "local",
16+
"isBuildCommand": true,
17+
"showOutput": "silent",
18+
"problemMatcher": [
19+
"$tsc"
20+
]
21+
}
22+
]
23+
}

Jakefile renamed to Jakefile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ var harnessSources = [
123123
return path.join(harnessDirectory, f);
124124
}).concat([
125125
"incrementalParser.ts",
126+
"jsDocParsing.ts",
126127
"services/colorization.ts",
127128
"services/documentRegistry.ts",
128129
"services/preProcessFile.ts",
129130
"services/patternMatcher.ts",
130-
"versionCache.ts"
131+
"versionCache.ts",
132+
"convertToBase64.ts"
131133
].map(function (f) {
132134
return path.join(unittestsDirectory, f);
133135
})).concat([

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript)
66

77
# TypeScript
8+
9+
[![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
810

911
[TypeScript](http://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](http://www.typescriptlang.org/Playground), and stay up to date via [our blog](http://blogs.msdn.com/typescript) and [twitter account](https://twitter.com/typescriptlang).
1012

@@ -29,7 +31,7 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
2931

3032
## Building
3133

32-
In order to build the TypeScript compiler, ensure that you have [Git](http://git-scm.com/downloads) and [Node.js](http://nodejs.org/) installed.
34+
In order to build the TypeScript compiler, ensure that you have [Git](http://git-scm.com/downloads) and [Node.js](http://nodejs.org/) installed. Note that you need to have autocrlf off as we track whitespace changes (`git config --global core.autocrlf false`).
3335

3436
Clone a copy of the repo:
3537

bin/lib.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ interface Math {
561561
*/
562562
atan(x: number): number;
563563
/**
564-
* Returns the angle (in radians) from the X axis to a point (y,x).
564+
* Returns the angle (in radians) from the X axis to a point.
565565
* @param y A numeric expression representing the cartesian y-coordinate.
566566
* @param x A numeric expression representing the cartesian x-coordinate.
567567
*/

bin/lib.core.es6.d.ts

Lines changed: 61 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ interface Math {
561561
*/
562562
atan(x: number): number;
563563
/**
564-
* Returns the angle (in radians) from the X axis to a point (y,x).
564+
* Returns the angle (in radians) from the X axis to a point.
565565
* @param y A numeric expression representing the cartesian y-coordinate.
566566
* @param x A numeric expression representing the cartesian x-coordinate.
567567
*/
@@ -1237,11 +1237,41 @@ interface SymbolConstructor {
12371237
isConcatSpreadable: symbol;
12381238

12391239
/**
1240-
* A method that returns the default iterator for an object.Called by the semantics of the
1240+
* A method that returns the default iterator for an object. Called by the semantics of the
12411241
* for-of statement.
12421242
*/
12431243
iterator: symbol;
12441244

1245+
/**
1246+
* A regular expression method that matches the regular expression against a string. Called
1247+
* by the String.prototype.match method.
1248+
*/
1249+
match: symbol;
1250+
1251+
/**
1252+
* A regular expression method that replaces matched substrings of a string. Called by the
1253+
* String.prototype.replace method.
1254+
*/
1255+
replace: symbol;
1256+
1257+
/**
1258+
* A regular expression method that returns the index within a string that matches the
1259+
* regular expression. Called by the String.prototype.search method.
1260+
*/
1261+
search: symbol;
1262+
1263+
/**
1264+
* A function valued property that is the constructor function that is used to create
1265+
* derived objects.
1266+
*/
1267+
species: symbol;
1268+
1269+
/**
1270+
* A regular expression method that splits a string at the indices that match the regular
1271+
* expression. Called by the String.prototype.split method.
1272+
*/
1273+
split: symbol;
1274+
12451275
/**
12461276
* A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
12471277
* abstract operation.
@@ -1472,6 +1502,11 @@ interface Array<T> {
14721502
copyWithin(target: number, start: number, end?: number): T[];
14731503
}
14741504

1505+
interface IArguments {
1506+
/** Iterator */
1507+
[Symbol.iterator](): IterableIterator<any>;
1508+
}
1509+
14751510
interface ArrayConstructor {
14761511
/**
14771512
* Creates an array from an array-like object.
@@ -1628,7 +1663,7 @@ interface IteratorResult<T> {
16281663
}
16291664

16301665
interface Iterator<T> {
1631-
next(): IteratorResult<T>;
1666+
next(value?: any): IteratorResult<T>;
16321667
return?(value?: any): IteratorResult<T>;
16331668
throw?(e?: any): IteratorResult<T>;
16341669
}
@@ -1656,14 +1691,6 @@ interface GeneratorFunctionConstructor {
16561691
}
16571692
declare var GeneratorFunction: GeneratorFunctionConstructor;
16581693

1659-
interface Generator<T> extends IterableIterator<T> {
1660-
next(value?: any): IteratorResult<T>;
1661-
throw(exception: any): IteratorResult<T>;
1662-
return(value: T): IteratorResult<T>;
1663-
[Symbol.iterator](): Generator<T>;
1664-
[Symbol.toStringTag]: string;
1665-
}
1666-
16671694
interface Math {
16681695
/**
16691696
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
@@ -4728,6 +4755,17 @@ declare module Reflect {
47284755
function setPrototypeOf(target: any, proto: any): boolean;
47294756
}
47304757

4758+
interface PromiseLike<T> {
4759+
/**
4760+
* Attaches callbacks for the resolution and/or rejection of the Promise.
4761+
* @param onfulfilled The callback to execute when the Promise is resolved.
4762+
* @param onrejected The callback to execute when the Promise is rejected.
4763+
* @returns A Promise for the completion of which ever callback is executed.
4764+
*/
4765+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
4766+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
4767+
}
4768+
47314769
/**
47324770
* Represents the completion of an asynchronous operation
47334771
*/
@@ -4738,14 +4776,17 @@ interface Promise<T> {
47384776
* @param onrejected The callback to execute when the Promise is rejected.
47394777
* @returns A Promise for the completion of which ever callback is executed.
47404778
*/
4741-
then<TResult>(onfulfilled?: (value: T) => TResult | Promise<TResult>, onrejected?: (reason: any) => TResult | Promise<TResult>): Promise<TResult>;
4779+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
4780+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
47424781

47434782
/**
47444783
* Attaches a callback for only the rejection of the Promise.
47454784
* @param onrejected The callback to execute when the Promise is rejected.
47464785
* @returns A Promise for the completion of the callback.
47474786
*/
4748-
catch(onrejected?: (reason: any) => T | Promise<T>): Promise<T>;
4787+
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
4788+
4789+
[Symbol.toStringTag]: string;
47494790
}
47504791

47514792
interface PromiseConstructor {
@@ -4756,37 +4797,27 @@ interface PromiseConstructor {
47564797

47574798
/**
47584799
* Creates a new Promise.
4759-
* @param init A callback used to initialize the promise. This callback is passed two arguments:
4800+
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
47604801
* a resolve callback used resolve the promise with a value or the result of another promise,
47614802
* and a reject callback used to reject the promise with a provided reason or error.
47624803
*/
4763-
new <T>(init: (resolve: (value?: T | Promise<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
4764-
4765-
<T>(init: (resolve: (value?: T | Promise<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
4804+
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
47664805

47674806
/**
47684807
* Creates a Promise that is resolved with an array of results when all of the provided Promises
47694808
* resolve, or rejected when any Promise is rejected.
47704809
* @param values An array of Promises.
47714810
* @returns A new Promise.
47724811
*/
4773-
all<T>(values: (T | Promise<T>)[]): Promise<T[]>;
4774-
4775-
/**
4776-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
4777-
* resolve, or rejected when any Promise is rejected.
4778-
* @param values An array of values.
4779-
* @returns A new Promise.
4780-
*/
4781-
all(values: Promise<void>[]): Promise<void>;
4812+
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
47824813

47834814
/**
47844815
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
47854816
* or rejected.
47864817
* @param values An array of Promises.
47874818
* @returns A new Promise.
47884819
*/
4789-
race<T>(values: (T | Promise<T>)[]): Promise<T>;
4820+
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
47904821

47914822
/**
47924823
* Creates a new rejected promise for the provided reason.
@@ -4807,13 +4838,15 @@ interface PromiseConstructor {
48074838
* @param value A promise.
48084839
* @returns A promise whose internal state matches the provided promise.
48094840
*/
4810-
resolve<T>(value: T | Promise<T>): Promise<T>;
4841+
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
48114842

48124843
/**
48134844
* Creates a new resolved promise .
48144845
* @returns A resolved promise.
48154846
*/
48164847
resolve(): Promise<void>;
4848+
4849+
[Symbol.species]: Function;
48174850
}
48184851

48194852
declare var Promise: PromiseConstructor;

0 commit comments

Comments
 (0)