Skip to content

fix(dts): Update type of ArrayBuffer #54636

Closed
@indrajitbnikam

Description

@indrajitbnikam

lib Update Request

The problem is that proper types are not available when Resizable ArrayBuffer need to be created by passing options in the constructor.

Configuration Check

My compilation target is ESnext and my lib is the default.

Missing / Incorrect Definition

ArrayBuffer Constructor signature.

Sample Code

const buff = new ArrayBuffer(10, {
  maxByteLength: 100,
});

console.debug(buff.resizable);
console.debug(buff.byteLength);

buff.resize(100);
console.debug(buff.byteLength);

Documentation Link

You can check the signature over here.

ArrayBuffer() constructor

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions