mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Convert ext updater to typescript
This commit is contained in:
12
ext/src/global.d.ts
vendored
12
ext/src/global.d.ts
vendored
@@ -1,3 +1,4 @@
|
||||
// Define replacement types
|
||||
declare const EXTENSION_NAME: string;
|
||||
declare const EXTENSION_ID: string;
|
||||
declare const EXTENSION_VERSION: string;
|
||||
@@ -5,12 +6,19 @@ declare const MIRRORING_APP_ID: string;
|
||||
declare const APPLICATION_NAME: string;
|
||||
declare const APPLICATION_VERSION: string;
|
||||
|
||||
|
||||
// Fix issues with @types/firefox-webext-browser
|
||||
declare namespace browser.events {
|
||||
/**
|
||||
* Shouldn't enforce limited function signature across all
|
||||
* event types.
|
||||
*/
|
||||
interface Event {
|
||||
addListener (...args: any[]): void;
|
||||
addListener (...args: any[]): void | Promise<void>;
|
||||
removeListener (...args: any[]): void | Promise<void>;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace browser.runtime {
|
||||
interface Port {
|
||||
error: { message: string };
|
||||
@@ -22,12 +30,14 @@ declare namespace browser.runtime {
|
||||
}): browser.runtime.Port;
|
||||
}
|
||||
|
||||
|
||||
// Allow default attribute on <button>
|
||||
declare namespace React {
|
||||
interface ButtonHTMLAttributes<T> {
|
||||
default?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
button: React.DetailedHTMLProps<
|
||||
|
||||
Reference in New Issue
Block a user