Skip to content

Empty constructors for TypedArrays are not allowed #19680

@ltetzlaff

Description

@ltetzlaff

Typescript currently does not support empty constructors of TypedArrays, as in mdn UInt8Array, thx to sindresorhus for pointing that out.

TypeScript Version: 2.7.0-dev.201xxxxx

Code

const x = new Uint8Array()

Expected behavior:
works
Actual behavior:
Error: Expected 1-3 arguments, but got 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptES2017Relates to the ES2017 SpecFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions