2086 lines
74 KiB
Text
2086 lines
74 KiB
Text
=== tests/cases/conformance/decorators/1.0lib-noErrors.ts ===
|
|
/* *****************************************************************************
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
and limitations under the License.
|
|
***************************************************************************** */
|
|
|
|
/// <reference no-default-lib="true"/>
|
|
|
|
/////////////////////////////
|
|
/// ECMAScript APIs
|
|
/////////////////////////////
|
|
|
|
declare var NaN: number;
|
|
>NaN : number
|
|
|
|
declare var Infinity: number;
|
|
>Infinity : number
|
|
|
|
/**
|
|
* Evaluates JavaScript code and executes it.
|
|
* @param x A String value that contains valid JavaScript code.
|
|
*/
|
|
declare function eval(x: string): any;
|
|
>eval : (x: string) => any
|
|
>x : string
|
|
|
|
/**
|
|
* Converts A string to an integer.
|
|
* @param s A string to convert into a number.
|
|
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
|
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
|
* All other strings are considered decimal.
|
|
*/
|
|
declare function parseInt(s: string, radix?: number): number;
|
|
>parseInt : (s: string, radix?: number) => number
|
|
>s : string
|
|
>radix : number
|
|
|
|
/**
|
|
* Converts a string to a floating-point number.
|
|
* @param string A string that contains a floating-point number.
|
|
*/
|
|
declare function parseFloat(string: string): number;
|
|
>parseFloat : (string: string) => number
|
|
>string : string
|
|
|
|
/**
|
|
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
|
|
* @param number A numeric value.
|
|
*/
|
|
declare function isNaN(number: number): boolean;
|
|
>isNaN : (number: number) => boolean
|
|
>number : number
|
|
|
|
/**
|
|
* Determines whether a supplied number is finite.
|
|
* @param number Any numeric value.
|
|
*/
|
|
declare function isFinite(number: number): boolean;
|
|
>isFinite : (number: number) => boolean
|
|
>number : number
|
|
|
|
/**
|
|
* Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
|
|
* @param encodedURI A value representing an encoded URI.
|
|
*/
|
|
declare function decodeURI(encodedURI: string): string;
|
|
>decodeURI : (encodedURI: string) => string
|
|
>encodedURI : string
|
|
|
|
/**
|
|
* Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
* @param encodedURIComponent A value representing an encoded URI component.
|
|
*/
|
|
declare function decodeURIComponent(encodedURIComponent: string): string;
|
|
>decodeURIComponent : (encodedURIComponent: string) => string
|
|
>encodedURIComponent : string
|
|
|
|
/**
|
|
* Encodes a text string as a valid Uniform Resource Identifier (URI)
|
|
* @param uri A value representing an encoded URI.
|
|
*/
|
|
declare function encodeURI(uri: string): string;
|
|
>encodeURI : (uri: string) => string
|
|
>uri : string
|
|
|
|
/**
|
|
* Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
|
|
* @param uriComponent A value representing an encoded URI component.
|
|
*/
|
|
declare function encodeURIComponent(uriComponent: string): string;
|
|
>encodeURIComponent : (uriComponent: string) => string
|
|
>uriComponent : string
|
|
|
|
interface PropertyDescriptor {
|
|
>PropertyDescriptor : PropertyDescriptor
|
|
|
|
configurable?: boolean;
|
|
>configurable : boolean
|
|
|
|
enumerable?: boolean;
|
|
>enumerable : boolean
|
|
|
|
value?: any;
|
|
>value : any
|
|
|
|
writable?: boolean;
|
|
>writable : boolean
|
|
|
|
get?(): any;
|
|
>get : () => any
|
|
|
|
set?(v: any): void;
|
|
>set : (v: any) => void
|
|
>v : any
|
|
}
|
|
|
|
interface PropertyDescriptorMap {
|
|
>PropertyDescriptorMap : PropertyDescriptorMap
|
|
|
|
[s: string]: PropertyDescriptor;
|
|
>s : string
|
|
>PropertyDescriptor : PropertyDescriptor
|
|
}
|
|
|
|
interface Object {
|
|
>Object : Object
|
|
|
|
/** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
|
|
constructor: Function;
|
|
>constructor : Function
|
|
>Function : Function
|
|
|
|
/** Returns a string representation of an object. */
|
|
toString(): string;
|
|
>toString : () => string
|
|
|
|
/** Returns a date converted to a string using the current locale. */
|
|
toLocaleString(): string;
|
|
>toLocaleString : () => string
|
|
|
|
/** Returns the primitive value of the specified object. */
|
|
valueOf(): Object;
|
|
>valueOf : () => Object
|
|
>Object : Object
|
|
|
|
/**
|
|
* Determines whether an object has a property with the specified name.
|
|
* @param v A property name.
|
|
*/
|
|
hasOwnProperty(v: string): boolean;
|
|
>hasOwnProperty : (v: string) => boolean
|
|
>v : string
|
|
|
|
/**
|
|
* Determines whether an object exists in another object's prototype chain.
|
|
* @param v Another object whose prototype chain is to be checked.
|
|
*/
|
|
isPrototypeOf(v: Object): boolean;
|
|
>isPrototypeOf : (v: Object) => boolean
|
|
>v : Object
|
|
>Object : Object
|
|
|
|
/**
|
|
* Determines whether a specified property is enumerable.
|
|
* @param v A property name.
|
|
*/
|
|
propertyIsEnumerable(v: string): boolean;
|
|
>propertyIsEnumerable : (v: string) => boolean
|
|
>v : string
|
|
}
|
|
|
|
/**
|
|
* Provides functionality common to all JavaScript objects.
|
|
*/
|
|
declare var Object: {
|
|
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
|
|
|
|
new (value?: any): Object;
|
|
>value : any
|
|
>Object : Object
|
|
|
|
(): any;
|
|
(value: any): any;
|
|
>value : any
|
|
|
|
/** A reference to the prototype for a class of objects. */
|
|
prototype: Object;
|
|
>prototype : Object
|
|
>Object : Object
|
|
|
|
/**
|
|
* Returns the prototype of an object.
|
|
* @param o The object that references the prototype.
|
|
*/
|
|
getPrototypeOf(o: any): any;
|
|
>getPrototypeOf : (o: any) => any
|
|
>o : any
|
|
|
|
/**
|
|
* Gets the own property descriptor of the specified object.
|
|
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
|
* @param o Object that contains the property.
|
|
* @param p Name of the property.
|
|
*/
|
|
getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
|
|
>getOwnPropertyDescriptor : (o: any, p: string) => PropertyDescriptor
|
|
>o : any
|
|
>p : string
|
|
>PropertyDescriptor : PropertyDescriptor
|
|
|
|
/**
|
|
* Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
|
* on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
|
* @param o Object that contains the own properties.
|
|
*/
|
|
getOwnPropertyNames(o: any): string[];
|
|
>getOwnPropertyNames : (o: any) => string[]
|
|
>o : any
|
|
|
|
/**
|
|
* Creates an object that has the specified prototype, and that optionally contains specified properties.
|
|
* @param o Object to use as a prototype. May be null
|
|
* @param properties JavaScript object that contains one or more property descriptors.
|
|
*/
|
|
create(o: any, properties?: PropertyDescriptorMap): any;
|
|
>create : (o: any, properties?: PropertyDescriptorMap) => any
|
|
>o : any
|
|
>properties : PropertyDescriptorMap
|
|
>PropertyDescriptorMap : PropertyDescriptorMap
|
|
|
|
/**
|
|
* Adds a property to an object, or modifies attributes of an existing property.
|
|
* @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
|
|
* @param p The property name.
|
|
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
|
|
*/
|
|
defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
|
|
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
|
|
>o : any
|
|
>p : string
|
|
>attributes : PropertyDescriptor
|
|
>PropertyDescriptor : PropertyDescriptor
|
|
|
|
/**
|
|
* Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
* @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
|
|
* @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
|
|
*/
|
|
defineProperties(o: any, properties: PropertyDescriptorMap): any;
|
|
>defineProperties : (o: any, properties: PropertyDescriptorMap) => any
|
|
>o : any
|
|
>properties : PropertyDescriptorMap
|
|
>PropertyDescriptorMap : PropertyDescriptorMap
|
|
|
|
/**
|
|
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
* @param o Object on which to lock the attributes.
|
|
*/
|
|
seal(o: any): any;
|
|
>seal : (o: any) => any
|
|
>o : any
|
|
|
|
/**
|
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
* @param o Object on which to lock the attributes.
|
|
*/
|
|
freeze(o: any): any;
|
|
>freeze : (o: any) => any
|
|
>o : any
|
|
|
|
/**
|
|
* Prevents the addition of new properties to an object.
|
|
* @param o Object to make non-extensible.
|
|
*/
|
|
preventExtensions(o: any): any;
|
|
>preventExtensions : (o: any) => any
|
|
>o : any
|
|
|
|
/**
|
|
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
|
* @param o Object to test.
|
|
*/
|
|
isSealed(o: any): boolean;
|
|
>isSealed : (o: any) => boolean
|
|
>o : any
|
|
|
|
/**
|
|
* Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
|
* @param o Object to test.
|
|
*/
|
|
isFrozen(o: any): boolean;
|
|
>isFrozen : (o: any) => boolean
|
|
>o : any
|
|
|
|
/**
|
|
* Returns a value that indicates whether new properties can be added to an object.
|
|
* @param o Object to test.
|
|
*/
|
|
isExtensible(o: any): boolean;
|
|
>isExtensible : (o: any) => boolean
|
|
>o : any
|
|
|
|
/**
|
|
* Returns the names of the enumerable properties and methods of an object.
|
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
*/
|
|
keys(o: any): string[];
|
|
>keys : (o: any) => string[]
|
|
>o : any
|
|
}
|
|
|
|
/**
|
|
* Creates a new function.
|
|
*/
|
|
interface Function {
|
|
>Function : Function
|
|
|
|
/**
|
|
* Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
|
|
* @param thisArg The object to be used as the this object.
|
|
* @param argArray A set of arguments to be passed to the function.
|
|
*/
|
|
apply(thisArg: any, argArray?: any): any;
|
|
>apply : (thisArg: any, argArray?: any) => any
|
|
>thisArg : any
|
|
>argArray : any
|
|
|
|
/**
|
|
* Calls a method of an object, substituting another object for the current object.
|
|
* @param thisArg The object to be used as the current object.
|
|
* @param argArray A list of arguments to be passed to the method.
|
|
*/
|
|
call(thisArg: any, ...argArray: any[]): any;
|
|
>call : (thisArg: any, ...argArray: any[]) => any
|
|
>thisArg : any
|
|
>argArray : any[]
|
|
|
|
/**
|
|
* For a given function, creates a bound function that has the same body as the original function.
|
|
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
|
* @param thisArg An object to which the this keyword can refer inside the new function.
|
|
* @param argArray A list of arguments to be passed to the new function.
|
|
*/
|
|
bind(thisArg: any, ...argArray: any[]): any;
|
|
>bind : (thisArg: any, ...argArray: any[]) => any
|
|
>thisArg : any
|
|
>argArray : any[]
|
|
|
|
prototype: any;
|
|
>prototype : any
|
|
|
|
length: number;
|
|
>length : number
|
|
|
|
// Non-standard extensions
|
|
arguments: any;
|
|
>arguments : any
|
|
|
|
caller: Function;
|
|
>caller : Function
|
|
>Function : Function
|
|
}
|
|
|
|
declare var Function: {
|
|
>Function : { (...args: string[]): Function; new (...args: string[]): Function; prototype: Function; }
|
|
|
|
/**
|
|
* Creates a new function.
|
|
* @param args A list of arguments the function accepts.
|
|
*/
|
|
new (...args: string[]): Function;
|
|
>args : string[]
|
|
>Function : Function
|
|
|
|
(...args: string[]): Function;
|
|
>args : string[]
|
|
>Function : Function
|
|
|
|
prototype: Function;
|
|
>prototype : Function
|
|
>Function : Function
|
|
}
|
|
|
|
interface IArguments {
|
|
>IArguments : IArguments
|
|
|
|
[index: number]: any;
|
|
>index : number
|
|
|
|
length: number;
|
|
>length : number
|
|
|
|
callee: Function;
|
|
>callee : Function
|
|
>Function : Function
|
|
}
|
|
|
|
interface String {
|
|
>String : String
|
|
|
|
/** Returns a string representation of a string. */
|
|
toString(): string;
|
|
>toString : () => string
|
|
|
|
/**
|
|
* Returns the character at the specified index.
|
|
* @param pos The zero-based index of the desired character.
|
|
*/
|
|
charAt(pos: number): string;
|
|
>charAt : (pos: number) => string
|
|
>pos : number
|
|
|
|
/**
|
|
* Returns the Unicode value of the character at the specified location.
|
|
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
|
|
*/
|
|
charCodeAt(index: number): number;
|
|
>charCodeAt : (index: number) => number
|
|
>index : number
|
|
|
|
/**
|
|
* Returns a string that contains the concatenation of two or more strings.
|
|
* @param strings The strings to append to the end of the string.
|
|
*/
|
|
concat(...strings: string[]): string;
|
|
>concat : (...strings: string[]) => string
|
|
>strings : string[]
|
|
|
|
/**
|
|
* Returns the position of the first occurrence of a substring.
|
|
* @param searchString The substring to search for in the string
|
|
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
|
|
*/
|
|
indexOf(searchString: string, position?: number): number;
|
|
>indexOf : (searchString: string, position?: number) => number
|
|
>searchString : string
|
|
>position : number
|
|
|
|
/**
|
|
* Returns the last occurrence of a substring in the string.
|
|
* @param searchString The substring to search for.
|
|
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
|
|
*/
|
|
lastIndexOf(searchString: string, position?: number): number;
|
|
>lastIndexOf : (searchString: string, position?: number) => number
|
|
>searchString : string
|
|
>position : number
|
|
|
|
/**
|
|
* Determines whether two strings are equivalent in the current locale.
|
|
* @param that String to compare to target string
|
|
*/
|
|
localeCompare(that: string): number;
|
|
>localeCompare : (that: string) => number
|
|
>that : string
|
|
|
|
/**
|
|
* Matches a string with a regular expression, and returns an array containing the results of that search.
|
|
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
|
*/
|
|
match(regexp: string): string[];
|
|
>match : { (regexp: string): string[]; (regexp: RegExp): string[]; }
|
|
>regexp : string
|
|
|
|
/**
|
|
* Matches a string with a regular expression, and returns an array containing the results of that search.
|
|
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
|
|
*/
|
|
match(regexp: RegExp): string[];
|
|
>match : { (regexp: string): string[]; (regexp: RegExp): string[]; }
|
|
>regexp : RegExp
|
|
>RegExp : RegExp
|
|
|
|
/**
|
|
* Replaces text in a string, using a regular expression or search string.
|
|
* @param searchValue A String object or string literal that represents the regular expression
|
|
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
|
|
*/
|
|
replace(searchValue: string, replaceValue: string): string;
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>searchValue : string
|
|
>replaceValue : string
|
|
|
|
/**
|
|
* Replaces text in a string, using a regular expression or search string.
|
|
* @param searchValue A String object or string literal that represents the regular expression
|
|
* @param replaceValue A function that returns the replacement text.
|
|
*/
|
|
replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>searchValue : string
|
|
>replaceValue : (substring: string, ...args: any[]) => string
|
|
>substring : string
|
|
>args : any[]
|
|
|
|
/**
|
|
* Replaces text in a string, using a regular expression or search string.
|
|
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
|
|
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
|
|
*/
|
|
replace(searchValue: RegExp, replaceValue: string): string;
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>searchValue : RegExp
|
|
>RegExp : RegExp
|
|
>replaceValue : string
|
|
|
|
/**
|
|
* Replaces text in a string, using a regular expression or search string.
|
|
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
|
|
* @param replaceValue A function that returns the replacement text.
|
|
*/
|
|
replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>searchValue : RegExp
|
|
>RegExp : RegExp
|
|
>replaceValue : (substring: string, ...args: any[]) => string
|
|
>substring : string
|
|
>args : any[]
|
|
|
|
/**
|
|
* Finds the first substring match in a regular expression search.
|
|
* @param regexp The regular expression pattern and applicable flags.
|
|
*/
|
|
search(regexp: string): number;
|
|
>search : { (regexp: string): number; (regexp: RegExp): number; }
|
|
>regexp : string
|
|
|
|
/**
|
|
* Finds the first substring match in a regular expression search.
|
|
* @param regexp The regular expression pattern and applicable flags.
|
|
*/
|
|
search(regexp: RegExp): number;
|
|
>search : { (regexp: string): number; (regexp: RegExp): number; }
|
|
>regexp : RegExp
|
|
>RegExp : RegExp
|
|
|
|
/**
|
|
* Returns a section of a string.
|
|
* @param start The index to the beginning of the specified portion of stringObj.
|
|
* @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
|
|
* If this value is not specified, the substring continues to the end of stringObj.
|
|
*/
|
|
slice(start?: number, end?: number): string;
|
|
>slice : (start?: number, end?: number) => string
|
|
>start : number
|
|
>end : number
|
|
|
|
/**
|
|
* Split a string into substrings using the specified separator and return them as an array.
|
|
* @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
|
|
* @param limit A value used to limit the number of elements returned in the array.
|
|
*/
|
|
split(separator: string, limit?: number): string[];
|
|
>split : { (separator: string, limit?: number): string[]; (separator: RegExp, limit?: number): string[]; }
|
|
>separator : string
|
|
>limit : number
|
|
|
|
/**
|
|
* Split a string into substrings using the specified separator and return them as an array.
|
|
* @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
|
|
* @param limit A value used to limit the number of elements returned in the array.
|
|
*/
|
|
split(separator: RegExp, limit?: number): string[];
|
|
>split : { (separator: string, limit?: number): string[]; (separator: RegExp, limit?: number): string[]; }
|
|
>separator : RegExp
|
|
>RegExp : RegExp
|
|
>limit : number
|
|
|
|
/**
|
|
* Returns the substring at the specified location within a String object.
|
|
* @param start The zero-based index number indicating the beginning of the substring.
|
|
* @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
|
|
* If end is omitted, the characters from start through the end of the original string are returned.
|
|
*/
|
|
substring(start: number, end?: number): string;
|
|
>substring : (start: number, end?: number) => string
|
|
>start : number
|
|
>end : number
|
|
|
|
/** Converts all the alphabetic characters in a string to lowercase. */
|
|
toLowerCase(): string;
|
|
>toLowerCase : () => string
|
|
|
|
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
|
toLocaleLowerCase(): string;
|
|
>toLocaleLowerCase : () => string
|
|
|
|
/** Converts all the alphabetic characters in a string to uppercase. */
|
|
toUpperCase(): string;
|
|
>toUpperCase : () => string
|
|
|
|
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
|
|
toLocaleUpperCase(): string;
|
|
>toLocaleUpperCase : () => string
|
|
|
|
/** Removes the leading and trailing white space and line terminator characters from a string. */
|
|
trim(): string;
|
|
>trim : () => string
|
|
|
|
/** Returns the length of a String object. */
|
|
length: number;
|
|
>length : number
|
|
|
|
// IE extensions
|
|
/**
|
|
* Gets a substring beginning at the specified location and having the specified length.
|
|
* @param from The starting position of the desired substring. The index of the first character in the string is zero.
|
|
* @param length The number of characters to include in the returned substring.
|
|
*/
|
|
substr(from: number, length?: number): string;
|
|
>substr : (from: number, length?: number) => string
|
|
>from : number
|
|
>length : number
|
|
|
|
[index: number]: string;
|
|
>index : number
|
|
}
|
|
|
|
/**
|
|
* Allows manipulation and formatting of text strings and determination and location of substrings within strings.
|
|
*/
|
|
declare var String: {
|
|
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
|
|
|
|
new (value?: any): String;
|
|
>value : any
|
|
>String : String
|
|
|
|
(value?: any): string;
|
|
>value : any
|
|
|
|
prototype: String;
|
|
>prototype : String
|
|
>String : String
|
|
|
|
fromCharCode(...codes: number[]): string;
|
|
>fromCharCode : (...codes: number[]) => string
|
|
>codes : number[]
|
|
}
|
|
|
|
interface Boolean {
|
|
>Boolean : Boolean
|
|
}
|
|
declare var Boolean: {
|
|
>Boolean : { (value?: any): boolean; new (value?: any): Boolean; prototype: Boolean; }
|
|
|
|
new (value?: any): Boolean;
|
|
>value : any
|
|
>Boolean : Boolean
|
|
|
|
(value?: any): boolean;
|
|
>value : any
|
|
|
|
prototype: Boolean;
|
|
>prototype : Boolean
|
|
>Boolean : Boolean
|
|
}
|
|
|
|
interface Number {
|
|
>Number : Number
|
|
|
|
/**
|
|
* Returns a string representation of an object.
|
|
* @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
|
|
*/
|
|
toString(radix?: number): string;
|
|
>toString : (radix?: number) => string
|
|
>radix : number
|
|
|
|
/**
|
|
* Returns a string representing a number in fixed-point notation.
|
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
*/
|
|
toFixed(fractionDigits?: number): string;
|
|
>toFixed : (fractionDigits?: number) => string
|
|
>fractionDigits : number
|
|
|
|
/**
|
|
* Returns a string containing a number represented in exponential notation.
|
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
*/
|
|
toExponential(fractionDigits?: number): string;
|
|
>toExponential : (fractionDigits?: number) => string
|
|
>fractionDigits : number
|
|
|
|
/**
|
|
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
|
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
|
|
*/
|
|
toPrecision(precision?: number): string;
|
|
>toPrecision : (precision?: number) => string
|
|
>precision : number
|
|
}
|
|
|
|
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
|
|
declare var Number: {
|
|
>Number : { (value?: any): number; new (value?: any): Number; prototype: Number; MAX_VALUE: number; MIN_VALUE: number; NaN: number; NEGATIVE_INFINITY: number; POSITIVE_INFINITY: number; }
|
|
|
|
new (value?: any): Number;
|
|
>value : any
|
|
>Number : Number
|
|
|
|
(value?: any): number;
|
|
>value : any
|
|
|
|
prototype: Number;
|
|
>prototype : Number
|
|
>Number : Number
|
|
|
|
/** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
|
|
MAX_VALUE: number;
|
|
>MAX_VALUE : number
|
|
|
|
/** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
|
|
MIN_VALUE: number;
|
|
>MIN_VALUE : number
|
|
|
|
/**
|
|
* A value that is not a number.
|
|
* In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
|
|
*/
|
|
NaN: number;
|
|
>NaN : number
|
|
|
|
/**
|
|
* A value that is less than the largest negative number that can be represented in JavaScript.
|
|
* JavaScript displays NEGATIVE_INFINITY values as -infinity.
|
|
*/
|
|
NEGATIVE_INFINITY: number;
|
|
>NEGATIVE_INFINITY : number
|
|
|
|
/**
|
|
* A value greater than the largest number that can be represented in JavaScript.
|
|
* JavaScript displays POSITIVE_INFINITY values as infinity.
|
|
*/
|
|
POSITIVE_INFINITY: number;
|
|
>POSITIVE_INFINITY : number
|
|
}
|
|
|
|
interface Math {
|
|
>Math : Math
|
|
|
|
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
|
|
E: number;
|
|
>E : number
|
|
|
|
/** The natural logarithm of 10. */
|
|
LN10: number;
|
|
>LN10 : number
|
|
|
|
/** The natural logarithm of 2. */
|
|
LN2: number;
|
|
>LN2 : number
|
|
|
|
/** The base-2 logarithm of e. */
|
|
LOG2E: number;
|
|
>LOG2E : number
|
|
|
|
/** The base-10 logarithm of e. */
|
|
LOG10E: number;
|
|
>LOG10E : number
|
|
|
|
/** Pi. This is the ratio of the circumference of a circle to its diameter. */
|
|
PI: number;
|
|
>PI : number
|
|
|
|
/** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
|
|
SQRT1_2: number;
|
|
>SQRT1_2 : number
|
|
|
|
/** The square root of 2. */
|
|
SQRT2: number;
|
|
>SQRT2 : number
|
|
|
|
/**
|
|
* Returns the absolute value of a number (the value without regard to whether it is positive or negative).
|
|
* For example, the absolute value of -5 is the same as the absolute value of 5.
|
|
* @param x A numeric expression for which the absolute value is needed.
|
|
*/
|
|
abs(x: number): number;
|
|
>abs : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the arc cosine (or inverse cosine) of a number.
|
|
* @param x A numeric expression.
|
|
*/
|
|
acos(x: number): number;
|
|
>acos : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the arcsine of a number.
|
|
* @param x A numeric expression.
|
|
*/
|
|
asin(x: number): number;
|
|
>asin : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the arctangent of a number.
|
|
* @param x A numeric expression for which the arctangent is needed.
|
|
*/
|
|
atan(x: number): number;
|
|
>atan : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the angle (in radians) from the X axis to a point (y,x).
|
|
* @param y A numeric expression representing the cartesian y-coordinate.
|
|
* @param x A numeric expression representing the cartesian x-coordinate.
|
|
*/
|
|
atan2(y: number, x: number): number;
|
|
>atan2 : (y: number, x: number) => number
|
|
>y : number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the smallest number greater than or equal to its numeric argument.
|
|
* @param x A numeric expression.
|
|
*/
|
|
ceil(x: number): number;
|
|
>ceil : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the cosine of a number.
|
|
* @param x A numeric expression that contains an angle measured in radians.
|
|
*/
|
|
cos(x: number): number;
|
|
>cos : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns e (the base of natural logarithms) raised to a power.
|
|
* @param x A numeric expression representing the power of e.
|
|
*/
|
|
exp(x: number): number;
|
|
>exp : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the greatest number less than or equal to its numeric argument.
|
|
* @param x A numeric expression.
|
|
*/
|
|
floor(x: number): number;
|
|
>floor : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the natural logarithm (base e) of a number.
|
|
* @param x A numeric expression.
|
|
*/
|
|
log(x: number): number;
|
|
>log : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the larger of a set of supplied numeric expressions.
|
|
* @param values Numeric expressions to be evaluated.
|
|
*/
|
|
max(...values: number[]): number;
|
|
>max : (...values: number[]) => number
|
|
>values : number[]
|
|
|
|
/**
|
|
* Returns the smaller of a set of supplied numeric expressions.
|
|
* @param values Numeric expressions to be evaluated.
|
|
*/
|
|
min(...values: number[]): number;
|
|
>min : (...values: number[]) => number
|
|
>values : number[]
|
|
|
|
/**
|
|
* Returns the value of a base expression taken to a specified power.
|
|
* @param x The base value of the expression.
|
|
* @param y The exponent value of the expression.
|
|
*/
|
|
pow(x: number, y: number): number;
|
|
>pow : (x: number, y: number) => number
|
|
>x : number
|
|
>y : number
|
|
|
|
/** Returns a pseudorandom number between 0 and 1. */
|
|
random(): number;
|
|
>random : () => number
|
|
|
|
/**
|
|
* Returns a supplied numeric expression rounded to the nearest number.
|
|
* @param x The value to be rounded to the nearest number.
|
|
*/
|
|
round(x: number): number;
|
|
>round : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the sine of a number.
|
|
* @param x A numeric expression that contains an angle measured in radians.
|
|
*/
|
|
sin(x: number): number;
|
|
>sin : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the square root of a number.
|
|
* @param x A numeric expression.
|
|
*/
|
|
sqrt(x: number): number;
|
|
>sqrt : (x: number) => number
|
|
>x : number
|
|
|
|
/**
|
|
* Returns the tangent of a number.
|
|
* @param x A numeric expression that contains an angle measured in radians.
|
|
*/
|
|
tan(x: number): number;
|
|
>tan : (x: number) => number
|
|
>x : number
|
|
}
|
|
/** An intrinsic object that provides basic mathematics functionality and constants. */
|
|
declare var Math: Math;
|
|
>Math : Math
|
|
>Math : Math
|
|
|
|
/** Enables basic storage and retrieval of dates and times. */
|
|
interface Date {
|
|
>Date : Date
|
|
|
|
/** Returns a string representation of a date. The format of the string depends on the locale. */
|
|
toString(): string;
|
|
>toString : () => string
|
|
|
|
/** Returns a date as a string value. */
|
|
toDateString(): string;
|
|
>toDateString : () => string
|
|
|
|
/** Returns a time as a string value. */
|
|
toTimeString(): string;
|
|
>toTimeString : () => string
|
|
|
|
/** Returns a value as a string value appropriate to the host environment's current locale. */
|
|
toLocaleString(): string;
|
|
>toLocaleString : () => string
|
|
|
|
/** Returns a date as a string value appropriate to the host environment's current locale. */
|
|
toLocaleDateString(): string;
|
|
>toLocaleDateString : () => string
|
|
|
|
/** Returns a time as a string value appropriate to the host environment's current locale. */
|
|
toLocaleTimeString(): string;
|
|
>toLocaleTimeString : () => string
|
|
|
|
/** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
|
|
valueOf(): number;
|
|
>valueOf : () => number
|
|
|
|
/** Gets the time value in milliseconds. */
|
|
getTime(): number;
|
|
>getTime : () => number
|
|
|
|
/** Gets the year, using local time. */
|
|
getFullYear(): number;
|
|
>getFullYear : () => number
|
|
|
|
/** Gets the year using Universal Coordinated Time (UTC). */
|
|
getUTCFullYear(): number;
|
|
>getUTCFullYear : () => number
|
|
|
|
/** Gets the month, using local time. */
|
|
getMonth(): number;
|
|
>getMonth : () => number
|
|
|
|
/** Gets the month of a Date object using Universal Coordinated Time (UTC). */
|
|
getUTCMonth(): number;
|
|
>getUTCMonth : () => number
|
|
|
|
/** Gets the day-of-the-month, using local time. */
|
|
getDate(): number;
|
|
>getDate : () => number
|
|
|
|
/** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
|
|
getUTCDate(): number;
|
|
>getUTCDate : () => number
|
|
|
|
/** Gets the day of the week, using local time. */
|
|
getDay(): number;
|
|
>getDay : () => number
|
|
|
|
/** Gets the day of the week using Universal Coordinated Time (UTC). */
|
|
getUTCDay(): number;
|
|
>getUTCDay : () => number
|
|
|
|
/** Gets the hours in a date, using local time. */
|
|
getHours(): number;
|
|
>getHours : () => number
|
|
|
|
/** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
|
|
getUTCHours(): number;
|
|
>getUTCHours : () => number
|
|
|
|
/** Gets the minutes of a Date object, using local time. */
|
|
getMinutes(): number;
|
|
>getMinutes : () => number
|
|
|
|
/** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
|
|
getUTCMinutes(): number;
|
|
>getUTCMinutes : () => number
|
|
|
|
/** Gets the seconds of a Date object, using local time. */
|
|
getSeconds(): number;
|
|
>getSeconds : () => number
|
|
|
|
/** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
|
|
getUTCSeconds(): number;
|
|
>getUTCSeconds : () => number
|
|
|
|
/** Gets the milliseconds of a Date, using local time. */
|
|
getMilliseconds(): number;
|
|
>getMilliseconds : () => number
|
|
|
|
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
|
|
getUTCMilliseconds(): number;
|
|
>getUTCMilliseconds : () => number
|
|
|
|
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
|
|
getTimezoneOffset(): number;
|
|
>getTimezoneOffset : () => number
|
|
|
|
/**
|
|
* Sets the date and time value in the Date object.
|
|
* @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
|
|
*/
|
|
setTime(time: number): number;
|
|
>setTime : (time: number) => number
|
|
>time : number
|
|
|
|
/**
|
|
* Sets the milliseconds value in the Date object using local time.
|
|
* @param ms A numeric value equal to the millisecond value.
|
|
*/
|
|
setMilliseconds(ms: number): number;
|
|
>setMilliseconds : (ms: number) => number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param ms A numeric value equal to the millisecond value.
|
|
*/
|
|
setUTCMilliseconds(ms: number): number;
|
|
>setUTCMilliseconds : (ms: number) => number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the seconds value in the Date object using local time.
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setSeconds(sec: number, ms?: number): number;
|
|
>setSeconds : (sec: number, ms?: number) => number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setUTCSeconds(sec: number, ms?: number): number;
|
|
>setUTCSeconds : (sec: number, ms?: number) => number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the minutes value in the Date object using local time.
|
|
* @param min A numeric value equal to the minutes value.
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setMinutes(min: number, sec?: number, ms?: number): number;
|
|
>setMinutes : (min: number, sec?: number, ms?: number) => number
|
|
>min : number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param min A numeric value equal to the minutes value.
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setUTCMinutes(min: number, sec?: number, ms?: number): number;
|
|
>setUTCMinutes : (min: number, sec?: number, ms?: number) => number
|
|
>min : number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the hour value in the Date object using local time.
|
|
* @param hours A numeric value equal to the hours value.
|
|
* @param min A numeric value equal to the minutes value.
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
|
|
>setHours : (hours: number, min?: number, sec?: number, ms?: number) => number
|
|
>hours : number
|
|
>min : number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the hours value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param hours A numeric value equal to the hours value.
|
|
* @param min A numeric value equal to the minutes value.
|
|
* @param sec A numeric value equal to the seconds value.
|
|
* @param ms A numeric value equal to the milliseconds value.
|
|
*/
|
|
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
|
|
>setUTCHours : (hours: number, min?: number, sec?: number, ms?: number) => number
|
|
>hours : number
|
|
>min : number
|
|
>sec : number
|
|
>ms : number
|
|
|
|
/**
|
|
* Sets the numeric day-of-the-month value of the Date object using local time.
|
|
* @param date A numeric value equal to the day of the month.
|
|
*/
|
|
setDate(date: number): number;
|
|
>setDate : (date: number) => number
|
|
>date : number
|
|
|
|
/**
|
|
* Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
|
|
* @param date A numeric value equal to the day of the month.
|
|
*/
|
|
setUTCDate(date: number): number;
|
|
>setUTCDate : (date: number) => number
|
|
>date : number
|
|
|
|
/**
|
|
* Sets the month value in the Date object using local time.
|
|
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
|
|
* @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
|
|
*/
|
|
setMonth(month: number, date?: number): number;
|
|
>setMonth : (month: number, date?: number) => number
|
|
>month : number
|
|
>date : number
|
|
|
|
/**
|
|
* Sets the month value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
|
|
* @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
|
|
*/
|
|
setUTCMonth(month: number, date?: number): number;
|
|
>setUTCMonth : (month: number, date?: number) => number
|
|
>month : number
|
|
>date : number
|
|
|
|
/**
|
|
* Sets the year of the Date object using local time.
|
|
* @param year A numeric value for the year.
|
|
* @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
|
|
* @param date A numeric value equal for the day of the month.
|
|
*/
|
|
setFullYear(year: number, month?: number, date?: number): number;
|
|
>setFullYear : (year: number, month?: number, date?: number) => number
|
|
>year : number
|
|
>month : number
|
|
>date : number
|
|
|
|
/**
|
|
* Sets the year value in the Date object using Universal Coordinated Time (UTC).
|
|
* @param year A numeric value equal to the year.
|
|
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
|
|
* @param date A numeric value equal to the day of the month.
|
|
*/
|
|
setUTCFullYear(year: number, month?: number, date?: number): number;
|
|
>setUTCFullYear : (year: number, month?: number, date?: number) => number
|
|
>year : number
|
|
>month : number
|
|
>date : number
|
|
|
|
/** Returns a date converted to a string using Universal Coordinated Time (UTC). */
|
|
toUTCString(): string;
|
|
>toUTCString : () => string
|
|
|
|
/** Returns a date as a string value in ISO format. */
|
|
toISOString(): string;
|
|
>toISOString : () => string
|
|
|
|
/** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
|
|
toJSON(key?: any): string;
|
|
>toJSON : (key?: any) => string
|
|
>key : any
|
|
}
|
|
|
|
declare var Date: {
|
|
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
|
|
|
|
new (): Date;
|
|
>Date : Date
|
|
|
|
new (value: number): Date;
|
|
>value : number
|
|
>Date : Date
|
|
|
|
new (value: string): Date;
|
|
>value : string
|
|
>Date : Date
|
|
|
|
new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
|
>year : number
|
|
>month : number
|
|
>date : number
|
|
>hours : number
|
|
>minutes : number
|
|
>seconds : number
|
|
>ms : number
|
|
>Date : Date
|
|
|
|
(): string;
|
|
prototype: Date;
|
|
>prototype : Date
|
|
>Date : Date
|
|
|
|
/**
|
|
* Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
|
|
* @param s A date string
|
|
*/
|
|
parse(s: string): number;
|
|
>parse : (s: string) => number
|
|
>s : string
|
|
|
|
/**
|
|
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
|
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
|
|
* @param month The month as an number between 0 and 11 (January to December).
|
|
* @param date The date as an number between 1 and 31.
|
|
* @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
* @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
|
|
* @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
|
|
* @param ms An number from 0 to 999 that specifies the milliseconds.
|
|
*/
|
|
UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
|
>UTC : (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number) => number
|
|
>year : number
|
|
>month : number
|
|
>date : number
|
|
>hours : number
|
|
>minutes : number
|
|
>seconds : number
|
|
>ms : number
|
|
|
|
now(): number;
|
|
>now : () => number
|
|
}
|
|
|
|
interface RegExpExecArray {
|
|
>RegExpExecArray : RegExpExecArray
|
|
|
|
[index: number]: string;
|
|
>index : number
|
|
|
|
length: number;
|
|
>length : number
|
|
|
|
index: number;
|
|
>index : number
|
|
|
|
input: string;
|
|
>input : string
|
|
|
|
toString(): string;
|
|
>toString : () => string
|
|
|
|
toLocaleString(): string;
|
|
>toLocaleString : () => string
|
|
|
|
concat(...items: string[][]): string[];
|
|
>concat : (...items: string[][]) => string[]
|
|
>items : string[][]
|
|
|
|
join(separator?: string): string;
|
|
>join : (separator?: string) => string
|
|
>separator : string
|
|
|
|
pop(): string;
|
|
>pop : () => string
|
|
|
|
push(...items: string[]): number;
|
|
>push : (...items: string[]) => number
|
|
>items : string[]
|
|
|
|
reverse(): string[];
|
|
>reverse : () => string[]
|
|
|
|
shift(): string;
|
|
>shift : () => string
|
|
|
|
slice(start?: number, end?: number): string[];
|
|
>slice : (start?: number, end?: number) => string[]
|
|
>start : number
|
|
>end : number
|
|
|
|
sort(compareFn?: (a: string, b: string) => number): string[];
|
|
>sort : (compareFn?: (a: string, b: string) => number) => string[]
|
|
>compareFn : (a: string, b: string) => number
|
|
>a : string
|
|
>b : string
|
|
|
|
splice(start: number): string[];
|
|
>splice : { (start: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }
|
|
>start : number
|
|
|
|
splice(start: number, deleteCount: number, ...items: string[]): string[];
|
|
>splice : { (start: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }
|
|
>start : number
|
|
>deleteCount : number
|
|
>items : string[]
|
|
|
|
unshift(...items: string[]): number;
|
|
>unshift : (...items: string[]) => number
|
|
>items : string[]
|
|
|
|
indexOf(searchElement: string, fromIndex?: number): number;
|
|
>indexOf : (searchElement: string, fromIndex?: number) => number
|
|
>searchElement : string
|
|
>fromIndex : number
|
|
|
|
lastIndexOf(searchElement: string, fromIndex?: number): number;
|
|
>lastIndexOf : (searchElement: string, fromIndex?: number) => number
|
|
>searchElement : string
|
|
>fromIndex : number
|
|
|
|
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
|
|
>every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean
|
|
>callbackfn : (value: string, index: number, array: string[]) => boolean
|
|
>value : string
|
|
>index : number
|
|
>array : string[]
|
|
>thisArg : any
|
|
|
|
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
|
|
>some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean
|
|
>callbackfn : (value: string, index: number, array: string[]) => boolean
|
|
>value : string
|
|
>index : number
|
|
>array : string[]
|
|
>thisArg : any
|
|
|
|
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
|
|
>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
|
|
>callbackfn : (value: string, index: number, array: string[]) => void
|
|
>value : string
|
|
>index : number
|
|
>array : string[]
|
|
>thisArg : any
|
|
|
|
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
|
|
>map : (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any) => any[]
|
|
>callbackfn : (value: string, index: number, array: string[]) => any
|
|
>value : string
|
|
>index : number
|
|
>array : string[]
|
|
>thisArg : any
|
|
|
|
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
|
|
>filter : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => string[]
|
|
>callbackfn : (value: string, index: number, array: string[]) => boolean
|
|
>value : string
|
|
>index : number
|
|
>array : string[]
|
|
>thisArg : any
|
|
|
|
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
|
|
>reduce : (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any) => any
|
|
>callbackfn : (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any
|
|
>previousValue : any
|
|
>currentValue : any
|
|
>currentIndex : number
|
|
>array : string[]
|
|
>initialValue : any
|
|
|
|
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
|
|
>reduceRight : (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any) => any
|
|
>callbackfn : (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any
|
|
>previousValue : any
|
|
>currentValue : any
|
|
>currentIndex : number
|
|
>array : string[]
|
|
>initialValue : any
|
|
}
|
|
|
|
|
|
interface RegExp {
|
|
>RegExp : RegExp
|
|
|
|
/**
|
|
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
|
|
* @param string The String object or string literal on which to perform the search.
|
|
*/
|
|
exec(string: string): RegExpExecArray;
|
|
>exec : (string: string) => RegExpExecArray
|
|
>string : string
|
|
>RegExpExecArray : RegExpExecArray
|
|
|
|
/**
|
|
* Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
|
|
* @param string String on which to perform the search.
|
|
*/
|
|
test(string: string): boolean;
|
|
>test : (string: string) => boolean
|
|
>string : string
|
|
|
|
/** Returns a copy of the text of the regular expression pattern. Read-only. The rgExp argument is a Regular expression object. It can be a variable name or a literal. */
|
|
source: string;
|
|
>source : string
|
|
|
|
/** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
|
|
global: boolean;
|
|
>global : boolean
|
|
|
|
/** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
|
|
ignoreCase: boolean;
|
|
>ignoreCase : boolean
|
|
|
|
/** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
|
|
multiline: boolean;
|
|
>multiline : boolean
|
|
|
|
lastIndex: number;
|
|
>lastIndex : number
|
|
|
|
// Non-standard extensions
|
|
compile(): RegExp;
|
|
>compile : () => RegExp
|
|
>RegExp : RegExp
|
|
}
|
|
declare var RegExp: {
|
|
>RegExp : { (pattern: string, flags?: string): RegExp; new (pattern: string, flags?: string): RegExp; $1: string; $2: string; $3: string; $4: string; $5: string; $6: string; $7: string; $8: string; $9: string; lastMatch: string; }
|
|
|
|
new (pattern: string, flags?: string): RegExp;
|
|
>pattern : string
|
|
>flags : string
|
|
>RegExp : RegExp
|
|
|
|
(pattern: string, flags?: string): RegExp;
|
|
>pattern : string
|
|
>flags : string
|
|
>RegExp : RegExp
|
|
|
|
// Non-standard extensions
|
|
$1: string;
|
|
>$1 : string
|
|
|
|
$2: string;
|
|
>$2 : string
|
|
|
|
$3: string;
|
|
>$3 : string
|
|
|
|
$4: string;
|
|
>$4 : string
|
|
|
|
$5: string;
|
|
>$5 : string
|
|
|
|
$6: string;
|
|
>$6 : string
|
|
|
|
$7: string;
|
|
>$7 : string
|
|
|
|
$8: string;
|
|
>$8 : string
|
|
|
|
$9: string;
|
|
>$9 : string
|
|
|
|
lastMatch: string;
|
|
>lastMatch : string
|
|
}
|
|
|
|
interface Error {
|
|
>Error : Error
|
|
|
|
name: string;
|
|
>name : string
|
|
|
|
message: string;
|
|
>message : string
|
|
}
|
|
declare var Error: {
|
|
>Error : { (message?: string): Error; new (message?: string): Error; prototype: Error; }
|
|
|
|
new (message?: string): Error;
|
|
>message : string
|
|
>Error : Error
|
|
|
|
(message?: string): Error;
|
|
>message : string
|
|
>Error : Error
|
|
|
|
prototype: Error;
|
|
>prototype : Error
|
|
>Error : Error
|
|
}
|
|
|
|
interface EvalError extends Error {
|
|
>EvalError : EvalError
|
|
>Error : Error
|
|
}
|
|
declare var EvalError: {
|
|
>EvalError : { (message?: string): EvalError; new (message?: string): EvalError; prototype: EvalError; }
|
|
|
|
new (message?: string): EvalError;
|
|
>message : string
|
|
>EvalError : EvalError
|
|
|
|
(message?: string): EvalError;
|
|
>message : string
|
|
>EvalError : EvalError
|
|
|
|
prototype: EvalError;
|
|
>prototype : EvalError
|
|
>EvalError : EvalError
|
|
}
|
|
|
|
interface RangeError extends Error {
|
|
>RangeError : RangeError
|
|
>Error : Error
|
|
}
|
|
declare var RangeError: {
|
|
>RangeError : { (message?: string): RangeError; new (message?: string): RangeError; prototype: RangeError; }
|
|
|
|
new (message?: string): RangeError;
|
|
>message : string
|
|
>RangeError : RangeError
|
|
|
|
(message?: string): RangeError;
|
|
>message : string
|
|
>RangeError : RangeError
|
|
|
|
prototype: RangeError;
|
|
>prototype : RangeError
|
|
>RangeError : RangeError
|
|
}
|
|
|
|
interface ReferenceError extends Error {
|
|
>ReferenceError : ReferenceError
|
|
>Error : Error
|
|
}
|
|
declare var ReferenceError: {
|
|
>ReferenceError : { (message?: string): ReferenceError; new (message?: string): ReferenceError; prototype: ReferenceError; }
|
|
|
|
new (message?: string): ReferenceError;
|
|
>message : string
|
|
>ReferenceError : ReferenceError
|
|
|
|
(message?: string): ReferenceError;
|
|
>message : string
|
|
>ReferenceError : ReferenceError
|
|
|
|
prototype: ReferenceError;
|
|
>prototype : ReferenceError
|
|
>ReferenceError : ReferenceError
|
|
}
|
|
|
|
interface SyntaxError extends Error {
|
|
>SyntaxError : SyntaxError
|
|
>Error : Error
|
|
}
|
|
declare var SyntaxError: {
|
|
>SyntaxError : { (message?: string): SyntaxError; new (message?: string): SyntaxError; prototype: SyntaxError; }
|
|
|
|
new (message?: string): SyntaxError;
|
|
>message : string
|
|
>SyntaxError : SyntaxError
|
|
|
|
(message?: string): SyntaxError;
|
|
>message : string
|
|
>SyntaxError : SyntaxError
|
|
|
|
prototype: SyntaxError;
|
|
>prototype : SyntaxError
|
|
>SyntaxError : SyntaxError
|
|
}
|
|
|
|
interface TypeError extends Error {
|
|
>TypeError : TypeError
|
|
>Error : Error
|
|
}
|
|
declare var TypeError: {
|
|
>TypeError : { (message?: string): TypeError; new (message?: string): TypeError; prototype: TypeError; }
|
|
|
|
new (message?: string): TypeError;
|
|
>message : string
|
|
>TypeError : TypeError
|
|
|
|
(message?: string): TypeError;
|
|
>message : string
|
|
>TypeError : TypeError
|
|
|
|
prototype: TypeError;
|
|
>prototype : TypeError
|
|
>TypeError : TypeError
|
|
}
|
|
|
|
interface URIError extends Error {
|
|
>URIError : URIError
|
|
>Error : Error
|
|
}
|
|
declare var URIError: {
|
|
>URIError : { (message?: string): URIError; new (message?: string): URIError; prototype: URIError; }
|
|
|
|
new (message?: string): URIError;
|
|
>message : string
|
|
>URIError : URIError
|
|
|
|
(message?: string): URIError;
|
|
>message : string
|
|
>URIError : URIError
|
|
|
|
prototype: URIError;
|
|
>prototype : URIError
|
|
>URIError : URIError
|
|
}
|
|
|
|
interface JSON {
|
|
>JSON : JSON
|
|
|
|
/**
|
|
* Converts a JavaScript Object Notation (JSON) string into an object.
|
|
* @param text A valid JSON string.
|
|
* @param reviver A function that transforms the results. This function is called for each member of the object.
|
|
* If a member contains nested objects, the nested objects are transformed before the parent object is.
|
|
*/
|
|
parse(text: string, reviver?: (key: any, value: any) => any): any;
|
|
>parse : (text: string, reviver?: (key: any, value: any) => any) => any
|
|
>text : string
|
|
>reviver : (key: any, value: any) => any
|
|
>key : any
|
|
>value : any
|
|
|
|
/**
|
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
*/
|
|
stringify(value: any): string;
|
|
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }
|
|
>value : any
|
|
|
|
/**
|
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
* @param replacer A function that transforms the results.
|
|
*/
|
|
stringify(value: any, replacer: (key: string, value: any) => any): string;
|
|
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }
|
|
>value : any
|
|
>replacer : (key: string, value: any) => any
|
|
>key : string
|
|
>value : any
|
|
|
|
/**
|
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
* @param replacer Array that transforms the results.
|
|
*/
|
|
stringify(value: any, replacer: any[]): string;
|
|
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }
|
|
>value : any
|
|
>replacer : any[]
|
|
|
|
/**
|
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
* @param replacer A function that transforms the results.
|
|
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
|
*/
|
|
stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
|
|
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }
|
|
>value : any
|
|
>replacer : (key: string, value: any) => any
|
|
>key : string
|
|
>value : any
|
|
>space : any
|
|
|
|
/**
|
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
* @param replacer Array that transforms the results.
|
|
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
|
*/
|
|
stringify(value: any, replacer: any[], space: any): string;
|
|
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }
|
|
>value : any
|
|
>replacer : any[]
|
|
>space : any
|
|
}
|
|
/**
|
|
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
|
|
*/
|
|
declare var JSON: JSON;
|
|
>JSON : JSON
|
|
>JSON : JSON
|
|
|
|
|
|
/////////////////////////////
|
|
/// ECMAScript Array API (specially handled by compiler)
|
|
/////////////////////////////
|
|
|
|
interface Array<T> {
|
|
>Array : T[]
|
|
>T : T
|
|
|
|
/**
|
|
* Returns a string representation of an array.
|
|
*/
|
|
toString(): string;
|
|
>toString : () => string
|
|
|
|
toLocaleString(): string;
|
|
>toLocaleString : () => string
|
|
|
|
/**
|
|
* Combines two or more arrays.
|
|
* @param items Additional items to add to the end of array1.
|
|
*/
|
|
concat<U extends T[]>(...items: U[]): T[];
|
|
>concat : { <U extends T[]>(...items: U[]): T[]; (...items: T[]): T[]; }
|
|
>U : U
|
|
>T : T
|
|
>items : U[]
|
|
>U : U
|
|
>T : T
|
|
|
|
/**
|
|
* Combines two or more arrays.
|
|
* @param items Additional items to add to the end of array1.
|
|
*/
|
|
concat(...items: T[]): T[];
|
|
>concat : { <U extends T[]>(...items: U[]): T[]; (...items: T[]): T[]; }
|
|
>items : T[]
|
|
>T : T
|
|
>T : T
|
|
|
|
/**
|
|
* Adds all the elements of an array separated by the specified separator string.
|
|
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
|
|
*/
|
|
join(separator?: string): string;
|
|
>join : (separator?: string) => string
|
|
>separator : string
|
|
|
|
/**
|
|
* Removes the last element from an array and returns it.
|
|
*/
|
|
pop(): T;
|
|
>pop : () => T
|
|
>T : T
|
|
|
|
/**
|
|
* Appends new elements to an array, and returns the new length of the array.
|
|
* @param items New elements of the Array.
|
|
*/
|
|
push(...items: T[]): number;
|
|
>push : (...items: T[]) => number
|
|
>items : T[]
|
|
>T : T
|
|
|
|
/**
|
|
* Reverses the elements in an Array.
|
|
*/
|
|
reverse(): T[];
|
|
>reverse : () => T[]
|
|
>T : T
|
|
|
|
/**
|
|
* Removes the first element from an array and returns it.
|
|
*/
|
|
shift(): T;
|
|
>shift : () => T
|
|
>T : T
|
|
|
|
/**
|
|
* Returns a section of an array.
|
|
* @param start The beginning of the specified portion of the array.
|
|
* @param end The end of the specified portion of the array.
|
|
*/
|
|
slice(start?: number, end?: number): T[];
|
|
>slice : (start?: number, end?: number) => T[]
|
|
>start : number
|
|
>end : number
|
|
>T : T
|
|
|
|
/**
|
|
* Sorts an array.
|
|
* @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
|
|
*/
|
|
sort(compareFn?: (a: T, b: T) => number): T[];
|
|
>sort : (compareFn?: (a: T, b: T) => number) => T[]
|
|
>compareFn : (a: T, b: T) => number
|
|
>a : T
|
|
>T : T
|
|
>b : T
|
|
>T : T
|
|
>T : T
|
|
|
|
/**
|
|
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
|
* @param start The zero-based location in the array from which to start removing elements.
|
|
*/
|
|
splice(start: number): T[];
|
|
>splice : { (start: number): T[]; (start: number, deleteCount: number, ...items: T[]): T[]; }
|
|
>start : number
|
|
>T : T
|
|
|
|
/**
|
|
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
|
* @param start The zero-based location in the array from which to start removing elements.
|
|
* @param deleteCount The number of elements to remove.
|
|
* @param items Elements to insert into the array in place of the deleted elements.
|
|
*/
|
|
splice(start: number, deleteCount: number, ...items: T[]): T[];
|
|
>splice : { (start: number): T[]; (start: number, deleteCount: number, ...items: T[]): T[]; }
|
|
>start : number
|
|
>deleteCount : number
|
|
>items : T[]
|
|
>T : T
|
|
>T : T
|
|
|
|
/**
|
|
* Inserts new elements at the start of an array.
|
|
* @param items Elements to insert at the start of the Array.
|
|
*/
|
|
unshift(...items: T[]): number;
|
|
>unshift : (...items: T[]) => number
|
|
>items : T[]
|
|
>T : T
|
|
|
|
/**
|
|
* Returns the index of the first occurrence of a value in an array.
|
|
* @param searchElement The value to locate in the array.
|
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
*/
|
|
indexOf(searchElement: T, fromIndex?: number): number;
|
|
>indexOf : (searchElement: T, fromIndex?: number) => number
|
|
>searchElement : T
|
|
>T : T
|
|
>fromIndex : number
|
|
|
|
/**
|
|
* Returns the index of the last occurrence of a specified value in an array.
|
|
* @param searchElement The value to locate in the array.
|
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
|
|
*/
|
|
lastIndexOf(searchElement: T, fromIndex?: number): number;
|
|
>lastIndexOf : (searchElement: T, fromIndex?: number) => number
|
|
>searchElement : T
|
|
>T : T
|
|
>fromIndex : number
|
|
|
|
/**
|
|
* Determines whether all the members of an array satisfy the specified test.
|
|
* @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
|
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
*/
|
|
every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
|
|
>every : (callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => boolean
|
|
>callbackfn : (value: T, index: number, array: T[]) => boolean
|
|
>value : T
|
|
>T : T
|
|
>index : number
|
|
>array : T[]
|
|
>T : T
|
|
>thisArg : any
|
|
|
|
/**
|
|
* Determines whether the specified callback function returns true for any element of an array.
|
|
* @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
|
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
*/
|
|
some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
|
|
>some : (callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => boolean
|
|
>callbackfn : (value: T, index: number, array: T[]) => boolean
|
|
>value : T
|
|
>T : T
|
|
>index : number
|
|
>array : T[]
|
|
>T : T
|
|
>thisArg : any
|
|
|
|
/**
|
|
* Performs the specified action for each element in an array.
|
|
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
*/
|
|
forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
|
|
>forEach : (callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any) => void
|
|
>callbackfn : (value: T, index: number, array: T[]) => void
|
|
>value : T
|
|
>T : T
|
|
>index : number
|
|
>array : T[]
|
|
>T : T
|
|
>thisArg : any
|
|
|
|
/**
|
|
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
|
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
*/
|
|
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
|
>map : <U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]
|
|
>U : U
|
|
>callbackfn : (value: T, index: number, array: T[]) => U
|
|
>value : T
|
|
>T : T
|
|
>index : number
|
|
>array : T[]
|
|
>T : T
|
|
>U : U
|
|
>thisArg : any
|
|
>U : U
|
|
|
|
/**
|
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
* @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
|
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
*/
|
|
filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
|
|
>filter : (callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => T[]
|
|
>callbackfn : (value: T, index: number, array: T[]) => boolean
|
|
>value : T
|
|
>T : T
|
|
>index : number
|
|
>array : T[]
|
|
>T : T
|
|
>thisArg : any
|
|
>T : T
|
|
|
|
/**
|
|
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
*/
|
|
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
|
|
>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
|
|
>callbackfn : (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T
|
|
>previousValue : T
|
|
>T : T
|
|
>currentValue : T
|
|
>T : T
|
|
>currentIndex : number
|
|
>array : T[]
|
|
>T : T
|
|
>T : T
|
|
>initialValue : T
|
|
>T : T
|
|
>T : T
|
|
|
|
/**
|
|
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
*/
|
|
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
|
>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
|
|
>U : U
|
|
>callbackfn : (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U
|
|
>previousValue : U
|
|
>U : U
|
|
>currentValue : T
|
|
>T : T
|
|
>currentIndex : number
|
|
>array : T[]
|
|
>T : T
|
|
>U : U
|
|
>initialValue : U
|
|
>U : U
|
|
>U : U
|
|
|
|
/**
|
|
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
*/
|
|
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
|
|
>reduceRight : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
|
|
>callbackfn : (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T
|
|
>previousValue : T
|
|
>T : T
|
|
>currentValue : T
|
|
>T : T
|
|
>currentIndex : number
|
|
>array : T[]
|
|
>T : T
|
|
>T : T
|
|
>initialValue : T
|
|
>T : T
|
|
>T : T
|
|
|
|
/**
|
|
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
*/
|
|
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
|
>reduceRight : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
|
|
>U : U
|
|
>callbackfn : (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U
|
|
>previousValue : U
|
|
>U : U
|
|
>currentValue : T
|
|
>T : T
|
|
>currentIndex : number
|
|
>array : T[]
|
|
>T : T
|
|
>U : U
|
|
>initialValue : U
|
|
>U : U
|
|
>U : U
|
|
|
|
/**
|
|
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
|
|
*/
|
|
length: number;
|
|
>length : number
|
|
|
|
[n: number]: T;
|
|
>n : number
|
|
>T : T
|
|
}
|
|
declare var Array: {
|
|
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
|
|
|
new (arrayLength?: number): any[];
|
|
>arrayLength : number
|
|
|
|
new <T>(arrayLength: number): T[];
|
|
>T : T
|
|
>arrayLength : number
|
|
>T : T
|
|
|
|
new <T>(...items: T[]): T[];
|
|
>T : T
|
|
>items : T[]
|
|
>T : T
|
|
>T : T
|
|
|
|
(arrayLength?: number): any[];
|
|
>arrayLength : number
|
|
|
|
<T>(arrayLength: number): T[];
|
|
>T : T
|
|
>arrayLength : number
|
|
>T : T
|
|
|
|
<T>(...items: T[]): T[];
|
|
>T : T
|
|
>items : T[]
|
|
>T : T
|
|
>T : T
|
|
|
|
isArray(arg: any): boolean;
|
|
>isArray : (arg: any) => boolean
|
|
>arg : any
|
|
|
|
prototype: Array<any>;
|
|
>prototype : any[]
|
|
>Array : T[]
|
|
}
|