Skip to content

[@types/chrome] StorageArea Promise overload issue #71634

Closed
@jpc-ae

Description

Discussed in #71632

Originally posted by jpc-ae January 12, 2025
Currently, chrome.storage.<StorageArea>.get(null) will be typed as a synchronous operation with a callback function instead of a Promise. Can the order of overloaded exports please be updated so Promises come first in line with the current spec? Essentially, in v3 StorageArea will return a Promise unless a callback function is explicitly provided. It looks like get and getBytesInUse are the two that need to be rearranged with the top overload moved to the bottom of the three. I've done it manually in my own repository and it works cleanly that way. I'm happy to create a pull request if needed.

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