Installation
npm install --save @types/firefox
Summary
This package contains type definitions for firefox (https://developer.mozilla.org/en-US/docs/Web/API).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/firefox.
index.d.ts
// required lib.d.ts
// expand Navigator definietion.
interface Navigator {
mozApps: Apps;
}
interface Apps {
install(url: string, receipts?: any[]): DOMRequest<App>;
getSelf(): DOMRequest<App>;
getInstalled(): DOMRequest<App[]>;
checkInstalled(url: string): DOMRequest<App>;
}
interface DOMRequest<T> {
onsuccess: Function;
onerror: Function;
readyState: string; // "done" or "pending"
result: T;
error: Error;
}
interface App {
manifest: any;
manifestURL: string;
origin: string;
installOrigin: string;
installTime: number;
receipts: any[];
launch(): void;
checkForUpdate(): DOMRequest<any>;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by vvakame.