Skip to content

Commit

Permalink
Disallow clearing timers without no argument at all
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed May 15, 2022
1 parent 0b42a3d commit 9508d85
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 16 deletions.
8 changes: 4 additions & 4 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16646,8 +16646,8 @@ interface WindowOrWorkerGlobalScope {
readonly performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id?: number): void;
clearTimeout(id?: number): void;
clearInterval(id: number | undefined): void;
clearTimeout(id: number | undefined): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down Expand Up @@ -17953,8 +17953,8 @@ declare var origin: string;
declare var performance: Performance;
declare function atob(data: string): string;
declare function btoa(data: string): string;
declare function clearInterval(id?: number): void;
declare function clearTimeout(id?: number): void;
declare function clearInterval(id: number | undefined): void;
declare function clearTimeout(id: number | undefined): void;
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down
8 changes: 4 additions & 4 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5114,8 +5114,8 @@ interface WindowOrWorkerGlobalScope {
readonly performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id?: number): void;
clearTimeout(id?: number): void;
clearInterval(id: number | undefined): void;
clearTimeout(id: number | undefined): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down Expand Up @@ -5484,8 +5484,8 @@ declare var origin: string;
declare var performance: Performance;
declare function atob(data: string): string;
declare function btoa(data: string): string;
declare function clearInterval(id?: number): void;
declare function clearTimeout(id?: number): void;
declare function clearInterval(id: number | undefined): void;
declare function clearTimeout(id: number | undefined): void;
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down
8 changes: 4 additions & 4 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4968,8 +4968,8 @@ interface WindowOrWorkerGlobalScope {
readonly performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id?: number): void;
clearTimeout(id?: number): void;
clearInterval(id: number | undefined): void;
clearTimeout(id: number | undefined): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down Expand Up @@ -5500,8 +5500,8 @@ declare var origin: string;
declare var performance: Performance;
declare function atob(data: string): string;
declare function btoa(data: string): string;
declare function clearInterval(id?: number): void;
declare function clearTimeout(id?: number): void;
declare function clearInterval(id: number | undefined): void;
declare function clearTimeout(id: number | undefined): void;
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down
8 changes: 4 additions & 4 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5248,8 +5248,8 @@ interface WindowOrWorkerGlobalScope {
readonly performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id?: number): void;
clearTimeout(id?: number): void;
clearInterval(id: number | undefined): void;
clearTimeout(id: number | undefined): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down Expand Up @@ -5788,8 +5788,8 @@ declare var origin: string;
declare var performance: Performance;
declare function atob(data: string): string;
declare function btoa(data: string): string;
declare function clearInterval(id?: number): void;
declare function clearTimeout(id?: number): void;
declare function clearInterval(id: number | undefined): void;
declare function clearTimeout(id: number | undefined): void;
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
Expand Down
30 changes: 30 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,36 @@
}
}
}
},
"WindowOrWorkerGlobalScope": {
"methods": {
"method": {
"clearInterval": {
"signature": {
"0": {
"param": [
{
"name": "id",
"overrideType": "number | undefined"
}
]
}
}
},
"clearTimeout": {
"signature": {
"0": {
"param": [
{
"name": "id",
"overrideType": "number | undefined"
}
]
}
}
}
}
}
}
}
},
Expand Down

0 comments on commit 9508d85

Please sign in to comment.