# lib/built-in.jsx

The file defines the APIs of the built-in objects of JSX, designed to be compatible to the 3rd edition of the ECMA-262 standard whenever possible.

The description of the API is based on the MDN JavaScript Reference under the Creative Commons: Attribution-Sharealike license.

## final class Map.<T>

Map is an associative container that contains a list of unique key-value pairs. Type of the keys are strings, type of the values are Nullable.<T>.

### final function hasOwnProperty(key : string) : boolean

## final class Array.<T>

Array is a sequence of Nullable.<T> values. The size of an array is not fixed.

Unless otherwise noted, the defintions of the methods match those specified in ECMA-262, 3rd edition.

### var length : number

A positive integer between 0 and a value less than 232 that specifies the number of elements in an array.

You can set the length property to truncate an array at any time. When you extend an array by changing its length property, the created elements are initialized to null.

### new Array()

### new Array(length : number)

### final override function toString() : string

### final function toLocaleString() : string

### final function concat(arrayN : ...Array.<T>) : Array.<T>

### final function join() : string

### final function join(separator : string) : string

### final function pop() : Nullable.<T>

### final function push(itemN : ...T) : int

### final function reverse() : Array.<T>

### final function shift() : Nullable.<T>

### final function slice(start : number) : Array.<T>

### final function slice(start : number, end : number) : Array.<T>

### final function sort() : Array.<T>

### final function sort(comparefn : function (:Nullable.<T>, :Nullable.<T>) : number) : Array.<T>

### final function splice(start : number, deleteCount : number, itemN : ...T) : Array.<T>

### final function unshift(itemN : ...T) : int

### final function indexOf(value : Nullable.<T>) : number

### final function indexOf(value : Nullable.<T>, fromIndex : number) : number

### final function lastIndexOf(value : Nullable.<T>) : number

### final function lastIndexOf(value : Nullable.<T>, fromIndex : number) : number

### final function every(callbackfn : function (:Nullable.<T>) : boolean) : boolean

### final function every(callbackfn : function (:Nullable.<T>, :number) : boolean) : boolean

### final function every(callbackfn : function (:Nullable.<T>, :number, :Array.<T>) : boolean) : boolean

### final function some(callbackfn : function (:Nullable.<T>) : boolean) : boolean

### final function some(callbackfn : function (:Nullable.<T>, :number) : boolean) : boolean

### final function some(callbackfn : function (:Nullable.<T>, :number, :Array.<T>) : boolean) : boolean

### final inline function forEach(callbackfn : function (:Nullable.<T>) : void) : void

### final function forEach(callbackfn : function (:Nullable.<T>, :number) : void) : void

### final function forEach(callbackfn : function (:Nullable.<T>, :number, :Array.<T>) : void) : void

### final function map.<U>(callbackfn : function (:Nullable.<T>) : Nullable.<U>) : Array.<U>

### final function map.<U>(callbackfn : function (:Nullable.<T>, :number) : Nullable.<U>) : Array.<U>

### final function map.<U>(callbackfn : function (:Nullable.<T>, :number, :Array.<T>) : Nullable.<U>) : Array.<U>

### final function filter(callbackfn : function (:Nullable.<T>) : boolean) : Array.<T>

### final function filter(callbackfn : function (:Nullable.<T>, :number) : boolean) : Array.<T>

### final function filter(callbackfn : function (:Nullable.<T>, :number, :Array.<T>) : boolean) : Array.<T>

### final function reduce(callbackfn : function (:Nullable.<T>, :Nullable.<T>) : Nullable.<T>) : Array.<T>

### final function reduce(callbackfn : function (:Nullable.<T>, :Nullable.<T>) : Nullable.<T>, initialValue : T) : Array.<T>

### final function reduceRight(callbackfn : function (:Nullable.<T>, :Nullable.<T>) : Nullable.<T>) : Array.<T>

### final function reduceRight(callbackfn : function (:Nullable.<T>, :Nullable.<T>) : Nullable.<T>, initialValue : T) : Array.<T>

## class Object

The root class of all classes.

### new Object()

### function toString() : string

## final class Function

A class representing a static function. Unlike JavaScript, JSX does not provide Function#call() or Function#apply() since it is a statically-typed language.

## final class String

A wrapper object for primitive `string`s.

Unless otherwise noted, the defintions of the methods match those specified in ECMA-262, 3rd edition.

### var length : int

The length of a string.

### new String()

### new String(s : string)

### static final function fromCharCode(charN : ...number) : string

### final override function toString() : string

### final function valueOf() : string

### final function charAt(pos : number) : string

### final function charCodeAt(pos : number) : number

### final function concat(stringN : ...String) : string

### final function indexOf(searchString : string) : int

### final function indexOf(searchString : string, position : number) : int

### final function lastIndexOf(searchString : string) : int

### final function lastIndexOf(searchString : string, position : number) : int

### final function localeCompare(that : string) : number

### final function match(regexp : RegExp) : Array.<string>

### final function replace(searchValue : string, replaceValue : string) : string

### final function replace(searchValue : RegExp, replaceValue : string) : string

### final function replace(searchValue : string, replaceValue : function (:string) : string) : string

### final function replace(searchValue : RegExp, replaceValue : function (:string) : string) : string

### final function search(searchValue : string) : int

### final function search(searchValue : RegExp) : int

### final function slice(start : number) : string

### final function slice(start : number, end : number) : string

### final function split(separator : string) : Array.<string>

### final function split(separator : string, limit : number) : Array.<string>

### final function split(separator : RegExp) : Array.<string>

### final function split(separator : RegExp, limit : number) : Array.<string>

### final function substring(start : number) : string

### final function substring(start : number, end : number) : string

### final function toLowerCase() : string

### final function toLocaleLowerCase() : string

### final function toUpperCase() : string

### final function toLocaleUpperCase() : string

### final function trim() : string

### static final function encodeURIComponent(str : string) : string

### static final function decodeURIComponent(encodedURI : string) : string

### static final function encodeURI(str : string) : string

### static final function decodeURI(encodedURI : string) : string

## final class Boolean

A wrapper object for primitive `boolean`s.

### new Boolean()

### new Boolean(value : boolean)

### final override function toString() : string

### final function valueOf() : boolean

## final class Number

A wrapper object for primitive `number`s.

### static const var MAX_VALUE : number

The maximum numeric value representable.

### static const var MIN_VALUE : number

The minimum numeric value representable.

### new Number()

### new Number(value : number)

### final override function toString() : string

### final function toString(radix : number) : string

### final function toLocaleString() : string

### final function valueOf() : number

### final function toFixed(fractionDigits : number) : string

### final function toExponential(fractionDigits : number) : string

### final function toPrecision(precision : number) : string

### static final function parseInt(str : string) : number

### static final function parseInt(str : string, radix : number) : number

### static final function parseFloat(str : string) : number

### static final function isNaN(num : number) : boolean

### static final function isFinite(num : number) : boolean

## final class Math

Provides mathmetical constants and functions.

Unless otherwise noted, the defintions of the methods match those specified in ECMA-262, 3rd edition.

### static const var E : number

Euler's constant and the base of natural logarithms, approximately 2.718.

### static const var LN10 : number

Natural logarithm of 10, approximately 2.302.

### static const var LN2 : number

Natural logarithm of 2, approximately 0.693.

### static const var LOG2E : number

Base 2 logarithm of E, approximately 1.442.

### static const var LOG10E : number

Base 10 logarithm of E, approximately 0.434.

### static const var PI : number

Ratio of the circumference of a circle to its diameter, approximately 3.14159.

### static const var SQRT1_2 : number

Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707.

### static const var SQRT2 : number

Square root of 2, approximately 1.414.

### static final function abs(x : number) : number

### static final function acos(x : number) : number

### static final function asin(x : number) : number

### static final function atan(x : number) : number

### static final function atan2(y : number, x : number) : number

### static final function ceil(x : number) : number

### static final function cos(x : number) : number

### static final function exp(x : number) : number

### static final function floor(x : number) : number

### static final function log(x : number) : number

### static final function max(value1 : number, value2 : number, value3 : number, valueN : ...number) : number

### static final function max(value1 : number) : number

### static final function min(value1 : number, value2 : number, value3 : number, valueN : ...number) : number

### static final function min(value1 : number) : number

### static final function pow(x : number, y : number) : number

### static final function random() : number

### static final function round(x : number) : number

### static final function sin(x : number) : number

### static final function sqrt(x : number) : number

### static final function tan(x : number) : number

### static final function max(value1 : number, value2 : number) : number

### static final function min(value1 : number, value2 : number) : number

## final class Date

An object for working with dates and times.

Unless otherwise noted, the defintions of the methods match those specified in ECMA-262, 3rd edition.

### new Date(year : number, month : number)

### new Date(year : number, month : number, date : number)

### new Date(year : number, month : number, date : number, hours : number)

### new Date(year : number, month : number, date : number, hours : number, minutes : number)

### new Date(year : number, month : number, date : number, hours : number, minutes : number, seconds : number)

### new Date(year : number, month : number, date : number, hours : number, minutes : number, seconds : number, ms : number)

### new Date(value : string)

### new Date(value : number)

### new Date(value : Date)

### new Date()

### static final function parse(value : string) : number

### static final function UTC(year : number, month : number) : number

### static final function UTC(year : number, month : number, date : number) : number

### static final function UTC(year : number, month : number, date : number, hours : number) : number

### static final function UTC(year : number, month : number, date : number, hours : number, minutes : number) : number

### static final function UTC(year : number, month : number, date : number, hours : number, minutes : number, seconds : number) : number

### static final function UTC(year : number, month : number, date : number, hours : number, minutes : number, seconds : number, ms : number) : number

### static final function now() : number

### final override function toString() : string

### final function toDateString() : string

### final function toTimeString() : string

### final function toLocaleString() : string

### final function toLocaleDateString() : string

### final function toLocaleTimeString() : string

### final function valueOf() : number

### final function getTime() : number

### final function getFullYear() : number

### final function getUTCFullYear() : number

### final function getMonth() : number

### final function getUTCMonth() : number

### final function getDate() : number

### final function getUTCDate() : number

### final function getDay() : number

### final function getUTCDay() : number

### final function getHours() : number

### final function getUTCHours() : number

### final function getMinutes() : number

### final function getUTCMinutes() : number

### final function getSeconds() : number

### final function getUTCSeconds() : number

### final function getMilliseconds() : number

### final function getUTCMilliseconds() : number

### final function getTimezoneOffset() : number

### final function setTime(time : number) : number

### final function setMilliseconds(ms : number) : number

### final function setUTCMilliseconds(ms : number) : number

### final function setSeconds(sec : number) : number

### final function setUTCSeconds(sec : number) : number

### final function setMinutes(min : number) : number

### final function setUTCMinutes(min : number) : number

### final function setHours(hour : number) : number

### final function setUTCHours(hour : number) : number

### final function setDate(date : number) : number

### final function setUTCDate(date : number) : number

### final function setMonth(month : number) : number

### final function setUTCMonth(month : number) : number

### final function setFullYear(year : number) : number

### final function setUTCFullYear(year : number) : number

### final function toUTCString() : string

### final function toISOString() : string

### final function toJSON() : string

### final function toJSON(key : string) : string

## final class RegExp

An object that represents a regular-expression.

Unless otherwise noted, the defintions of the methods match those specified in ECMA-262, 3rd edition.

### var source : string

### var global : boolean

### var ignoreCase : boolean

### var multiline : boolean

### var lastIndex : int

### new RegExp(pattern : string, flags : string)

### new RegExp(pattern : string)

### new RegExp(pattern : RegExp)

### final function exec(str : string) : Array.<string>

### final function test(str : string) : boolean

### final override function toString() : string

## class Error

### var name : string

### var message : string

### new Error()

### new Error(message : string)

## class EvalError

### new EvalError()

### new EvalError(message : string)

## class RangeError

### new RangeError()

### new RangeError(message : string)

## class ReferenceError

### new ReferenceError()

### new ReferenceError(message : string)

## class SyntaxError

### new SyntaxError()

### new SyntaxError(message : string)

## class TypeError

### new TypeError()

### new TypeError(message : string)

## final class JSON

### static final function parse(text : string) : variant

### static final function parse(text : string, reviver : function (:string, :variant) : variant) : variant

### static final function stringify(value : variant) : string

### static final function stringify(value : variant, replacer : function (:string, :variant) : variant) : string

### static final function stringify(value : variant, replacer : function (:string, :variant) : variant, space : number) : string

## final class JSX

Provides static functions to control the behaviour of the JSX runtime.

### static final function profilerIsRunning() : boolean

### static final function getProfileResults() : variant

### static final function postProfileResults(url : string) : void

### static final function resetProfileResults() : void