Skip to content

ImageData's data isn't Uint8ClampedArray! #5338

Closed
@GoToLoop

Description

@GoToLoop

https://GitHub.com/Microsoft/TypeScript/blob/master/lib/lib.d.ts#L11052
https://GitHub.com/Microsoft/TypeScript/blob/master/lib/lib.es6.d.ts#L12367

interface ImageData {
    data: number[]; // should be Uint8ClampedArray type here...
    height: number;
    width: number;
}

According to https://developer.Mozilla.org/en-US/docs/Web/API/ImageData/data
data readonly property needs to be Uint8ClampedArray, not some mere number[].

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions