Convert shim to Typescript (#32)

This commit is contained in:
Matt Hensman
2019-03-12 05:51:43 +00:00
committed by GitHub
parent 4cf0f7264a
commit f1125061d5
89 changed files with 1643 additions and 1378 deletions

31
ext/src/global.d.ts vendored
View File

@@ -7,6 +7,37 @@ declare const APPLICATION_NAME: string;
declare const APPLICATION_VERSION: string;
declare interface Window {
wrappedJSObject: typeof Window;
}
interface CloneIntoOptions {
cloneFunctions?: boolean;
wrapReflectors?: boolean;
}
declare function cloneInto<T> (
obj: T
, targetScope: any
, options?: CloneIntoOptions): T;
interface ExportFunctionOptions {
defineAs: string;
allowCallbacks?: boolean;
allowCrossOriginArguments?: boolean;
}
type ExportFunctionFunc = (...args: any[]) => any;
declare function exportFunction (
func: ExportFunctionFunc
, targetScope: any
, options?: ExportFunctionOptions): ExportFunctionFunc;
// Fix issues with @types/firefox-webext-browser
declare namespace browser.events {
/**