Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DedicatedWorkerGlobalScope.close() and SharedWorkerGlobalScope.close() return type - never #1806

Closed
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4777,7 +4777,7 @@ interface SharedWorkerGlobalScope extends WorkerGlobalScope {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -8463,7 +8463,7 @@ declare var onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
declare function close(): void;
declare function close(): never;
/**
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4777,7 +4777,7 @@ interface SharedWorkerGlobalScope extends WorkerGlobalScope {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -8463,7 +8463,7 @@ declare var onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
declare function close(): void;
declare function close(): never;
/**
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
*
Expand Down
6 changes: 3 additions & 3 deletions baselines/ts5.5/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFramePr
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
/**
* Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
*
Expand Down Expand Up @@ -5557,7 +5557,7 @@ interface SharedWorkerGlobalScope extends WorkerGlobalScope {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -9427,7 +9427,7 @@ declare var onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: RTCTransform
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
*/
declare function close(): void;
declare function close(): never;
/**
* Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
*
Expand Down
6 changes: 3 additions & 3 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFramePr
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
/**
* Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
*
Expand Down Expand Up @@ -5557,7 +5557,7 @@ interface SharedWorkerGlobalScope extends WorkerGlobalScope {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
*/
close(): void;
close(): never;
addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -9427,7 +9427,7 @@ declare var onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: RTCTransform
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
*/
declare function close(): void;
declare function close(): never;
/**
* Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
*
Expand Down
20 changes: 20 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2515,6 +2515,13 @@
"DedicatedWorkerGlobalScope": {
"methods": {
"method": {
"close": {
"signature": {
"0": {
"overrideType": "never"
}
}
},
"postMessage": {
"signature": {
"0": {
Expand Down Expand Up @@ -2542,6 +2549,19 @@
]
}
},
"SharedWorkerGlobalScope": {
"methods": {
"method": {
"close": {
"signature": {
"0": {
"overrideType": "never"
}
}
}
}
}
},
"HTMLFormElement": {
"overrideIndexSignatures": [
"[index: number]: Element",
Expand Down
Loading