Skip to content

TypeScript Error: Property 'uninstall' does not exist on type 'Static'. Did you mean 'install'? #767

@kboucher

Description

@kboucher
  • @types/webextension-polyfill version: 0.12.1
  • webextension-polyfill version: 0.12.0

The MDN documentation for the webextension-polyfill references the management.uninstall() method: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management/uninstall

However, neither the management.d.ts nor the browser-polyfill.js files include this method. (See Management.Static type.)

It is currently necessary for us to cast the browser.management reference to a chrome.management type in order to satisfy TypeScript:

(browser.management as unknown as typeof chrome.management).uninstall(extensionId);

Is this the expected behavior?

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