Skip to content

Record.fromEntries argument type assertion #78

@unadlib

Description

@unadlib

Describe the bug
It's Record.fromEntries argument type assertion issue, which is an array-like object for each item in its argument.

To Reproduce

const record = Record.fromEntries([["a", 1], #["b", 2], "c3"]);
console.log(record);
// print:  Record {a: 1, b: 2, c: "3"}

Expected behavior
In terms of Record.fromEntries spec, it should throw this error.

Uncaught TypeError: Iterator value c3 is not an entry object

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions