Skip to content

Should new Uint8Array(arr) take ReadonlyArray<number> ? #4302

@KimlikDAO-bot

Description

@KimlikDAO-bot

Currently TypedArray constructors do not accept ReadonlyArray<number> even though the .from() static method only requires IArrayLike<number>. Here is the constructor and the static method for Uint8Array for instance. Is this intentional? Can we allow ReadonlyArray<number> in the constructor?

If this is consistent with the intended typing and design, I will send a PR.

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