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

Updating delay parameter name in node setTimeout and setInterval methods to match jsdocs #71203

Merged
merged 2 commits into from
Jan 6, 2025
Merged
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
8 changes: 4 additions & 4 deletions types/node/v18/timers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ declare module "timers" {
*/
function setTimeout<TArgs extends any[]>(
callback: (...args: TArgs) => void,
ms?: number,
delay?: number,
...args: TArgs
): NodeJS.Timeout;
// util.promisify no rest args compability
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
function setTimeout(callback: (args: void) => void, delay?: number): NodeJS.Timeout;
namespace setTimeout {
const __promisify__: typeof setTimeoutPromise;
}
function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
function setInterval<TArgs extends any[]>(
callback: (...args: TArgs) => void,
ms?: number,
delay?: number,
...args: TArgs
): NodeJS.Timeout;
// util.promisify no rest args compability
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
function setInterval(callback: (args: void) => void, delay?: number): NodeJS.Timeout;
namespace setInterval {
const __promisify__: typeof setIntervalPromise;
}
Expand Down
8 changes: 4 additions & 4 deletions types/node/v20/timers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ declare module "timers" {
*/
function setTimeout<TArgs extends any[]>(
callback: (...args: TArgs) => void,
ms?: number,
delay?: number,
...args: TArgs
): NodeJS.Timeout;
// util.promisify no rest args compability
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
function setTimeout(callback: (args: void) => void, delay?: number): NodeJS.Timeout;
namespace setTimeout {
const __promisify__: typeof setTimeoutPromise;
}
Expand All @@ -183,12 +183,12 @@ declare module "timers" {
*/
function setInterval<TArgs extends any[]>(
callback: (...args: TArgs) => void,
ms?: number,
delay?: number,
...args: TArgs
): NodeJS.Timeout;
// util.promisify no rest args compability
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
function setInterval(callback: (args: void) => void, delay?: number): NodeJS.Timeout;
namespace setInterval {
const __promisify__: typeof setIntervalPromise;
}
Expand Down