Skip to content
Merged
3 changes: 1 addition & 2 deletions types/chrome/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"rules": {
"@definitelytyped/no-unnecessary-generics": "off",
"@definitelytyped/strict-export-declare-modifiers": "off",
"@typescript-eslint/no-empty-interface": "off"
"@definitelytyped/strict-export-declare-modifiers": "off"
}
}
22 changes: 21 additions & 1 deletion types/chrome/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2524,6 +2524,7 @@ declare namespace chrome {
}

/** Declarative event action that redirects a network request to an empty document. */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface RedirectToEmptyDocument {}

/** Declarative event action that redirects a network request. */
Expand Down Expand Up @@ -2566,6 +2567,7 @@ declare namespace chrome {
}

/** Declarative event action that cancels a network request. */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface CancelRequest {}

/** Removes the request header of the specified name. Do not use SetRequestHeader and RemoveRequestHeader with the same header name on the same request. Each request header name occurs only once in each request. */
Expand Down Expand Up @@ -2633,6 +2635,7 @@ declare namespace chrome {
}

/** Declarative event action that redirects a network request to a transparent image. */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface RedirectToTransparentImage {}

/** Adds a cookie to the request or overrides a cookie, in case another cookie of the same name exists already. Note that it is preferred to use the Cookies API because this is computationally less expensive. */
Expand Down Expand Up @@ -3015,6 +3018,12 @@ declare namespace chrome {
onHidden: events.Event<() => void>;
}

/**
* Theme used by DevTools.
* @since Chrome 99
*/
export type Theme = "default" | "dark";

/** Elements panel. */
export const elements: ElementsPanel;

Expand Down Expand Up @@ -3047,6 +3056,12 @@ declare namespace chrome {
) => void,
): void;

/**
* Specifies the function to be called when the current theme changes in DevTools. To unset the handler, either call the method with no parameters or pass `null` as the parameter.
* @since Chrome 99
*/
export function setThemeChangeHandler(callback?: (theme: Theme) => void): void;

/**
* Requests DevTools to open a URL in a Developer Tools panel.
* @param url The URL of the resource to open.
Expand All @@ -3065,7 +3080,7 @@ declare namespace chrome {
* The name of the color theme set in user's DevTools settings.
* @since Chrome 59
*/
export const themeName: "default" | "dark";
export const themeName: Theme;
}

////////////////////
Expand Down Expand Up @@ -3743,6 +3758,7 @@ declare namespace chrome {
SAFE = "safe",
/** The user has accepted the dangerous download. */
ACCEPTED = "accepted",
/** Enterprise-related values. */
ALLOWLISTED_BY_POLICY = "allowlistedByPolicy",
ASYNC_SCANNING = "asyncScanning",
ASYNC_LOCAL_PASSWORD_SCANNING = "asyncLocalPasswordScanning",
Expand All @@ -3757,6 +3773,8 @@ declare namespace chrome {
PROMPT_FOR_LOCAL_PASSWORD_SCANNING = "promptForLocalPasswordScanning",
ACCOUNT_COMPROMISE = "accountCompromise",
BLOCKED_SCAN_FAILED = "blockedScanFailed",
/** For use by the Secure Enterprise Browser extension. When required, Chrome will block the download to disc and download the file directly to Google Drive. */
FORCE_SAVE_TO_GDRIVE = "forceSaveToGdrive",
}

export interface DownloadItem {
Expand Down Expand Up @@ -10199,6 +10217,7 @@ declare namespace chrome {
}

/** @deprecated Use {@link CpuTime} instead. */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface ProcessorUsage extends CpuTime {}

export interface ProcessorInfo {
Expand Down Expand Up @@ -12423,6 +12442,7 @@ declare namespace chrome {
}

/** @deprecated Use {@link Parameters} instead */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface VpnSessionParameters extends Parameters {}

/** The enum is used by the platform to notify the client of the VPN session status. */
Expand Down
Loading