Skip to content

Commit e69976c

Browse files
committed
Merge branch 'master' of https://github.com/Microsoft/TypeScript into typedefForJsdoc
# Conflicts: # src/services/utilities.ts
2 parents 81ce532 + 0a623f8 commit e69976c

File tree

129 files changed

+3009
-1666
lines changed

Some content is hidden

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

129 files changed

+3009
-1666
lines changed

Jakefile.js

+27-22
Original file line numberDiff line numberDiff line change
@@ -726,24 +726,40 @@ function runConsoleTests(defaultReporter, defaultSubsets) {
726726
subsetRegexes = subsets.map(function (sub) { return "^" + sub + ".*$"; });
727727
subsetRegexes.push("^(?!" + subsets.join("|") + ").*$");
728728
}
729+
var counter = subsetRegexes.length;
730+
var errorStatus;
729731
subsetRegexes.forEach(function (subsetRegex, i) {
730732
tests = subsetRegex ? ' -g "' + subsetRegex + '"' : '';
731733
var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
732734
console.log(cmd);
733-
function finish() {
735+
function finish(status) {
736+
counter--;
737+
// save first error status
738+
if (status !== undefined && errorStatus === undefined) {
739+
errorStatus = status;
740+
}
741+
734742
deleteTemporaryProjectOutput();
735-
complete();
743+
if (counter !== 0 || errorStatus === undefined) {
744+
// run linter when last worker is finished
745+
if (lintFlag && counter === 0) {
746+
var lint = jake.Task['lint'];
747+
lint.addListener('complete', function () {
748+
complete();
749+
});
750+
lint.invoke();
751+
}
752+
complete();
753+
}
754+
else {
755+
fail("Process exited with code " + status);
756+
}
736757
}
737758
exec(cmd, function () {
738-
if (lintFlag && i === 0) {
739-
var lint = jake.Task['lint'];
740-
lint.addListener('complete', function () {
741-
complete();
742-
});
743-
lint.invoke();
744-
}
745759
finish();
746-
}, finish);
760+
}, function(e, status) {
761+
finish(status);
762+
});
747763
});
748764
}
749765

@@ -962,24 +978,13 @@ function lintFileAsync(options, path, cb) {
962978
});
963979
}
964980

965-
var servicesLintTargets = [
966-
"navigateTo.ts",
967-
"navigationBar.ts",
968-
"outliningElementsCollector.ts",
969-
"patternMatcher.ts",
970-
"services.ts",
971-
"shims.ts",
972-
"jsTyping.ts"
973-
].map(function (s) {
974-
return path.join(servicesDirectory, s);
975-
});
976981
var lintTargets = compilerSources
977982
.concat(harnessSources)
978983
// Other harness sources
979984
.concat(["instrumenter.ts"].map(function(f) { return path.join(harnessDirectory, f) }))
980985
.concat(serverCoreSources)
981986
.concat(tslintRulesFiles)
982-
.concat(servicesLintTargets);
987+
.concat(servicesSources);
983988

984989

985990
desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex");

lib/lib.d.ts

+4-20
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

lib/lib.es5.d.ts

+4-20
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

lib/lib.es6.d.ts

+4-20
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

0 commit comments

Comments
 (0)