mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Big replacement: bool with boolean
This commit is contained in:
Vendored
+193
-193
@@ -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
|
||||
@@ -97,7 +97,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.
|
||||
@@ -112,7 +112,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.
|
||||
@@ -221,22 +221,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.
|
||||
@@ -266,7 +266,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.
|
||||
@@ -322,12 +322,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.
|
||||
@@ -339,79 +339,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.
|
||||
@@ -423,7 +423,7 @@ interface String {
|
||||
* '????'.hiragana() -> '????'
|
||||
* '????'.hiragana(false) -> '????'
|
||||
**/
|
||||
hiragana(all?: bool): string;
|
||||
hiragana(all?: boolean): string;
|
||||
|
||||
/**
|
||||
* Creates a human readable string.
|
||||
@@ -444,7 +444,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.
|
||||
@@ -456,79 +456,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.
|
||||
@@ -735,22 +735,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.
|
||||
@@ -887,7 +887,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.
|
||||
@@ -976,7 +976,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 <precision>.
|
||||
@@ -1083,7 +1083,7 @@ interface Number {
|
||||
* (6).isEven() -> true
|
||||
* (17).isEven() -> false
|
||||
**/
|
||||
isEven(): bool;
|
||||
isEven(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the number has no trailing decimal.
|
||||
@@ -1092,7 +1092,7 @@ interface Number {
|
||||
* (420).isInteger() -> true
|
||||
* (4.5).isInteger() -> false
|
||||
**/
|
||||
isInteger(): bool;
|
||||
isInteger(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the number is a multiple of <num>.
|
||||
@@ -1103,7 +1103,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.
|
||||
@@ -1112,7 +1112,7 @@ interface Number {
|
||||
* (3).isOdd() -> true
|
||||
* (18).isOdd() -> false
|
||||
**/
|
||||
isOdd(): bool;
|
||||
isOdd(): boolean;
|
||||
|
||||
/**
|
||||
* Returns the logarithm of the number with base <base>,
|
||||
@@ -1207,7 +1207,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.
|
||||
@@ -2016,7 +2016,7 @@ interface Array<T> {
|
||||
* Array.isArray([1,2,3]) -> true
|
||||
*
|
||||
***/
|
||||
isArray(obj: any): bool;
|
||||
isArray(obj: any): boolean;
|
||||
|
||||
/***
|
||||
* Adds <el> to the array.
|
||||
@@ -2055,7 +2055,7 @@ interface Array<T> {
|
||||
* [1,2,3].at(0,1) -> [1,2]
|
||||
*
|
||||
***/
|
||||
at(index: number, loop?: bool): T;
|
||||
at(index: number, loop?: boolean): T;
|
||||
at(start: number, stop: number): T[];
|
||||
|
||||
/***
|
||||
@@ -2099,7 +2099,7 @@ interface Array<T> {
|
||||
* [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 <f>.
|
||||
@@ -2147,7 +2147,7 @@ interface Array<T> {
|
||||
***/
|
||||
each(fn: (el: T, i?: number, array?: T[]) => any,
|
||||
index?: number,
|
||||
loop?: bool): T[];
|
||||
loop?: boolean): T[];
|
||||
|
||||
/***
|
||||
* Returns true if all elements in the array match <f>.
|
||||
@@ -2164,14 +2164,14 @@ interface Array<T> {
|
||||
* ['a','a','a'].every('a') -> true
|
||||
* [{a:2},{a:2}].every({a:2}) -> true
|
||||
***/
|
||||
every(f: number, scope?: any): bool;
|
||||
every(f: string, scope?: any): bool;
|
||||
every(f: Object, scope?: any): bool;
|
||||
every(f: (el: T, i?: number, array?: T[]) => bool, scope?: any): bool;
|
||||
all(f: number, scope?: any): bool;
|
||||
all(f: string, scope?: any): bool;
|
||||
all(f: Object, scope?: any): bool;
|
||||
all(f: (el: T, i?: number, array?: T[]) => bool, scope?: any): bool;
|
||||
every(f: number, scope?: any): boolean;
|
||||
every(f: string, scope?: any): boolean;
|
||||
every(f: Object, scope?: any): boolean;
|
||||
every(f: (el: T, i?: number, array?: T[]) => bool, scope?: any): boolean;
|
||||
all(f: number, scope?: any): boolean;
|
||||
all(f: string, scope?: any): boolean;
|
||||
all(f: Object, scope?: any): boolean;
|
||||
all(f: (el: T, i?: number, array?: T[]) => bool, scope?: any): boolean;
|
||||
|
||||
/***
|
||||
* Removes any element in the array that matches [f1], [f2], etc.
|
||||
@@ -2191,7 +2191,7 @@ interface Array<T> {
|
||||
exclude(...f: string[]): T[];
|
||||
exclude(...f: RegExp[]): T[];
|
||||
exclude(...f: Object[]): T[];
|
||||
exclude(fn: (n: T) => bool): T[];
|
||||
exclude(fn: (n: T) => boolean): T[];
|
||||
|
||||
/***
|
||||
* Returns any elements in the array that match <f>.
|
||||
@@ -2230,11 +2230,11 @@ interface Array<T> {
|
||||
* ['cuba','japan','canada'].find(/^c/, 2) -> 'canada'
|
||||
*
|
||||
***/
|
||||
find(f: number, index?: number, loop?: bool): T;
|
||||
find(f: string, index?: number, loop?: bool): T;
|
||||
find(f: RegExp, index?: number, loop?: bool): T;
|
||||
find(f: Object, index?: number, loop?: bool): T;
|
||||
find(f: (el: T, i?: number, array?: T[]) => bool, index?: number, loop?: bool): T;
|
||||
find(f: number, index?: number, loop?: boolean): T;
|
||||
find(f: string, index?: number, loop?: boolean): T;
|
||||
find(f: RegExp, index?: number, loop?: boolean): T;
|
||||
find(f: Object, index?: number, loop?: boolean): T;
|
||||
find(f: (el: T, i?: number, array?: T[]) => bool, index?: number, loop?: boolean): T;
|
||||
|
||||
/***
|
||||
* Returns all elements that match <f>.
|
||||
@@ -2253,11 +2253,11 @@ interface Array<T> {
|
||||
* ['cuba','japan','canada'].findAll(/^c/, 2) -> 'canada'
|
||||
*
|
||||
***/
|
||||
findAll(f: number, index?: number, loop?: bool): T[];
|
||||
findAll(f: string, index?: number, loop?: bool): T[];
|
||||
findAll(f: RegExp, index?: number, loop?: bool): T[];
|
||||
findAll(f: Object, index?: number, loop?: bool): T[];
|
||||
findAll(f: (el: T, i?: number, array?: T[]) => bool, index?: number, loop?: bool): T[];
|
||||
findAll(f: number, index?: number, loop?: boolean): T[];
|
||||
findAll(f: string, index?: number, loop?: boolean): T[];
|
||||
findAll(f: RegExp, index?: number, loop?: boolean): T[];
|
||||
findAll(f: Object, index?: number, loop?: boolean): T[];
|
||||
findAll(f: (el: T, i?: number, array?: T[]) => bool, index?: number, loop?: boolean): T[];
|
||||
|
||||
/***
|
||||
* Returns the index of the first element that matches <f>
|
||||
@@ -2282,10 +2282,10 @@ interface Array<T> {
|
||||
* ['one','two','three'].findIndex(/th/); -> 2
|
||||
*
|
||||
***/
|
||||
findIndex(f: number, startIndex?: number, loop?: bool): number;
|
||||
findIndex(f: any, startIndex?: number, loop?: bool): number;
|
||||
findIndex(f: RegExp, startIndex?: number, loop?: bool): number;
|
||||
findIndex(f: (el: T, i?: number, array?: T[]) => bool, startIndex?: number, loop?: bool): number;
|
||||
findIndex(f: number, startIndex?: number, loop?: boolean): number;
|
||||
findIndex(f: any, startIndex?: number, loop?: boolean): number;
|
||||
findIndex(f: RegExp, startIndex?: number, loop?: boolean): number;
|
||||
findIndex(f: (el: T, i?: number, array?: T[]) => bool, startIndex?: number, loop?: boolean): number;
|
||||
|
||||
/***
|
||||
* Returns the first element(s) in the array.
|
||||
@@ -2430,7 +2430,7 @@ interface Array<T> {
|
||||
* [null,undefined].isEmpty() -> true
|
||||
*
|
||||
***/
|
||||
isEmpty(): bool;
|
||||
isEmpty(): boolean;
|
||||
|
||||
/***
|
||||
* Returns the last element(s) in the array.
|
||||
@@ -2570,12 +2570,12 @@ interface Array<T> {
|
||||
* }); -> true
|
||||
*
|
||||
***/
|
||||
none(f: number): bool;
|
||||
none(f: string): bool;
|
||||
none(f: RegExp): bool;
|
||||
none(f: Object): bool;
|
||||
none(f: any[]): bool;
|
||||
none(f: (n: T) => bool): bool;
|
||||
none(f: number): boolean;
|
||||
none(f: string): boolean;
|
||||
none(f: RegExp): boolean;
|
||||
none(f: Object): boolean;
|
||||
none(f: any[]): boolean;
|
||||
none(f: (n: T) => boolean): boolean;
|
||||
|
||||
/***
|
||||
* Returns a copy of the array with the elements randomized.
|
||||
@@ -2659,10 +2659,10 @@ interface Array<T> {
|
||||
* ['a','b','c'].some('a') -> true
|
||||
* [{a:2},{b:5}].some({a:2}) -> true
|
||||
***/
|
||||
some(f: number, scope?: any): bool;
|
||||
some(f: string, scope?: any): bool;
|
||||
some(f: any, scope?: any): bool;
|
||||
some(f: (n: T) => bool, scope?: any): bool;
|
||||
some(f: number, scope?: any): boolean;
|
||||
some(f: string, scope?: any): boolean;
|
||||
some(f: any, scope?: any): boolean;
|
||||
some(f: (n: T) => bool, scope?: any): boolean;
|
||||
|
||||
/***
|
||||
* Sorts the array by <map>.
|
||||
@@ -2683,8 +2683,8 @@ interface Array<T> {
|
||||
* }); -> [{age:13},{age:18},{age:72}]
|
||||
*
|
||||
***/
|
||||
sortBy(map: string, desc?: bool): T[];
|
||||
sortBy(fn: (n: T) => any, desc?: bool): T[];
|
||||
sortBy(map: string, desc?: boolean): T[];
|
||||
sortBy(fn: (n: T) => any, desc?: boolean): T[];
|
||||
|
||||
/***
|
||||
* Subtracts from the array all elements in [a1], [a2], etc.
|
||||
@@ -2815,7 +2815,7 @@ interface Object {
|
||||
* Object.fromQueryString('foo[]=1&foo[]=2') -> { foo: [1,2] }
|
||||
*
|
||||
***/
|
||||
fromQueryString(str: string, deep?: bool): Object;
|
||||
fromQueryString(str: string, deep?: boolean): Object;
|
||||
|
||||
/***
|
||||
* Returns true if <obj> is an object of that type.
|
||||
@@ -2846,24 +2846,24 @@ interface Object {
|
||||
* Object.isObject({ broken:'wear' }) -> true
|
||||
*
|
||||
***/
|
||||
isArray(): bool;
|
||||
isArray(obj: any): bool;
|
||||
isObject(): bool;
|
||||
isObject(obj: any): bool;
|
||||
isBoolean(): bool;
|
||||
isBoolean(obj: any): bool;
|
||||
isDate(): bool;
|
||||
isDate(obj: any): bool;
|
||||
isFunction(): bool;
|
||||
isFunction(obj: any): bool;
|
||||
isNaN(): bool;
|
||||
isNaN(obj: any): bool;
|
||||
isNumber(): bool;
|
||||
isNumber(obj: any): bool;
|
||||
isString(): bool;
|
||||
isString(obj: any): bool;
|
||||
isRegExp(): bool;
|
||||
isRegExp(obj: any): bool;
|
||||
isArray(): boolean;
|
||||
isArray(obj: any): boolean;
|
||||
isObject(): boolean;
|
||||
isObject(obj: any): boolean;
|
||||
isBoolean(): boolean;
|
||||
isBoolean(obj: any): boolean;
|
||||
isDate(): boolean;
|
||||
isDate(obj: any): boolean;
|
||||
isFunction(): boolean;
|
||||
isFunction(obj: any): boolean;
|
||||
isNaN(): boolean;
|
||||
isNaN(obj: any): boolean;
|
||||
isNumber(): boolean;
|
||||
isNumber(obj: any): boolean;
|
||||
isString(): boolean;
|
||||
isString(obj: any): boolean;
|
||||
isRegExp(): boolean;
|
||||
isRegExp(obj: any): boolean;
|
||||
|
||||
/**
|
||||
* Converts the object into a query string. Accepts deep nested objects and arrays.
|
||||
@@ -2887,7 +2887,7 @@ interface Object {
|
||||
* Object.extended({foo:'bar'}).clone() -> { foo: 'bar' }
|
||||
*
|
||||
***/
|
||||
clone(obj?: Object, deep?: bool): Object;
|
||||
clone(obj?: Object, deep?: boolean): Object;
|
||||
|
||||
/***
|
||||
* Enumerable methods in the Array package are also available to
|
||||
@@ -2930,43 +2930,43 @@ interface Object {
|
||||
map(map: (key: string, value: any) => any): Object;
|
||||
map(obj: Object, map: (key: string, value: any) => any): Object;
|
||||
|
||||
any(map: string): bool;
|
||||
any(obj: Object, map: string): bool;
|
||||
any(map: (key: string, value: any) => bool): bool;
|
||||
any(obj: Object, map: (key: string, value: any) => bool): bool;
|
||||
any(map: string): boolean;
|
||||
any(obj: Object, map: string): boolean;
|
||||
any(map: (key: string, value: any) => boolean): boolean;
|
||||
any(obj: Object, map: (key: string, value: any) => boolean): boolean;
|
||||
|
||||
all(map: string): bool;
|
||||
all(obj: Object, map: string): bool;
|
||||
all(map: (key: string, value: any) => bool): bool;
|
||||
all(obj: Object, map: (key: string, value: any) => bool): bool;
|
||||
all(map: string): boolean;
|
||||
all(obj: Object, map: string): boolean;
|
||||
all(map: (key: string, value: any) => boolean): boolean;
|
||||
all(obj: Object, map: (key: string, value: any) => boolean): boolean;
|
||||
|
||||
none(map: string): bool;
|
||||
none(obj: Object, map: string): bool;
|
||||
none(map: (key: string, value: any) => bool): bool;
|
||||
none(obj: Object, map: (key: string, value: any) => bool): bool;
|
||||
none(map: string): boolean;
|
||||
none(obj: Object, map: string): boolean;
|
||||
none(map: (key: string, value: any) => boolean): boolean;
|
||||
none(obj: Object, map: (key: string, value: any) => boolean): boolean;
|
||||
|
||||
count(map: string): number;
|
||||
count(obj: Object, map: string): number;
|
||||
count(map: (key: string, value: any) => bool): number;
|
||||
count(obj: Object, map: (key: string, value: any) => bool): number;
|
||||
count(map: (key: string, value: any) => boolean): number;
|
||||
count(obj: Object, map: (key: string, value: any) => boolean): number;
|
||||
|
||||
find(map: string): any;
|
||||
find(obj: Object, map: string): any;
|
||||
find(map: (key: string, value: any) => bool): any;
|
||||
find(obj: Object, map: (key: string, value: any) => bool): any;
|
||||
find(map: (key: string, value: any) => boolean): any;
|
||||
find(obj: Object, map: (key: string, value: any) => boolean): any;
|
||||
|
||||
findAll(map: string): any[];
|
||||
findAll(obj: Object, map: string): any[];
|
||||
findAll(map: (key: string, value: any) => bool): any[];
|
||||
findAll(obj: Object, map: (key: string, value: any) => bool): any[];
|
||||
findAll(map: (key: string, value: any) => boolean): any[];
|
||||
findAll(obj: Object, map: (key: string, value: any) => boolean): any[];
|
||||
|
||||
reduce(map: string, init?: any): any;
|
||||
reduce(obj: Object, map: string, init?: any): any;
|
||||
reduce(map: (key: string, value: any) => any, init?: any): any;
|
||||
reduce(obj: Object, map: (key: string, value: any) => any, init?: any): any;
|
||||
|
||||
isEmpty(): bool;
|
||||
isEmpty(obj: Object): bool;
|
||||
isEmpty(): boolean;
|
||||
isEmpty(obj: Object): boolean;
|
||||
|
||||
sum(map: string): number;
|
||||
sum(obj: Object, map: string): number;
|
||||
@@ -3012,7 +3012,7 @@ interface Object {
|
||||
* Object.extended({a:2}).equals({a:3}) -> false
|
||||
*
|
||||
***/
|
||||
equal(a: Object, b: Object): bool;
|
||||
equal(a: Object, b: Object): boolean;
|
||||
|
||||
/***
|
||||
* Checks if <obj> has <key> using hasOwnProperty from Object.prototype.
|
||||
@@ -3029,8 +3029,8 @@ interface Object {
|
||||
* Object.has({ hasOwnProperty: true }, 'foo') -> false
|
||||
*
|
||||
***/
|
||||
has(key: string): bool;
|
||||
has(obj: Object, key: string): bool;
|
||||
has(key: string): boolean;
|
||||
has(obj: Object, key: string): boolean;
|
||||
|
||||
/***
|
||||
* Returns an array containing the keys in <obj>. Optionally calls
|
||||
@@ -3075,7 +3075,7 @@ interface Object {
|
||||
* Object.extended({a:1}).merge({b:2}) -> { a:1, b:2 }
|
||||
*
|
||||
***/
|
||||
merge(target: Object, source: Object, deep?: bool, resolve?: bool): Object;
|
||||
merge(target: Object, source: Object, deep?: bool, resolve?: boolean): Object;
|
||||
merge(target: Object, source: Object, deep?: bool, resolve?: (key: string, targetVal: any, sourceVal: any) => any): Object;
|
||||
|
||||
/**
|
||||
@@ -3427,7 +3427,7 @@ interface RegExp {
|
||||
}
|
||||
|
||||
interface Locale {
|
||||
plural: bool;
|
||||
plural: boolean;
|
||||
months: string;
|
||||
weekdays: string;
|
||||
units: string;
|
||||
@@ -3596,14 +3596,14 @@ interface Date {
|
||||
* Date.create().addYears(5) -> current time + 5 years
|
||||
*
|
||||
***/
|
||||
addMilliseconds(num: number, reset?: bool): Date;
|
||||
addSeconds(num: number, reset?: bool): Date;
|
||||
addMinutes(num: number, reset?: bool): Date;
|
||||
addHours(num: number, reset?: bool): Date;
|
||||
addDays(num: number, reset?: bool): Date;
|
||||
addWeeks(num: number, reset?: bool): Date;
|
||||
addMonths(num: number, reset?: bool): Date;
|
||||
addYears(num: number, reset?: bool): Date;
|
||||
addMilliseconds(num: number, reset?: boolean): Date;
|
||||
addSeconds(num: number, reset?: boolean): Date;
|
||||
addMinutes(num: number, reset?: boolean): Date;
|
||||
addHours(num: number, reset?: boolean): Date;
|
||||
addDays(num: number, reset?: boolean): Date;
|
||||
addWeeks(num: number, reset?: boolean): Date;
|
||||
addMonths(num: number, reset?: boolean): Date;
|
||||
addYears(num: number, reset?: boolean): Date;
|
||||
|
||||
/***
|
||||
* Sets the date forward.
|
||||
@@ -3622,10 +3622,10 @@ interface Date {
|
||||
* new Date().advance(86400000) -> 1 day in the future
|
||||
*
|
||||
***/
|
||||
advance(set: string, reset?: bool): Date;
|
||||
advance(year: number, month: number, day: number, reset?: bool): Date;
|
||||
advance(milliseconds: number, reset?: bool): Date;
|
||||
advance(set: Object, reset?: bool): Date;
|
||||
advance(set: string, reset?: boolean): Date;
|
||||
advance(year: number, month: number, day: number, reset?: boolean): Date;
|
||||
advance(milliseconds: number, reset?: boolean): Date;
|
||||
advance(set: Object, reset?: boolean): Date;
|
||||
|
||||
/***
|
||||
* Sets the date to the beginning of the appropriate unit.
|
||||
@@ -3743,7 +3743,7 @@ interface Date {
|
||||
* new Date().getUTCOffset(true) -> "+09:00"
|
||||
*
|
||||
***/
|
||||
getUTCOffset(iso?: bool): string;
|
||||
getUTCOffset(iso?: boolean): string;
|
||||
|
||||
/***
|
||||
* Gets the date's week (of the year).
|
||||
@@ -3795,9 +3795,9 @@ interface Date {
|
||||
* Date.create().is(new Date(1776, 6, 4)) -> false
|
||||
*
|
||||
***/
|
||||
is(d: string, margin?: number): bool;
|
||||
is(milliseconds: number, margin?: number): bool;
|
||||
is(d: Date, margin?: number): bool;
|
||||
is(d: string, margin?: number): boolean;
|
||||
is(milliseconds: number, margin?: number): boolean;
|
||||
is(d: Date, margin?: number): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is after the <d>.
|
||||
@@ -3812,9 +3812,9 @@ interface Date {
|
||||
* new Date().isAfter('yesterday') -> true
|
||||
*
|
||||
***/
|
||||
isAfter(d: string, margin?: number): bool;
|
||||
isAfter(milliseconds: number, margin?: number): bool;
|
||||
isAfter(d: Date, margin?: number): bool;
|
||||
isAfter(d: string, margin?: number): boolean;
|
||||
isAfter(milliseconds: number, margin?: number): boolean;
|
||||
isAfter(d: Date, margin?: number): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is before <d>.
|
||||
@@ -3829,9 +3829,9 @@ interface Date {
|
||||
* new Date().isBefore('yesterday') -> false
|
||||
*
|
||||
***/
|
||||
isBefore(d: string, margin?: number): bool;
|
||||
isBefore(milliseconds: number, margin?: number): bool;
|
||||
isBefore(d: Date, margin?: number): bool;
|
||||
isBefore(d: string, margin?: number): boolean;
|
||||
isBefore(milliseconds: number, margin?: number): boolean;
|
||||
isBefore(d: Date, margin?: number): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date falls between <d1> and <d2>.
|
||||
@@ -3846,9 +3846,9 @@ interface Date {
|
||||
* new Date().isBetween('last year', '2 years ago') -> false
|
||||
*
|
||||
***/
|
||||
isBefore(start: string, end: string, margin?: number): bool;
|
||||
isBefore(start: number, end: string, margin?: number): bool;
|
||||
isBefore(start: Date, end: Date, margin?: number): bool;
|
||||
isBefore(start: string, end: string, margin?: number): boolean;
|
||||
isBefore(start: number, end: string, margin?: number): boolean;
|
||||
isBefore(start: Date, end: Date, margin?: number): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date falls on that day.
|
||||
@@ -3879,18 +3879,18 @@ interface Date {
|
||||
* Date.create('today').isWeekend() -> ?
|
||||
*
|
||||
***/
|
||||
isToday(): bool;
|
||||
isYesterday(): bool;
|
||||
isTomorrow(): bool;
|
||||
isWeekday(): bool;
|
||||
isWeekend(): bool;
|
||||
isSunday(): bool;
|
||||
isMonday(): bool;
|
||||
isTuesday(): bool;
|
||||
isWednesday(): bool;
|
||||
isThursday(): bool;
|
||||
isFriday(): bool;
|
||||
isSaturday(): bool;
|
||||
isToday(): boolean;
|
||||
isYesterday(): boolean;
|
||||
isTomorrow(): boolean;
|
||||
isWeekday(): boolean;
|
||||
isWeekend(): boolean;
|
||||
isSunday(): boolean;
|
||||
isMonday(): boolean;
|
||||
isTuesday(): boolean;
|
||||
isWednesday(): boolean;
|
||||
isThursday(): boolean;
|
||||
isFriday(): boolean;
|
||||
isSaturday(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is in the future.
|
||||
@@ -3902,7 +3902,7 @@ interface Date {
|
||||
* Date.create('last week').isFuture() -> false
|
||||
*
|
||||
***/
|
||||
isFuture(): bool;
|
||||
isFuture(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is last week/month/year.
|
||||
@@ -3921,9 +3921,9 @@ interface Date {
|
||||
* Date.create('yesterday').isLastYear() -> even less likely...
|
||||
*
|
||||
***/
|
||||
isLastWeek(): bool;
|
||||
isLastMonth(): bool;
|
||||
isLastYear(): bool;
|
||||
isLastWeek(): boolean;
|
||||
isLastMonth(): boolean;
|
||||
isLastYear(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is a leap year.
|
||||
@@ -3934,7 +3934,7 @@ interface Date {
|
||||
* Date.create('2000').isLeapYear() -> true
|
||||
*
|
||||
***/
|
||||
isLeapYear(): bool;
|
||||
isLeapYear(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is next week/month/year.
|
||||
@@ -3953,9 +3953,9 @@ interface Date {
|
||||
* Date.create('tomorrow').isNextYear() -> even less likely...
|
||||
*
|
||||
***/
|
||||
isNextWeek(): bool;
|
||||
isNextMonth(): bool;
|
||||
isNextYear(): bool;
|
||||
isNextWeek(): boolean;
|
||||
isNextMonth(): boolean;
|
||||
isNextYear(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is in the past.
|
||||
@@ -3967,7 +3967,7 @@ interface Date {
|
||||
* Date.create('next week').isPast() -> false
|
||||
*
|
||||
***/
|
||||
isPast(): bool;
|
||||
isPast(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is this week/month/year.
|
||||
@@ -3986,9 +3986,9 @@ interface Date {
|
||||
* Date.create('tomorrow').isThisYear() -> signs point to yes...
|
||||
*
|
||||
***/
|
||||
isThisWeek(): bool;
|
||||
isThisMonth(): bool;
|
||||
isThisYear(): bool;
|
||||
isThisWeek(): boolean;
|
||||
isThisMonth(): boolean;
|
||||
isThisYear(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date has no timezone offset.
|
||||
@@ -4001,7 +4001,7 @@ interface Date {
|
||||
* new Date().toUTC().isUTC() -> true
|
||||
*
|
||||
***/
|
||||
isUTC(): bool;
|
||||
isUTC(): boolean;
|
||||
|
||||
/***
|
||||
* Returns true if the date is valid.
|
||||
@@ -4013,7 +4013,7 @@ interface Date {
|
||||
* new Date('flexor').isValid() -> false
|
||||
*
|
||||
***/
|
||||
isValid(): bool;
|
||||
isValid(): boolean;
|
||||
|
||||
/***
|
||||
* @method iso()
|
||||
@@ -4080,9 +4080,9 @@ interface Date {
|
||||
* new Date().rewind(86400000) -> 1 day in the past
|
||||
*
|
||||
***/
|
||||
rewind(ms: number, reset?: bool): Date;
|
||||
rewind(year: number, month: number, day: number, reset?: bool): Date;
|
||||
//rewind(d: Object, reset?: bool): Date; // Do not like this, is not typesafe
|
||||
rewind(ms: number, reset?: boolean): Date;
|
||||
rewind(year: number, month: number, day: number, reset?: boolean): Date;
|
||||
//rewind(d: Object, reset?: boolean): Date; // Do not like this, is not typesafe
|
||||
|
||||
/***
|
||||
* Sets the date object.
|
||||
@@ -4103,7 +4103,7 @@ interface Date {
|
||||
***/
|
||||
set (ms: number): Date;
|
||||
set (year: number, month: number, day: number): Date;
|
||||
//set(d: Object, reset?: bool): Date; // Do not like this, is not typesafe
|
||||
//set(d: Object, reset?: boolean): Date; // Do not like this, is not typesafe
|
||||
|
||||
|
||||
/***
|
||||
@@ -4306,7 +4306,7 @@ interface Date {
|
||||
* new Date().utc(false)
|
||||
*
|
||||
***/
|
||||
utc(on?: bool): Date;
|
||||
utc(on?: boolean): Date;
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -4330,8 +4330,8 @@ interface DateRange {
|
||||
* Date.range('2003', '2005').contains(Date.create('2004')) -> true
|
||||
*
|
||||
***/
|
||||
contains(d: Date): bool;
|
||||
contains(d: DateRange): bool;
|
||||
contains(d: Date): boolean;
|
||||
contains(d: DateRange): boolean;
|
||||
|
||||
/***
|
||||
* Return the duration of the DateRange in milliseconds.
|
||||
@@ -4417,7 +4417,7 @@ interface DateRange {
|
||||
* Date.range('2005', '2003').isValid() -> false
|
||||
*
|
||||
***/
|
||||
isValid(): bool;
|
||||
isValid(): boolean;
|
||||
|
||||
/***
|
||||
* Returns a string representation of the DateRange.
|
||||
|
||||
Reference in New Issue
Block a user