Skip to content

Commit 94b552b

Browse files
authored
🤖 Merge PR DefinitelyTyped#74270 [chrome] documentId is optional in webRequest namespace by @erwanjugand
1 parent 9ef8c48 commit 94b552b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎types/chrome/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13162,7 +13162,7 @@ declare namespace chrome {
1316213162
* The UUID of the document making the request.
1316313163
* @since Chrome 106
1316413164
*/
13165-
documentId: string;
13165+
documentId?: string;
1316613166
/**
1316713167
* The lifecycle the document is in.
1316813168
* @since Chrome 106

‎types/chrome/test/index.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,7 +6910,7 @@ function testWebRequest() {
69106910
checkWebRequestEvent(chrome.webRequest.onAuthRequired, (details, asyncCallback) => {
69116911
details.challenger.host; // $ExpectType string
69126912
details.challenger.port; // $ExpectType number
6913-
details.documentId; // $ExpectType string
6913+
details.documentId; // $ExpectType string | undefined
69146914
details.documentLifecycle; // $ExpectType DocumentLifecycle
69156915
details.frameId; // $ExpectType number
69166916
details.frameType; // $ExpectType FrameType
@@ -6937,7 +6937,7 @@ function testWebRequest() {
69376937
}, ["responseHeaders", "blocking", "asyncBlocking", "extraHeaders"]);
69386938

69396939
checkWebRequestEvent(chrome.webRequest.onBeforeRedirect, (details) => {
6940-
details.documentId; // $ExpectType string
6940+
details.documentId; // $ExpectType string | undefined
69416941
details.documentLifecycle; // $ExpectType DocumentLifecycle
69426942
details.frameId; // $ExpectType number
69436943
details.frameType; // $ExpectType FrameType
@@ -6985,7 +6985,7 @@ function testWebRequest() {
69856985
checkWebRequestEvent(
69866986
chrome.webRequest.onBeforeSendHeaders,
69876987
(details) => {
6988-
details.documentId; // $ExpectType string
6988+
details.documentId; // $ExpectType string | undefined
69896989
details.documentLifecycle; // $ExpectType DocumentLifecycle
69906990
details.frameId; // $ExpectType number
69916991
details.frameType; // $ExpectType FrameType
@@ -7008,7 +7008,7 @@ function testWebRequest() {
70087008
);
70097009

70107010
checkWebRequestEvent(chrome.webRequest.onCompleted, (details) => {
7011-
details.documentId; // $ExpectType string
7011+
details.documentId; // $ExpectType string | undefined
70127012
details.documentLifecycle; // $ExpectType DocumentLifecycle
70137013
details.frameId; // $ExpectType number
70147014
details.frameType; // $ExpectType FrameType
@@ -7031,7 +7031,7 @@ function testWebRequest() {
70317031
}, ["responseHeaders", "extraHeaders"]);
70327032

70337033
checkWebRequestEvent(chrome.webRequest.onErrorOccurred, (details) => {
7034-
details.documentId; // $ExpectType string
7034+
details.documentId; // $ExpectType string | undefined
70357035
details.documentLifecycle; // $ExpectType DocumentLifecycle
70367036
details.error; // $ExpectType string
70377037
details.frameId; // $ExpectType number
@@ -7050,7 +7050,7 @@ function testWebRequest() {
70507050
}, ["extraHeaders"]);
70517051

70527052
checkWebRequestEvent(chrome.webRequest.onHeadersReceived, (details) => {
7053-
details.documentId; // $ExpectType string
7053+
details.documentId; // $ExpectType string | undefined
70547054
details.documentLifecycle; // $ExpectType DocumentLifecycle
70557055
details.frameId; // $ExpectType number
70567056
details.frameType; // $ExpectType FrameType
@@ -7073,7 +7073,7 @@ function testWebRequest() {
70737073
}, ["blocking", "responseHeaders", "extraHeaders"]);
70747074

70757075
checkWebRequestEvent(chrome.webRequest.onResponseStarted, (details) => {
7076-
details.documentId; // $ExpectType string
7076+
details.documentId; // $ExpectType string | undefined
70777077
details.documentLifecycle; // $ExpectType DocumentLifecycle
70787078
details.frameId; // $ExpectType number
70797079
details.frameType; // $ExpectType FrameType
@@ -7096,7 +7096,7 @@ function testWebRequest() {
70967096
}, ["responseHeaders", "extraHeaders"]);
70977097

70987098
checkWebRequestEvent(chrome.webRequest.onSendHeaders, (details) => {
7099-
details.documentId; // $ExpectType string
7099+
details.documentId; // $ExpectType string | undefined
71007100
details.documentLifecycle; // $ExpectType DocumentLifecycle
71017101
details.frameId; // $ExpectType number
71027102
details.frameType; // $ExpectType FrameType

0 commit comments

Comments
 (0)