Added additional parameters for chrome/chrome-app

* Added extra parameters to LaunchData per API docs
https://developer.chrome.com/apps/app_runtime#event-onLaunched

* Changed typescript version required to 2.4 since named enums are used
** Also for sion-chrome since this depends on chrome
This commit is contained in:
Adam Pyle
2017-11-16 12:20:01 +11:00
parent 08da8b8a66
commit d312fbdb3c
3 changed files with 29 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
// Type definitions for Chrome packaged application development
// Project: http://developer.chrome.com/apps/
// Definitions by: Adam Lay <https://github.com/AdamLay>, MIZUNE Pine <https://github.com/pine613>, MIZUSHIMA Junki <https://github.com/mzsm>, Ingvar Stepanyan <https://github.com/RReverser>
// Definitions by: Adam Lay <https://github.com/AdamLay>, MIZUNE Pine <https://github.com/pine613>, MIZUSHIMA Junki <https://github.com/mzsm>, Ingvar Stepanyan <https://github.com/RReverser>, Adam Pyle <https://github.com/pyle>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="index.d.ts"/>
@@ -21,12 +21,38 @@ declare namespace chrome.app {
// App Runtime
////////////////////
declare namespace chrome.app.runtime {
enum LaunchSource {
"untracked" = "untracked",
"app_launcher" = "app_launcher",
"new_tab_page" = "new_tab_page",
"reload" = "reload",
"restart" = "restart",
"load_and_launch" = "load_and_launch",
"command_line" = "command_line",
"file_handler" = "file_handler",
"url_handler" = "url_handler",
"system_tray" = "system_tray",
"about_page" = "about_page",
"keyboard" = "keyboard",
"extensions_page" = "extensions_page",
"management_api" = "management_api",
"ephemeral_app" = "ephemeral_app",
"background" = "background",
"kiosk" = "kiosk",
"chrome_internal" = "chrome_internal",
"test" = "test",
"installed_notification" = "installed_notification",
"context_menu" = "context_menu",
}
interface LaunchData {
id?: string;
items?: LaunchDataItem[];
url?: string;
referrerUrl?: string;
isKioskSession?: boolean;
isPublicSession?: boolean;
source?: LaunchSource;
actionData?: {};
}
interface LaunchDataItem {

View File

@@ -2,7 +2,7 @@
// Project: http://developer.chrome.com/extensions/
// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>, RReverser <https://github.com/rreverser>, sreimer15 <https://github.com/sreimer15>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.4
/// <reference types="filesystem" />

View File

@@ -2,7 +2,7 @@
// Project: https://github.com/vitalets/sinon-chrome
// Definitions by: Tim Perry <https://github.com/pimterry>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.4
/// <reference types="chrome"/>
/// <reference types="sinon"/>