2 * Copyright 2014 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 6.
19 * @see http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
23 // TODO(johnlenz): Use Tuples for the Map and Set iterators where appropriate.
27 * @param {Iterable.<!Array.<KEY|VALUE>>|!Array.<!Array.<KEY|VALUE>>=} opt_iterable
28 * @implements {Iterable.<!Array.<KEY|VALUE>>}
29 * @template KEY, VALUE
30 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
32 function Map(opt_iterable) {}
44 * @return {!Iterator.<!Array.<KEY|VALUE>>}
47 Map.prototype.entries;
50 * @param {function(this:THIS, VALUE, KEY, MAP):void} callback
51 * @param {THIS} thisArg
55 Map.prototype.forEach;
59 * @return {VALUE|undefined}
72 * @return {!Iterator.<KEY>}
78 * @param {VALUE} value
92 * @return {!Iterator.<VALUE>}
98 * @return {!Iterator.<!Array.<KEY|VALUE>>}
100 Map.prototype[Symbol.iterator] = function() {};
105 * @param {Iterable.<!Array.<KEY|VALUE>>|!Array.<!Array.<KEY|VALUE>>=} opt_iterable
106 * @template KEY, VALUE
107 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
109 function WeakMap(opt_iterable) {}
111 /** @return {void} */
112 WeakMap.prototype.clear;
118 WeakMap.prototype.delete;
122 * @return {VALUE|undefined}
125 WeakMap.prototype.get;
132 WeakMap.prototype.has;
136 * @param {VALUE} value
141 WeakMap.prototype.set;
147 * @param {Iterable.<VALUE>|Array.<VALUE>=} opt_iterable
148 * @implements {Iterable.<VALUE>}
150 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
152 function Set(opt_iterable) {}
155 * @param {VALUE} value
168 * @param {VALUE} value
171 Set.prototype.delete;
174 * @return {!Iterator.<!Array.<VALUE>>} Where each array has two entries:
178 Set.prototype.entries;
181 * @param {function(VALUE, VALUE, SET)} callback
182 * @param {THIS} thisArg
186 Set.prototype.forEach;
189 * @param {VALUE} value
196 * @type {number} (readonly)
201 * @return {!Iterator.<VALUE>}
207 * @return {!Iterator.<VALUE>}
210 Set.prototype.values;
213 * @return {!Iterator.<VALUE>}
215 Set.prototype[Symbol.iterator] = function() {};
221 * @param {Iterable.<VALUE>|Array.<VALUE>=} opt_iterable
223 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
225 function WeakSet(opt_iterable) {}
228 * @param {VALUE} value
233 WeakSet.prototype.add;
238 WeakSet.prototype.clear;
241 * @param {VALUE} value
244 WeakSet.prototype.delete;
247 * @param {VALUE} value
251 WeakSet.prototype.has;