Skip to content

Commit 001b7b5

Browse files
committed
Merge pull request #2 from Microsoft/master
fetch latest code
2 parents bf8812e + 33bfd92 commit 001b7b5

File tree

4,598 files changed

+158729
-33927
lines changed

Some content is hidden

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

4,598 files changed

+158729
-33927
lines changed

Jakefile.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,6 @@ var serverCoreSources = [
108108
return path.join(serverDirectory, f);
109109
});
110110

111-
var scriptSources = [
112-
"tslint/booleanTriviaRule.ts",
113-
"tslint/nextLineRule.ts",
114-
"tslint/noNullRule.ts",
115-
"tslint/preferConstRule.ts",
116-
"tslint/typeOperatorSpacingRule.ts",
117-
"tslint/noInOperatorRule.ts"
118-
].map(function (f) {
119-
return path.join(scriptsDirectory, f);
120-
});
121-
122111
var serverSources = serverCoreSources.concat(servicesSources);
123112

124113
var languageServiceLibrarySources = [
@@ -544,7 +533,8 @@ compileFile(word2mdJs,
544533
// The generated spec.md; built for the 'generate-spec' task
545534
file(specMd, [word2mdJs, specWord], function () {
546535
var specWordFullPath = path.resolve(specWord);
547-
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + specMd;
536+
var specMDFullPath = path.resolve(specMd);
537+
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + '"' + specMDFullPath + '"';
548538
console.log(cmd);
549539
child_process.exec(cmd, function () {
550540
complete();
@@ -877,7 +867,8 @@ var tslintRules = ([
877867
"preferConstRule",
878868
"booleanTriviaRule",
879869
"typeOperatorSpacingRule",
880-
"noInOperatorRule"
870+
"noInOperatorRule",
871+
"noIncrementDecrementRule"
881872
]);
882873
var tslintRulesFiles = tslintRules.map(function(p) {
883874
return path.join(tslintRuleDir, p + ".ts");
@@ -920,10 +911,20 @@ function lintFileAsync(options, path, cb) {
920911
});
921912
}
922913

914+
var servicesLintTargets = [
915+
"navigateTo.ts",
916+
"outliningElementsCollector.ts",
917+
"patternMatcher.ts",
918+
"services.ts",
919+
"shims.ts",
920+
].map(function (s) {
921+
return path.join(servicesDirectory, s);
922+
});
923923
var lintTargets = compilerSources
924924
.concat(harnessCoreSources)
925925
.concat(serverCoreSources)
926-
.concat(scriptSources);
926+
.concat(tslintRulesFiles)
927+
.concat(servicesLintTargets);
927928

928929
desc("Runs tslint on the compiler sources");
929930
task("lint", ["build-rules"], function() {

doc/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This directory contains miscellaneous documentation such as the TypeScript language specification and logo.
2+
If you are looking for more introductory material, you might want to take a look at the [TypeScript Handbook](https://github.com/Microsoft/TypeScript-Handbook).
3+
4+
# Spec Contributions
5+
6+
The specification is first authored as a Microsoft Word (docx) file and then generated into Markdown and PDF formats.
7+
Due to the binary format of docx files, and the merging difficulties that may come with it, it is preferred that any suggestions or problems found in the spec should be [filed as issues](https://github.com/Microsoft/TypeScript/issues/new) rather than sent as pull requests.
Binary file not shown.
Binary file not shown.
5.14 KB
Binary file not shown.
58 KB
Binary file not shown.

doc/images/image1.png

11.4 KB
Loading

doc/images/image2.png

10 KB
Loading

doc/images/image3.png

5.86 KB
Loading

doc/images/image4.png

15.7 KB
Loading

doc/spec.md

+208-110
Large diffs are not rendered by default.

lib/lib.core.es6.d.ts

+31-13
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)