For AI agents: the complete documentation index is available at /tc39-atlas/llms.txt, the full documentation bundle is available at /tc39-atlas/llms-full.txt, and this page is available as Markdown at /tc39-atlas/proposals/proposal-setmap-offrom.md.
  • 简体中文
  • of and from on collection constructors S1

    中文标题:集合构造器上的 of 和 from 方法

    提案概览
    提案速览

    该提案旨在为集合构造器(如 Set 和 Map)添加静态的 offrom 方法,源于 Brendan Eich 关于数组功能对等的推文。

    Note

    以下 README 来自上游仓库,其中的阶段或状态标注可能滞后;当前信息以提案概览为准。

    集合构造器上的 offrom 方法

    提案发起人

    • Kevin Gibbons
    • Allen Wirfs-Brock
    • Leo Balter

    状态

    该提案目前处于 TC39 流程 的第 1 阶段。

    动机

    https://twitter.com/BrendanEich/status/771009446298329088

    问题

    https://github.com/tc39/proposal-setmap-offrom/issues

    填充库

    core-js 库中提供了填充实现。您可以在 ECMAScript 提案部分 找到它。