Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions types/chrome/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7236,6 +7236,9 @@ declare namespace chrome.webNavigation {
* @since Chrome 17.
*/
declare namespace chrome.webRequest {
/** How the requested resource will be used. */
export type ResourceType = "main_frame" | "sub_frame" | "stylesheet" | "script" | "image" | "font" | "object" | "xmlhttprequest" | "ping" | "csp_report" | "media" | "websocket" | "other";

export interface AuthCredentials {
username: string;
password: string;
Expand Down Expand Up @@ -7277,9 +7280,8 @@ declare namespace chrome.webRequest {
tabId?: number;
/**
* A list of request types. Requests that cannot match any of the types will be filtered out.
* Each element one of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
*/
types?: string[];
types?: ResourceType[];
/** A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out. */
urls: string[];

Expand Down Expand Up @@ -7330,9 +7332,8 @@ declare namespace chrome.webRequest {
tabId: number;
/**
* How the requested resource will be used.
* One of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
*/
type: string;
type: ResourceType;
/** The time when this signal is triggered, in milliseconds since the epoch. */
timeStamp: number;
}
Expand Down