diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-08-12 21:01:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 21:01:02 +0900 |
commit | bf6762f0c0c47a20b6a3e722711fafc6611793a9 (patch) | |
tree | 67bfdcee88c8fb2bc19277e58684dcf5d2d03be4 /src/@types | |
parent | 6f7f501c699c53eb63ce5576cf2464ecf4cfe162 (diff) | |
parent | 7e8c99d43a402b9e025a710a00879d557ac5b071 (diff) |
Merge pull request #798 from ueokande/eslint
Improve eslint
Diffstat (limited to 'src/@types')
-rw-r--r-- | src/@types/browser/index.d.ts | 13 | ||||
-rw-r--r-- | src/@types/web-ext-api/index.d.ts | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/@types/browser/index.d.ts b/src/@types/browser/index.d.ts new file mode 100644 index 0000000..14acfe0 --- /dev/null +++ b/src/@types/browser/index.d.ts @@ -0,0 +1,13 @@ +// NOTE: window.find is not standard API +// https://developer.mozilla.org/en-US/docs/Web/API/Window/find +interface Window { + find( + aString: string, + aCaseSensitive?: boolean, + aBackwards?: boolean, + aWrapAround?: boolean, + aWholeWord?: boolean, + aSearchInFrames?: boolean, + aShowDialog?: boolean + ): boolean; +} diff --git a/src/@types/web-ext-api/index.d.ts b/src/@types/web-ext-api/index.d.ts new file mode 100644 index 0000000..7eed334 --- /dev/null +++ b/src/@types/web-ext-api/index.d.ts @@ -0,0 +1,14 @@ +declare namespace browser.browserSettings.homepageOverride { + type BrowserSettings = { + value: string; + levelOfControl: LevelOfControlType; + }; + + type LevelOfControlType = + | "not_controllable" + | "controlled_by_other_extensions" + | "controllable_by_this_extension" + | "controlled_by_this_extension"; + + function get(param: { [key: string]: string }): Promise<BrowserSettings>; +} |