diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js
index 190285474a..2999c057ff 100644
--- a/_infrastructure/tests/runner.js
+++ b/_infrastructure/tests/runner.js
@@ -583,7 +583,11 @@ var DefinitelyTyped;
function Tsc() {
}
Tsc.run = function (tsfile, callback) {
- Exec.exec('node ./_infrastructure/tests/typescript/tsc.js --module commonjs ', [tsfile], function (ExecResult) {
+ var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs ';
+ if (IO.fileExists(tsfile + '.tscparams')) {
+ command += '@' + tsfile + '.tscparams';
+ }
+ Exec.exec(command, [tsfile], function (ExecResult) {
callback(ExecResult);
});
};
@@ -846,7 +850,7 @@ var DefinitelyTyped;
SyntaxChecking.prototype.run = function (it, file, len, maxLen, callback) {
var _this = this;
- if (!endsWith(file.toUpperCase(), '-TESTS.TS') && file.indexOf('../_infrastructure') < 0) {
+ if (!endsWith(file.toUpperCase(), '-TESTS.TS') && endsWith(file.toUpperCase(), '.TS') && file.indexOf('../_infrastructure') < 0) {
new Test(file).run(function (o) {
var failed = false;
diff --git a/_infrastructure/tests/runner.ts b/_infrastructure/tests/runner.ts
index 3c8f162108..e7bf929265 100644
--- a/_infrastructure/tests/runner.ts
+++ b/_infrastructure/tests/runner.ts
@@ -28,7 +28,11 @@ module DefinitelyTyped {
class Tsc {
public static run(tsfile: string, callback: Function) {
- Exec.exec('node ./_infrastructure/tests/typescript/tsc.js --module commonjs ', [tsfile], (ExecResult) => {
+ var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs ';
+ if (IO.fileExists(tsfile + '.tscparams')) {
+ command += '@' + tsfile + '.tscparams';
+ }
+ Exec.exec(command, [tsfile], (ExecResult) => {
callback(ExecResult);
});
}
@@ -292,7 +296,7 @@ module DefinitelyTyped {
}
private run(it, file, len, maxLen, callback: Function) {
- if (!endsWith(file.toUpperCase(), '-TESTS.TS') && file.indexOf('../_infrastructure') < 0) {
+ if (!endsWith(file.toUpperCase(), '-TESTS.TS') && endsWith(file.toUpperCase(), '.TS') && file.indexOf('../_infrastructure') < 0) {
new Test(file).run((o) => {
var failed = false;
diff --git a/backgrid/backgrid-tests.ts.tscparams b/backgrid/backgrid-tests.ts.tscparams
new file mode 100644
index 0000000000..e85b4ac55c
--- /dev/null
+++ b/backgrid/backgrid-tests.ts.tscparams
@@ -0,0 +1 @@
+--target ES5
\ No newline at end of file
diff --git a/cheerio/cheerio-tests.ts b/cheerio/cheerio-tests.ts
index 00cc95ee8b..71d54c5579 100644
--- a/cheerio/cheerio-tests.ts
+++ b/cheerio/cheerio-tests.ts
@@ -1,6 +1,6 @@
///
-import cheerio = module("cheerio");
+import cheerio = require("cheerio");
var $ = cheerio.load("");
var $el = $('selector');
diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts
index 120945550e..6ad4e34bc2 100644
--- a/jqueryui/jqueryui-tests.ts
+++ b/jqueryui/jqueryui-tests.ts
@@ -1089,7 +1089,7 @@ function test_datepicker() {
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
- $.datepicker.setDefaults($.datepicker.regional[""]);
+ $.datepicker.setDefaults($.datepicker.regional[""]);
$("#datepicker").datepicker($.datepicker.regional["fr"]);
$("#locale").change(function () {
$("#datepicker").datepicker("option",
@@ -1137,7 +1137,7 @@ function test_datepicker() {
$(".selector").datepicker({ dayNames: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] });
$(".selector").datepicker({ dayNamesMin: ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"] });
- $.datepicker.setDefaults($.datepicker.regional[""]);
+ $.datepicker.setDefaults($.datepicker.regional[""]);
$(".selector").datepicker($.datepicker.regional["fr"]);
}
diff --git a/logg/logg-tests.ts b/logg/logg-tests.ts
index 43c1524efe..3569d3caa3 100644
--- a/logg/logg-tests.ts
+++ b/logg/logg-tests.ts
@@ -1,6 +1,6 @@
///
-import logging = module("logg");
+import logging = require("logg");
var logger = logging.getLogger('my.class');
logger = logging.getTransientLogger('my.class');
diff --git a/modernizr/modernizr-tests.ts b/modernizr/modernizr-tests.ts
index 5b7016e126..abb1752934 100644
--- a/modernizr/modernizr-tests.ts
+++ b/modernizr/modernizr-tests.ts
@@ -2,7 +2,7 @@
declare var $: any;
-function alert(thing: any) {
+window.alert = function(thing?: string) {
$('#content').append('' + thing + '
');
}
@@ -15,7 +15,7 @@ $(function () {
if (Modernizr.webgl) {
// loadAllWebGLScripts();
} else {
- var msg = 'With a different browser you’ll get to see the WebGL experience here: get.webgl.org.';
+ var msg = 'With a different browser you’ll get to see the WebGL experience here: get.webgl.org.';
document.getElementById('#notice').innerHTML = msg;
}
diff --git a/msnodesql/msnodesql-tests.ts b/msnodesql/msnodesql-tests.ts
index c197baf9fd..3f05f29aa8 100644
--- a/msnodesql/msnodesql-tests.ts
+++ b/msnodesql/msnodesql-tests.ts
@@ -17,12 +17,12 @@ function test_streaming() {
function test_explicit() {
var conn_str = "Driver={SQL Server Native Client 11.0};Server={(localdb)\\v11.0};Database={DBName};Trusted_Connection={Yes};";
- sql.open(conn_str, function (err, conn) {
+ sql.open(conn_str, function (err?: Error, connection?: sql.Connection) {
if (err) {
console.log("Error opening the connection!");
return;
}
- conn.queryRaw("SELECT * FROM TestTable", function (err, results) {
+ connection.queryRaw("SELECT * FROM TestTable", function (err?: Error, results?: sql.QueryRawResult, more?: boolean) {
if (err) {
console.log("Error running query!");
return;
diff --git a/msnodesql/msnodesql.d.ts b/msnodesql/msnodesql.d.ts
index a9d008c43c..744db70f24 100644
--- a/msnodesql/msnodesql.d.ts
+++ b/msnodesql/msnodesql.d.ts
@@ -20,7 +20,7 @@ declare module "msnodesql" {
}
interface QueryCallback {
- (err?: Error, results?: any[], more?: boolean): void;
+ (err?: Error, results?: QueryRawResult, more?: boolean): void;
}
interface QueryRawCallback {
diff --git a/node_redis/node_redis-tests.ts b/node_redis/node_redis-tests.ts
index 1758f5eb53..4dcd432816 100644
--- a/node_redis/node_redis-tests.ts
+++ b/node_redis/node_redis-tests.ts
@@ -1802,7 +1802,7 @@ run_next_test = function run_next_test() {
test_count += 1;
tests[test_name]();
} else {
- console.log('\n completed \x1b[32m%d\x1b[0m tests in \x1b[33m%d\x1b[0m ms\n', test_count, new Date() - all_start);
+ console.log('\n completed \x1b[32m%d\x1b[0m tests in \x1b[33m%d\x1b[0m ms\n', test_count, Date.now() - all_start);
client.quit();
client2.quit();
}
diff --git a/phonegap/phonegap-tests.ts b/phonegap/phonegap-tests.ts
index 2eabf75b02..273551c11d 100644
--- a/phonegap/phonegap-tests.ts
+++ b/phonegap/phonegap-tests.ts
@@ -107,21 +107,21 @@ function test_capture() {
}
var options = { limit: 3, duration: 10 };
navigator.device.capture.captureAudio(captureSuccess, captureError, options);
- var captureSuccess = function (mediaFiles) {
+ function captureSuccess2(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
}
};
- var captureError = function (error) {
+ function captureError2(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
- navigator.device.capture.captureImage(captureSuccess, captureError, { limit: 2 });
+ navigator.device.capture.captureImage(captureSuccess2, captureError2, { limit: 2 });
function captureImage() {
- navigator.device.capture.captureImage(captureSuccess, captureError, { limit: 2 });
+ navigator.device.capture.captureImage(captureSuccess2, captureError2, { limit: 2 });
}
function captureVideo() {
- navigator.device.capture.captureVideo(captureSuccess, captureError, { limit: 2 });
+ navigator.device.capture.captureVideo(captureSuccess2, captureError2, { limit: 2 });
}
}
diff --git a/pouchDB/pouch-tests.ts b/pouchDB/pouch-tests.ts
index 46411b5ba2..8cca2ed710 100644
--- a/pouchDB/pouch-tests.ts
+++ b/pouchDB/pouch-tests.ts
@@ -2,7 +2,7 @@
declare var $: any;
-function alert(thing: any) {
+window.alert = function(thing?: string) {
$('body').append('' + thing + '
');
}
diff --git a/restify/restify-tests.ts b/restify/restify-tests.ts
index f54882965b..79a56f578c 100644
--- a/restify/restify-tests.ts
+++ b/restify/restify-tests.ts
@@ -1,6 +1,6 @@
///
-import restify = module("restify");
+import restify = require("restify");
var server = restify.createServer({
formatters: {
diff --git a/scroller/scroller-tests.ts b/scroller/scroller-tests.ts
index 941e05ff17..411ddab92c 100644
--- a/scroller/scroller-tests.ts
+++ b/scroller/scroller-tests.ts
@@ -41,7 +41,7 @@ function test_canvas() {
function test_domlist() {
var container = document.getElementById("container");
var content = document.getElementById("content");
- var refreshElem = content.getElementsByTagName("div")[0];
+ var refreshElem = content.getElementsByTagName("div")[0];
var scroller = new Scroller(render, {
scrollingX: false
});
diff --git a/sugar/sugar.d.ts b/sugar/sugar.d.ts
index e376400b63..98a5c7705e 100644
--- a/sugar/sugar.d.ts
+++ b/sugar/sugar.d.ts
@@ -77,7 +77,7 @@ interface String {
* 'jumpy'.at(-1) -> 'y'
* 'lucky charms'.at(2,4,6,8) -> ['u','k','y',c']
***/
- at(index: number, loop?: bool): string;
+ at(index: number, loop?: boolean): string;
/**
* @see at
@@ -96,7 +96,7 @@ interface String {
* 'moz-border-radius'.camelize() -> 'MozBorderRadius'
* 'moz-border-radius'.camelize(false) -> 'mozBorderRadius'
**/
- camelize(first?: bool): string;
+ camelize(first?: boolean): string;
/**
* Capitalizes the first character in the string.
@@ -111,7 +111,7 @@ interface String {
* 'hello kitty'.capitalize(true) -> 'Hello Kitty'
*
**/
- capitalize(all: bool): string;
+ capitalize(all: boolean): string;
/**
* Runs callback [fn] against each character in the string.
@@ -220,22 +220,22 @@ interface String {
* 'jumpy'.endsWith('MPY') -> false
* 'jumpy'.endsWith('MPY', false) -> true
**/
- endsWith(find: string, pos?: number, case_?: bool): bool;
+ endsWith(find: string, pos?: number, case_?: boolean): boolean;
/**
* @see endsWith
**/
- endsWith(find: string, case_?: bool): bool;
+ endsWith(find: string, case_?: boolean): boolean;
/**
* @see endsWith
**/
- endsWith(find: RegExp, pos?: number, case_?: bool): bool;
+ endsWith(find: RegExp, pos?: number, case_?: boolean): boolean;
/**
* @see endsWith
**/
- endsWith(find: RegExp, case_?: bool): bool;
+ endsWith(find: RegExp, case_?: boolean): boolean;
/**
* Converts HTML characters to their entity equivalents.
@@ -265,7 +265,7 @@ interface String {
* 'http://foo.com/"bar"'.escapeURL() -> 'http://foo.com/%22bar%22'
* 'http://foo.com/"bar"'.escapeURL(true) -> 'http%3A%2F%2Ffoo.com%2F%22bar%22'
**/
- escapeURL(param?: bool): string;
+ escapeURL(param?: boolean): string;
/**
* Returns the first [n] characters of the string.
@@ -321,12 +321,12 @@ interface String {
* 'broken'.has(/[a-n]/) -> true
* 'broken'.has(/[s-z]/) -> false
**/
- has(find: string): bool;
+ has(find: string): boolean;
/**
* @see has
**/
- has(find: RegExp): bool;
+ has(find: RegExp): boolean;
/**
* Returns true if the string contains any characters in Arabic.
@@ -338,79 +338,79 @@ interface String {
* '??????'.hasKatakana() -> true
* "l'année".hasLatin() -> true
**/
- hasArabic(): bool;
+ hasArabic(): boolean;
/**
* Returns true if the string contains any characters in Cyrillic.
* @returns True if the string contains Cyrillic.
**/
- hasCyrillic(): bool;
+ hasCyrillic(): boolean;
/**
* Returns true if the string contains any characters in Greek.
* @returns True if the string contains Greek.
**/
- hasGreek(): bool;
+ hasGreek(): boolean;
/**
* Returns true if the string contains any characters in Hangul.
* @returns True if the string contains Hangul.
**/
- hasHangul(): bool;
+ hasHangul(): boolean;
/**
* Returns true if the string contains any characters in Han.
* @returns True if the string contains Han.
**/
- hasHan(): bool;
+ hasHan(): boolean;
/**
* Returns true if the string contains any characters in Kanji.
* @returns True if the string contains Kanji.
**/
- hasKanji(): bool;
+ hasKanji(): boolean;
/**
* Returns true if the string contains any characters in Hebrew.
* @returns True if the string contains Hebrew.
**/
- hasHebrew(): bool;
+ hasHebrew(): boolean;
/**
* Returns true if the string contains any characters in Hiragana.
* @returns True if the string contains Hiragana.
**/
- hasHiragana(): bool;
+ hasHiragana(): boolean;
/**
* Returns true if the string contains any characters in Kana.
* @returns True if the string contains Kana.
**/
- hasKana(): bool;
+ hasKana(): boolean;
/**
* Returns true if the string contains any characters in Katakana.
* @returns True if the string contains Katakana.
**/
- hasKatakana(): bool;
+ hasKatakana(): boolean;
/**
* Returns true if the string contains any characters in Latin.
* @returns True if the string contains Latin.
**/
- hasLatin(): bool;
+ hasLatin(): boolean;
/**
* Returns true if the string contains any characters in Thai.
* @returns True if the string contains Thai.
**/
- hasThai(): bool;
+ hasThai(): boolean;
/**
* Returns true if the string contains any characters in Devanagari.
* @returns True if the string contains Devanagari.
**/
- hasDevanagari(): bool;
+ hasDevanagari(): boolean;
/**
* Converts katakana into hiragana.
@@ -422,7 +422,7 @@ interface String {
* '????'.hiragana() -> '????'
* '????'.hiragana(false) -> '????'
**/
- hiragana(all?: bool): string;
+ hiragana(all?: boolean): string;
/**
* Creates a human readable string.
@@ -443,7 +443,7 @@ interface String {
* ' '.isBlank() -> true
* 'noway'.isBlank() -> false
**/
- isBlank(): bool;
+ isBlank(): boolean;
/**
* Returns true if the string contains only characters in Arabic. Whitespace is ignored.
@@ -455,79 +455,79 @@ interface String {
* '??????'.isKatakana() -> false
* "l'année".isLatin() -> true
**/
- isArabic(): bool;
+ isArabic(): boolean;
/**
* Returns true if the string contains only characters in Cyrillic. Whitespace is ignored.
* @returns True if the string containsly only characters in Cyrillic.
**/
- isCyrillic(): bool;
+ isCyrillic(): boolean;
/**
* Returns true if the string contains only characters in Greek. Whitespace is ignored.
* @returns True if the string containsly only characters in Greek.
**/
- isGreek(): bool;
+ isGreek(): boolean;
/**
* Returns true if the string contains only characters in Hangul. Whitespace is ignored.
* @returns True if the string containsly only characters in Hangul.
**/
- isHangul(): bool;
+ isHangul(): boolean;
/**
* Returns true if the string contains only characters in Han. Whitespace is ignored.
* @returns True if the string containsly only characters in Han.
**/
- isHan(): bool;
+ isHan(): boolean;
/**
* Returns true if the string contains only characters in Kanji. Whitespace is ignored.
* @returns True if the string containsly only characters in Kanji.
**/
- isKanji(): bool;
+ isKanji(): boolean;
/**
* Returns true if the string contains only characters in Hebrew. Whitespace is ignored.
* @returns True if the string containsly only characters in Hebrew.
**/
- isHebrew(): bool;
+ isHebrew(): boolean;
/**
* Returns true if the string contains only characters in Hiragana. Whitespace is ignored.
* @returns True if the string containsly only characters in Hiragana.
**/
- isHiragana(): bool;
+ isHiragana(): boolean;
/**
* Returns true if the string contains only characters in Kana. Whitespace is ignored.
* @returns True if the string containsly only characters in Kana.
**/
- isKana(): bool;
+ isKana(): boolean;
/**
* Returns true if the string contains only characters in Katakana. Whitespace is ignored.
* @returns True if the string containsly only characters in Katakana.
**/
- isKatakana(): bool;
+ isKatakana(): boolean;
/**
* Returns true if the string contains only characters in Latin. Whitespace is ignored.
* @returns True if the string containsly only characters in Latin.
**/
- isLatin(): bool;
+ isLatin(): boolean;
/**
* Returns true if the string contains only characters in Thai. Whitespace is ignored.
* @returns True if the string containsly only characters in Thai.
**/
- isThai(): bool;
+ isThai(): boolean;
/**
* Returns true if the string contains only characters in Devanagari. Whitespace is ignored.
* @returns True if the string containsly only characters in Devanagari.
**/
- isDevanagari(): bool;
+ isDevanagari(): boolean;
/**
* Converts hiragana into katakana.
@@ -723,22 +723,22 @@ interface String {
* 'hello'.startsWith('HELL') -> false
* 'hello'.startsWith('HELL', false) -> true
**/
- startsWith(find: string, pos?: number, case_?: bool): bool;
+ startsWith(find: string, pos?: number, case_?: boolean): boolean;
/**
* @see startsWith
**/
- startsWith(find: string, case_?: bool): bool;
+ startsWith(find: string, case_?: boolean): boolean;
/**
* @see startsWith
**/
- startsWith(find: RegExp, pos?: number, case_?: bool): bool;
+ startsWith(find: RegExp, pos?: number, case_?: boolean): boolean;
/**
* @see startsWith
**/
- startsWith(find: RegExp, case_?: bool): bool;
+ startsWith(find: RegExp, case_?: boolean): boolean;
/**
* Strips all HTML tags from the string.
@@ -834,7 +834,7 @@ interface String {
* 'just sittin on the dock of the bay'.truncate(20, true, 'middle') -> 'just sitt...of the bay'
* 'just sittin on the dock of the bay'.truncate(20, true, 'left') -> '...the dock of the bay'
**/
- truncate(length: number, split?: bool, from?: string, ellipsis?: string): string;
+ truncate(length: number, split?: boolean, from?: string, ellipsis?: string): string;
/**
* Converts hyphens and camel casing to underscores.
@@ -864,7 +864,7 @@ interface String {
* 'http%3A%2F%2Ffoo.com%2Fthe%20bar'.unescapeURL() -> 'http://foo.com/the bar'
* 'http%3A%2F%2Ffoo.com%2Fthe%20bar'.unescapeURL(true) -> 'http%3A%2F%2Ffoo.com%2Fthe bar'
**/
- unescapeURL(partial?: bool): string;
+ unescapeURL(partial?: boolean): string;
/**
* Runs callback [fn] against each word in the string.
@@ -954,7 +954,7 @@ interface Number {
* @see bytes
* @limit If false upper limit for units is 'exa'.
**/
- bytes(precision?: number, limit?: bool): string;
+ bytes(precision?: number, limit?: boolean): string;
/**
* Shortcut for %Math.ceil% that also allows a .
@@ -1061,7 +1061,7 @@ interface Number {
* (6).isEven() -> true
* (17).isEven() -> false
**/
- isEven(): bool;
+ isEven(): boolean;
/**
* Returns true if the number has no trailing decimal.
@@ -1070,7 +1070,7 @@ interface Number {
* (420).isInteger() -> true
* (4.5).isInteger() -> false
**/
- isInteger(): bool;
+ isInteger(): boolean;
/**
* Returns true if the number is a multiple of .
@@ -1082,7 +1082,7 @@ interface Number {
* (32).isMultipleOf(4) -> true
* (34).isMultipleOf(4) -> false
**/
- isMultipleOf(num: number): bool;
+ isMultipleOf(num: number): boolean;
/**
* Returns true if the number is odd.
@@ -1091,7 +1091,7 @@ interface Number {
* (3).isOdd() -> true
* (18).isOdd() -> false
**/
- isOdd(): bool;
+ isOdd(): boolean;
/**
* Returns the logarithm of the number with base ,
@@ -1186,7 +1186,7 @@ interface Number {
* @see metric
* @limit If false the upper limit for the metric units will be 'exa'.
**/
- metric(precision?: number, limit?: bool): string;
+ metric(precision?: number, limit?: boolean): string;
/**
* Returns an ordinalized (English) string, i.e. "1st", "2nd", etc.
@@ -1211,7 +1211,7 @@ interface Number {
* (-5).pad(4) -> '-0005'
* (82).pad(3, true) -> '+082'
**/
- pad(place?: number, sign?: bool, base?: number): string;
+ pad(place?: number, sign?: boolean, base?: number): string;
/**
* Shortcut for %Math.round% that also allows a [precision].
@@ -1992,7 +1992,7 @@ interface ArrayStatic {
* Array.isArray('wasabi') -> false
* Array.isArray([1,2,3]) -> true
**/
- isArray(obj: any): bool;
+ isArray(obj: any): boolean;
}
interface Array {
@@ -2046,7 +2046,7 @@ interface Array {
* [1,2,3].at(-1) -> 3
* [1,2,3].at(0,1) -> [1,2]
**/
- at(index: number, loop?: bool): T;
+ at(index: number, loop?: boolean): T;
/**
* @see at
@@ -2089,7 +2089,7 @@ interface Array {
* [1,'',2,false,3].compact() -> [1,'',2,false,3]
* [1,'',2,false,3].compact(true) -> [1,2,3]
**/
- compact(all?: bool): T[];
+ compact(all?: boolean): T[];
/**
* Counts all elements in the array that match .
@@ -2129,9 +2129,9 @@ interface Array {
* }, 2, true);
**/
each(
- fn: (element: T, index: number, array: T[]) => bool,
+ fn: (element: T, index: number, array: T[]) => boolean,
index?: number,
- loop?: bool): T[];
+ loop?: boolean): T[];
/**
* Returns true if all elements in the array match .
@@ -2148,23 +2148,23 @@ interface Array {
* ['a','a','a'].every('a') -> true
* [{a:2},{a:2}].every({a:2}) -> true
**/
- every(f: T, scope?: any): bool;
+ every(f: T, scope?: any): boolean;
/**
* @see every
* @note Already defined in lib.d.ts.
**/
- //every(f: (element: T, index: number, array: T[]) => bool, scope?: any): bool;
+ //every(f: (element: T, index: number, array: T[]) => boolean, scope?: any): boolean;
/**
* @see every
**/
- all(f: T, scope?: any): bool;
+ all(f: T, scope?: any): boolean;
/**
* @see every
**/
- all(f: (element: T, index: number, array: T[]) => bool, scope?: any): bool;
+ all(f: (element: T, index: number, array: T[]) => boolean, scope?: any): boolean;
/**
* Removes any element in the array that matches [f1], [f2], etc.
@@ -2183,7 +2183,7 @@ interface Array {
/**
* @see exclude
**/
- exclude(f: (element: T, index: number, array: T[]) => bool): T[];
+ exclude(f: (element: T, index: number, array: T[]) => boolean): T[];
/**
* Returns any elements in the array that match .
@@ -2205,7 +2205,7 @@ interface Array {
* @see filter
* @note Already defined in lib.d.ts.
**/
- //filter(f: (element: T, index: number, array: T[]) => bool, scope?: any): T[];
+ //filter(f: (element: T, index: number, array: T[]) => boolean, scope?: any): T[];
/**
* Returns the first element that matches .
@@ -2223,12 +2223,12 @@ interface Array {
* }); -> {a:1,b:3}
* ['cuba','japan','canada'].find(/^c/, 2) -> 'canada'
**/
- find(f: T, index?: number, loop?: bool): T;
+ find(f: T, index?: number, loop?: boolean): T;
/**
* @see find
**/
- find(f: (element: T, index: number, array: T[]) => bool, index?: number, loop?: bool): T;
+ find(f: (element: T, index: number, array: T[]) => boolean, index?: number, loop?: boolean): T;
/**
* Returns all elements that match .
@@ -2247,12 +2247,12 @@ interface Array {
* ['cuba','japan','canada'].findAll(/^c/) -> 'cuba','canada'
* ['cuba','japan','canada'].findAll(/^c/, 2) -> 'canada'
**/
- findAll(f: T, index?: number, loop?: bool): T[];
+ findAll(f: T, index?: number, loop?: boolean): T[];
/**
* @see findAll
**/
- findAll(f: (element: T, index: number, array: T[]) => bool, index?: number, loop?: bool): T[];
+ findAll(f: (element: T, index: number, array: T[]) => boolean, index?: number, loop?: boolean): T[];
/**
* Returns the index of the first element that matches
@@ -2278,12 +2278,12 @@ interface Array {
* }); -> 1
* ['one','two','three'].findIndex(/th/); -> 2
**/
- findIndex(f: T, startIndex?: number, loop?: bool): number;
+ findIndex(f: T, startIndex?: number, loop?: boolean): number;
/**
* @see findIndex
**/
- findIndex(f: (element: T, index: number, array: T[]) => bool, startIndex?: number, loop?: bool): number;
+ findIndex(f: (element: T, index: number, array: T[]) => boolean, startIndex?: number, loop?: boolean): number;
/**
* Returns the first element(s) in the array.
@@ -2375,8 +2375,9 @@ interface Array {
* @example
* [1,2,3,4,5,6,7].inGroups(3) -> [ [1,2,3], [4,5,6], [7] ]
* [1,2,3,4,5,6,7].inGroups(3, 'none') -> [ [1,2,3], [4,5,6], [7,'none','none'] ]
+ * @note removed because of TSC bug https://typescript.codeplex.com/workitem/1143?FocusElement=CommentTextBox
**/
- inGroups(num: number, padding?: T): T[][];
+ //inGroups(num: number, padding?: T): T[][];
/**
* Groups the array into arrays of elements each.
@@ -2387,8 +2388,9 @@ interface Array {
* @example
* [1,2,3,4,5,6,7].inGroupsOf(4) -> [ [1,2,3,4], [5,6,7] ]
* [1,2,3,4,5,6,7].inGroupsOf(4, 'none') -> [ [1,2,3,4], [5,6,7,'none'] ]
+ * @note removed because of TSC bug https://typescript.codeplex.com/workitem/1143?FocusElement=CommentTextBox
**/
- inGroupsOf(num: number, padding?: T): T[][];
+ //inGroupsOf(num: number, padding?: T): T[][];
/**
* Adds to the array.
@@ -2424,8 +2426,9 @@ interface Array {
* @example
* [1,2,3].indexOf(3) -> 1
* [1,2,3].indexOf(7) -> -1
+ * @note Already defined in lib.d.ts.
**/
- indexOf(search: T, fromIndex?: number): number;
+ //indexOf(search: T, fromIndex?: number): number;
/**
* Returns an array containing the elements all arrays have in common.
@@ -2447,7 +2450,7 @@ interface Array {
* [].isEmpty() -> true
* [null,undefined].isEmpty() -> true
***/
- isEmpty(): bool;
+ isEmpty(): boolean;
/**
* Returns the last element(s) in the array.
@@ -2636,13 +2639,13 @@ interface Array {
* return n['a'] > 1;
* }); -> true
**/
- none(f: T): bool;
+ none(f: T): boolean;
/**
* @see none
* @param f Callback function to determine if none of the elements in the array contain a certain value.
**/
- none(f: (n: T) => bool): bool;
+ none(f: (n: T) => boolean): boolean;
/***
* Returns a copy of the array with the elements randomized.
@@ -2716,7 +2719,7 @@ interface Array {
* @see remove
* @param fn Callback function to check if elements should be removed.
**/
- remove(fn: (n: T) => bool): T[];
+ remove(fn: (n: T) => boolean): T[];
/**
* Removes element at . If [end] is specified, removes the range
@@ -2767,12 +2770,12 @@ interface Array {
* ['a','b','c'].some('a') -> true
* [{a:2},{b:5}].some({a:2}) -> true
**/
- some(f: T, scope?: any): bool;
+ some(f: T, scope?: any): boolean;
/**
* @see some
**/
- some(f: (n: T) => bool, scope?: any): bool;
+ some(f: (n: T) => boolean, scope?: any): boolean;
/**
* Sorts the array by