Demo/bin/Debug/front_end/es6.js

(开头部分) 18KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * Copyright 2014 The Closure Compiler Authors
 *
 * 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
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//TODO(sergeyv): this file is forked from usual es6.js extern baked into closure compiler
//In original extern Iterator doesn't implement Iterable and as a result you can't iterate over map.values()

/**
 * @fileoverview Definitions for ECMAScript 6.
 * @see http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
 * @see https://www.khronos.org/registry/typedarray/specs/latest/
 * @externs
 */

// TODO(johnlenz): symbol should be a primitive type.
/** @typedef {?} */
var symbol;

/**
 * @param {string} description
 * @return {symbol}
 */
function Symbol(description) {}

/** @const {symbol} */
Symbol.iterator;


/**
 * @interface
 * @template VALUE
 */
function Iterable() {}

// TODO(johnlenz): remove this when the compiler understands "symbol" natively
/**
 * @return {Iterator.<VALUE>}
 * @suppress {externsValidation}
 */
Iterable.prototype[Symbol.iterator] = function() {};



// TODO(johnlenz): Iterator should be a templated record type.
/**
 * @interface
 * @extends {Iterable.<VALUE>}
 * @template VALUE
后面还有 800 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。