Skip to content

Change rgbaArray type definition to a tuple #1590

@acashjos

Description

@acashjos

Feature Request

More of a tiny typedef improvement suggestion.
I accidentally imported rgbaArray from index.d.ts of this module today, and noticed that its a ReadonlyArray<number>.
This type can have n number of items, while I'd expect an rgba type to have only 4 number items.

Code sample

Changing
export type rgbaArray = ReadonlyArray<number>;
to
export type rgbaArray =Readonly<[r:number, g: number, b: number, a: number]>;

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