2 * Copyright 2009 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @fileoverview Definitions for ECMAScript 5.
19 * @see http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf
25 * @param {Object|undefined} selfObj Specifies the object to which |this| should
26 * point when the function is run. If the value is null or undefined, it
27 * will default to the global object.
28 * @param {...*} var_args Additional arguments that are partially
30 * @return {!Function} A partially-applied form of the Function on which
31 * bind() was invoked as a method.
33 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
35 Function
.prototype.bind = function(selfObj
, var_args
) {};
39 * @this {String|string}
42 * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/Trim
44 String
.prototype.trim = function() {};
48 * @this {String|string}
51 * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimLeft
53 String
.prototype.trimLeft = function() {};
57 * @this {String|string}
60 * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimRight
62 String
.prototype.trimRight = function() {};
66 * A object property descriptor used by Object.create, Object.defineProperty,
67 * Object.defineProperties, Object.getOwnPropertyDescriptor.
69 * Note: not a real constructor.
72 var ObjectPropertyDescriptor = function(){};
75 ObjectPropertyDescriptor
.prototype.value
;
77 /** @type {(function():?)||undefined} */
78 ObjectPropertyDescriptor
.prototype.get;
80 /** @type {(function(?):void)||undefined} */
81 ObjectPropertyDescriptor
.prototype.set;
83 /** @type {boolean|undefined} */
84 ObjectPropertyDescriptor
.prototype.writable
;
86 /** @type {boolean|undefined} */
87 ObjectPropertyDescriptor
.prototype.enumerable
;
89 /** @type {boolean|undefined} */
90 ObjectPropertyDescriptor
.prototype.configurable
;
94 * @param {Object} proto
95 * @param {Object=} opt_properties A map of ObjectPropertyDescriptors.
98 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create
100 Object
.create = function(proto
, opt_properties
) {};
104 * @param {!Object} obj
105 * @param {string} prop
106 * @param {!Object} descriptor A ObjectPropertyDescriptor.
108 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty
110 Object
.defineProperty = function(obj
, prop
, descriptor
) {};
114 * @param {!Object} obj
115 * @param {!Object} props A map of ObjectPropertyDescriptors.
117 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperties
119 Object
.defineProperties = function(obj
, props
) {};
123 * @param {!Object} obj
124 * @param {string} prop
125 * @return {!ObjectPropertyDescriptor|undefined}
127 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor
129 Object
.getOwnPropertyDescriptor = function(obj
, prop
) {};
133 * @param {!Object} obj
134 * @return {!Array.<string>}
136 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
138 Object
.keys = function(obj
) {};
142 * @param {!Object} obj
143 * @return {!Array.<string>}
145 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames
147 Object
.getOwnPropertyNames = function(obj
) {};
151 * @param {!Object} obj
154 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/GetPrototypeOf
156 Object
.getPrototypeOf = function(obj
) {};
163 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/preventExtensions
165 Object
.preventExtensions = function(obj
) {};
172 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/seal
174 Object
.seal = function(obj
) {};
181 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze
183 Object
.freeze = function(obj
) {};
187 * @param {!Object} obj
190 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isExtensible
192 Object
.isExtensible = function(obj
) {};
196 * @param {!Object} obj
199 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isSealed
201 Object
.isSealed = function(obj
) {};
205 * @param {!Object} obj
208 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isFrozen
210 Object
.isFrozen = function(obj
) {};
214 * As per ECMAScript 5, 15.12.3.
215 * @param {string=} opt_key The JSON key for this object.
216 * @return {*} The serializable representation of this object. Note that this
217 * need not be a string. See http://goo.gl/PEUvs.
219 Object
.prototype.toJSON = function(opt_key
) {};
223 * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toISOString
226 Date
.prototype.toISOString = function() {};
230 * @param {*=} opt_ignoredKey
234 Date
.prototype.toJSON = function(opt_ignoredKey
) {};
238 * A fake type to model the JSON object.
241 var JSONType = function() {};
245 * @param {string} jsonStr The string to parse.
246 * @param {(function(string, *) : *)=} opt_reviver
247 * @return {*} The JSON object.
251 JSONType
.prototype.parse = function(jsonStr
, opt_reviver
) {};
255 * @param {*} jsonObj Input object.
256 * @param {(Array.<string>|(function(string, *) : *)|null)=} opt_replacer
257 * @param {(number|string)=} opt_space
258 * @return {string} JSON string which represents jsonObj.
262 JSONType
.prototype.stringify = function(jsonObj
, opt_replacer
, opt_space
) {};
267 * @suppress {duplicate}