Skip to content

unicorn/prefer-spread: ArrayBuffer.prototype.slice incorrectly linted #2818

@KieranP

Description

@KieranP

unicorn/prefer-spread is turning arrayBuffer.slice(0) into [...arrayBuffer], which is not valid and errors in TS:

Type 'ArrayBuffer' must have a '[Symbol.iterator]()' method that returns an iterator. (ts 2488)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtypesIssues that happen in TypeScript or that require types

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions