From 35f9535c1257fcc4fe6aa89799dc9ffcf30a9234 Mon Sep 17 00:00:00 2001 From: mchevestrier <103906265+mchevestrier@users.noreply.github.com> Date: Fri, 3 Apr 2026 01:04:07 +0200 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74805=20Add=20?= =?UTF-8?q?types=20for=20route-matcher=20by=20@mchevestrier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/route-matcher/.npmignore | 5 ++++ types/route-matcher/index.d.ts | 14 +++++++++++ types/route-matcher/package.json | 17 ++++++++++++++ types/route-matcher/route-matcher-tests.ts | 27 ++++++++++++++++++++++ types/route-matcher/tsconfig.json | 19 +++++++++++++++ 5 files changed, 82 insertions(+) create mode 100644 types/route-matcher/.npmignore create mode 100644 types/route-matcher/index.d.ts create mode 100644 types/route-matcher/package.json create mode 100644 types/route-matcher/route-matcher-tests.ts create mode 100644 types/route-matcher/tsconfig.json diff --git a/types/route-matcher/.npmignore b/types/route-matcher/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/route-matcher/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/route-matcher/index.d.ts b/types/route-matcher/index.d.ts new file mode 100644 index 00000000000000..467d9939b64cad --- /dev/null +++ b/types/route-matcher/index.d.ts @@ -0,0 +1,14 @@ +export interface StringRoute { + parse: (url: string) => Record | null; + stringify: (params: Record) => string; +} + +export interface RegExpRoute { + parse: (url: string) => { captures: Array } | null; +} + +export type StringRouteRule = RegExp | ((value: string) => boolean); +export type StringRouteRules = Record; + +export function routeMatcher(route: string, rules?: StringRouteRules): StringRoute; +export function routeMatcher(route: RegExp): RegExpRoute; diff --git a/types/route-matcher/package.json b/types/route-matcher/package.json new file mode 100644 index 00000000000000..ef007c18ffa431 --- /dev/null +++ b/types/route-matcher/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/route-matcher", + "version": "0.1.9999", + "projects": [ + "https://github.com/cowboy/javascript-route-matcher" + ], + "devDependencies": { + "@types/route-matcher": "workspace:." + }, + "owners": [ + { + "name": "mchevestrier", + "githubUsername": "mchevestrier" + } + ] +} diff --git a/types/route-matcher/route-matcher-tests.ts b/types/route-matcher/route-matcher-tests.ts new file mode 100644 index 00000000000000..da1d737e689003 --- /dev/null +++ b/types/route-matcher/route-matcher-tests.ts @@ -0,0 +1,27 @@ +import { routeMatcher } from "route-matcher"; + +// $ExpectType StringRoute +const search = routeMatcher("search/:query/p:page"); + +// $ExpectType Record | null +search.parse("search/cowboy/p5"); + +// $ExpectType StringRoute +const user = routeMatcher("user/:id/:other", { + id: /^\d+$/, + other: function(value) { + return value === "" || value === "foo"; + }, +}); + +// $ExpectType string +user.stringify({ id: "abc", other: "xyz" }); + +// $ExpectType RegExpRoute +const users = routeMatcher(/^(users?)(?:\/(\d+)(?:\.\.(\d+))?)?/); + +// $ExpectType { captures: (string | undefined)[]; } | null +users.parse("user/123"); + +// @ts-expect-error - stringification isn't supported for RegExp routes +users.stringify({ id: "abc", other: "xyz" }); diff --git a/types/route-matcher/tsconfig.json b/types/route-matcher/tsconfig.json new file mode 100644 index 00000000000000..3602b257166799 --- /dev/null +++ b/types/route-matcher/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "route-matcher-tests.ts" + ] +} From 4f9d22b4ff992175b059c5a48c9e3d7d236a5946 Mon Sep 17 00:00:00 2001 From: recurly-integrations <49795151+recurly-integrations@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:24:57 -0500 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74821=20Update?= =?UTF-8?q?s=20types=20for=20Recurly.js=20v4.41.2=20by=20@recurly-integrat?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: recurly-integrations --- types/recurly__recurly-js/lib/paypal.d.ts | 18 +++++++++++++++++- types/recurly__recurly-js/package.json | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/types/recurly__recurly-js/lib/paypal.d.ts b/types/recurly__recurly-js/lib/paypal.d.ts index 0d7aa86489faf3..8d23fafcfa7438 100644 --- a/types/recurly__recurly-js/lib/paypal.d.ts +++ b/types/recurly__recurly-js/lib/paypal.d.ts @@ -27,10 +27,26 @@ export type DirectConfig = { }; }; +export type UsagePattern = + | 'SUBSCRIPTION_PREPAID' + | 'SUBSCRIPTION_POSTPAID' + | 'RECURRING_PREPAID' + | 'RECURRING_POSTPAID' + | 'UNSCHEDULED_POSTPAID' + | 'UNSCHEDULED_PREPAID' + | 'INSTALLMENT_POSTPAID' + | 'INSTALLMENT_PREPAID'; + +export type BillingPlan = { + [key: string]: any; +}; + export type PayPalCompleteConfig = { - payPalComplete?: boolean; + payPalComplete?: boolean | { target: string; buttonOptions?: object }; display?: PayPalDisplayConfig; gatewayCode?: string; + usagePattern?: UsagePattern; + billingPlan?: BillingPlan; }; export type PayPalConfig = BraintreeConfig | DirectConfig | PayPalCompleteConfig; diff --git a/types/recurly__recurly-js/package.json b/types/recurly__recurly-js/package.json index 7898eae37480ef..b52fde610b82a5 100644 --- a/types/recurly__recurly-js/package.json +++ b/types/recurly__recurly-js/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/recurly__recurly-js", - "version": "4.39.9999", + "version": "4.41.9999", "nonNpm": true, "nonNpmDescription": "@recurly/recurly-js", "projects": [ From 76665f82023cf588807b3fc46ea39f9b276aa0e4 Mon Sep 17 00:00:00 2001 From: YuSheng Chen Date: Fri, 3 Apr 2026 07:51:56 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74645=20doc[ee?= =?UTF-8?q?-first]:=20fix=20type=20by=20@samuel871211?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/ee-first/ee-first-tests.ts | 4 ++-- types/ee-first/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/ee-first/ee-first-tests.ts b/types/ee-first/ee-first-tests.ts index c889541108bdb7..80621cd1a2657e 100644 --- a/types/ee-first/ee-first-tests.ts +++ b/types/ee-first/ee-first-tests.ts @@ -17,7 +17,7 @@ const thunk = first( (err, ee, event, args) => { err; // $ExpectType any ee; // $ExpectType Foo | Bar - event; // $ExpectType string[] + event; // $ExpectType string args; // $ExpectType any[] }, ); @@ -25,7 +25,7 @@ const thunk = first( thunk((err, ee, event, args) => { err; // $ExpectType any ee; // $ExpectType Foo | Bar - event; // $ExpectType string[] + event; // $ExpectType string args; // $ExpectType any[] }); diff --git a/types/ee-first/index.d.ts b/types/ee-first/index.d.ts index 24d1dd261c3269..6c6950d58f5484 100644 --- a/types/ee-first/index.d.ts +++ b/types/ee-first/index.d.ts @@ -26,7 +26,7 @@ declare namespace first { type Listener = ( err: any, ee: TEmitter, - event: string[], + event: string, args: any[], ) => void; From 138328916454306bdb4147ec3df73dbfd51e6752 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Fri, 3 Apr 2026 01:54:52 +0200 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74790=20[picom?= =?UTF-8?q?atch]=20remove=20options=20which=20do=20not=20exist=20in=204.x?= =?UTF-8?q?=20by=20@danez?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/picomatch/lib/picomatch.d.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/types/picomatch/lib/picomatch.d.ts b/types/picomatch/lib/picomatch.d.ts index 8009b5131e4978..d6cd58610d8720 100644 --- a/types/picomatch/lib/picomatch.d.ts +++ b/types/picomatch/lib/picomatch.d.ts @@ -68,10 +68,6 @@ declare namespace picomatch { * Allows glob to match any part of the given string(s). */ contains?: boolean | undefined; - /** - * Current working directory. Used by `picomatch.split()` - */ - cwd?: string | undefined; /** * Debug regular expressions when an error is thrown. */ @@ -87,10 +83,6 @@ declare namespace picomatch { */ expandRange?(from: string, to: string, options: PicomatchOptions): string; expandRange?(from: string, to: string, step: string, options: PicomatchOptions): string; - /** - * Throws an error if no matches are found. Based on the bash option of the same name. - */ - failglob?: boolean | undefined; /** * To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. */ @@ -135,12 +127,6 @@ declare namespace picomatch { * Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. */ nocase?: boolean | undefined; - /** - * @deprecated use `nounique` instead. - * This option will be removed in a future major release. By default duplicates are removed. - * Disable uniquification by setting this option to false. - */ - nodupes?: boolean | undefined; /** * Alias for `noextglob` */ @@ -157,10 +143,6 @@ declare namespace picomatch { * Disable support for negating with leading `!` */ nonegate?: boolean | undefined; - /** - * Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. - */ - noquantifiers?: boolean | undefined; /** * Function to be called on ignored items. */ @@ -177,10 +159,6 @@ declare namespace picomatch { * Support POSIX character classes ("posix brackets"). */ posix?: boolean | undefined; - /** - * Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself. - */ - posixSlashes?: boolean | undefined; /** * String to prepend to the generated regex used for matching. */ From 460dd9fc1153d7da7a0943f87012f1e33979f157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8=E5=B0=8F=E9=80=8F=E6=98=8E=E3=83=BB=E5=AE=B8?= =?UTF-8?q?=E2=9C=A8?= <47057319+TransparentLC@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:08:32 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74510=20Enable?= =?UTF-8?q?=20`hooker`=20to=20infer=20the=20parameter=20and=20return=20val?= =?UTF-8?q?ue=20types=20of=20function=20by=20@TransparentLC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/hooker/hooker-tests.ts | 122 +++++++++++++++++++------------- types/hooker/index.d.ts | 130 ++++++++++++++++++++++++++++------- 2 files changed, 181 insertions(+), 71 deletions(-) diff --git a/types/hooker/hooker-tests.ts b/types/hooker/hooker-tests.ts index 6c529855494b53..3dfe63a322a976 100644 --- a/types/hooker/hooker-tests.ts +++ b/types/hooker/hooker-tests.ts @@ -1,66 +1,96 @@ import hooker = require("hooker"); function tests() { - var objectToHook: any = { - hello: "world", - }; - hooker.hook(objectToHook, "hello", () => {}); - hooker.hook(objectToHook, "hello", (): any => { - return null; - }); - hooker.hook(objectToHook, ["hello", "foo"], () => {}); - hooker.hook(objectToHook, ["hello", "bar"], (): any => { - return null; - }); - hooker.hook(objectToHook, "bar", () => { - return hooker.filter(this, ["foo", "bar"]); - }); - hooker.hook(objectToHook, "bar", () => { - return hooker.override("good"); + hooker.hook(Math, "max", function( + ...args // $ExpectType number[] + ) {}); + hooker.unhook(Math, "max"); + + hooker.hook(Math, "max", function() { + if (arguments.length === 0) { + return hooker.override(9000); + } }); - hooker.hook(objectToHook, "bar", () => { - return hooker.preempt("good"); + // @ts-expect-error + hooker.hook(Math, "max", function() { + if (arguments.length === 0) { + return hooker.override("not a number"); + } }); - hooker.orig(objectToHook, "hello"); - hooker.orig(objectToHook, ["hello", "foo"]); - hooker.hook(objectToHook, "foo", { - pre: () => {}, + + hooker.hook(Math, "max", { + once: true, + pre: function() {}, }); - hooker.hook(objectToHook, "foo", { - pre: () => { - return hooker.preempt(1); + + hooker.hook(Math, "max", { + pre: function(...args) { + return hooker.filter(this, args.map(num => num * 2)); }, }); - hooker.hook(objectToHook, "foo", { - pre: () => { - return hooker.override(1); + + // @ts-expect-error + hooker.hook(Math, "max", { + pre: function(...args) { + return hooker.filter(this, args.map(num => num.toString())); }, }); - hooker.hook(objectToHook, "foo", { - pre: () => { - return hooker.filter(1, ["abc"]); + + hooker.hook(Math, "max", { + post: function(result) { + return hooker.override(result * 1000); }, }); - hooker.hook(objectToHook, "foo", { - post: () => {}, + + hooker.orig(Math, "max"); // $ExpectType (...values: number[]) => number + + hooker.hook(Math, Object.getOwnPropertyNames(Math), { + passName: true, + pre: function(name) {}, + post: function(result, name) {}, }); - hooker.hook(objectToHook, "foo", { - post: () => { - return hooker.filter(1, ["abc"]); + + hooker.hook(Number, "parseInt", function( + string, // $ExpectType string + radix, // $ExpectType number | undefined + ) {}); + + hooker.hook(Number, "parseInt", { + pre( + string, // $ExpectType string + radix, // $ExpectType number | undefined + ) {}, + post( + result, // $ExpectType number + string, // $ExpectType string + radix, // $ExpectType number | undefined + ) {}, + }); + + hooker.hook(Number, "parseInt", { + pre(string, radix) { + return hooker.preempt(0); }, }); - hooker.hook(objectToHook, "foo", { - once: false, + + // @ts-expect-error + hooker.hook(Number, "parseInt", { + pre(string, radix) { + return hooker.preempt("not a number"); + }, }); - hooker.hook(objectToHook, "foo", { - passName: true, + + hooker.hook(Number, "parseInt", { + pre(string, radix) { + return hooker.filter(this, [string, radix] as [string, number | undefined]); + }, }); - hooker.hook(objectToHook, "foo", { - pre: () => {}, - post: () => { - return hooker.filter(this, []); + // @ts-expect-error + hooker.hook(Number, "parseInt", { + pre(string, radix) { + return hooker.filter(this, [0, "not a number"]); }, - once: true, - passName: false, }); + + hooker.orig(Number, "parseInt"); // $ExpectType (string: string, radix?: number | undefined) => number } diff --git a/types/hooker/index.d.ts b/types/hooker/index.d.ts index 81249d9583ad4b..d2b00a2a948e94 100644 --- a/types/hooker/index.d.ts +++ b/types/hooker/index.d.ts @@ -1,38 +1,118 @@ -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type -declare type HookerPostHookFunction = (result: any, ...args: any[]) => IHookerPostHookResult | void; -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type -declare type HookerPreHookFunction = (...args: any[]) => IHookerPreHookResult | void; +/* eslint-disable @typescript-eslint/no-invalid-void-type */ +declare type HookerPreHookFunction any = (...args: any[]) => any> = ( + ...args: Parameters +) => HookerOverride> | HookerPreempt> | HookerFilter> | Promise | void; +declare type HookerPostHookFunction any = (...args: any[]) => any> = ( + result: ReturnType, + ...args: Parameters +) => HookerOverride> | Promise | void; +/* eslint-enable @typescript-eslint/no-invalid-void-type */ declare module "hooker" { - function hook(object: any, props: string | string[], options: IHookerOptions): void; - function hook(object: any, props: string | string[], prehookFunction: HookerPreHookFunction): void; + /** + * Monkey-patch (hook) one or more methods of an object. Returns an array of hooked method names. + * + * @param object + * @param props Can be a method name, array of method names or null. If null (or omitted), all enumerable methods of `object` will be hooked. + * @param options + */ + function hook( + object: T, + props: K, + options: IHookerOptions any ? T[K] : never>, + ): string[]; + /** + * Monkey-patch (hook) one or more methods of an object. Returns an array of hooked method names. + * + * @param object + * @param props Can be a method name, array of method names or null. If null (or omitted), all enumerable methods of `object` will be hooked. + * @param prehookFunction A pre-hook function to be executed before the original function. Arguments passed into the method will be passed into the pre-hook function as well. + */ + function hook( + object: T, + props: K, + prehookFunction: HookerPreHookFunction any ? T[K] : never>, + ): string[]; + /** + * Monkey-patch (hook) one or more methods of an object. Returns an array of hooked method names. + * + * @param object + * @param props Can be a method name, array of method names or null. If null (or omitted), all enumerable methods of `object` will be hooked. + * @param options + */ + function hook(object: any, props: string[], options: IHookerOptions): string[]; + /** + * Monkey-patch (hook) one or more methods of an object. Returns an array of hooked method names. + * + * @param object + * @param props Can be a method name, array of method names or null. If null (or omitted), all enumerable methods of `object` will be hooked. + * @param prehookFunction A pre-hook function to be executed before the original function. Arguments passed into the method will be passed into the pre-hook function as well. + */ + function hook(object: any, props: string[], prehookFunction: HookerPreHookFunction): string[]; + /** + * Un-monkey-patch (unhook) one or more methods of an object. + * + * @param object + * @param props Can be a method name, array of method names or null. If null (or omitted), all methods of object will be unhooked. + */ function unhook(object: any, props?: string | string[]): string[]; - function orig(object: any, props: string | string[]): Function; - function override(value: any): HookerOverride; - function preempt(value: any): HookerPreempt; - function filter(context: any, args: any[]): HookerFilter; + /** + * Get a reference to the original method from a hooked function. + * + * @param object + * @param prop + */ + function orig(object: T, prop: K): T[K] extends (...args: any[]) => any ? T[K] : never; + function orig(object: any, prop: string): Function; + /** + * When a pre- or post-hook returns the result of this function, the value passed will be used in place of the original function's return value. Any post-hook override value will take precedence over a pre-hook override value. + * + * @param value + */ + function override(value: T): HookerOverride; + /** + * When a pre-hook returns the result of this function, the value passed will be used in place of the original function's return value, and the original function will **NOT** be executed. + * + * @param value + */ + function preempt(value: T): HookerPreempt; + /** + * When a pre-hook returns the result of this function, the context and arguments passed will be applied into the original function. + * + * @param context + * @param args + */ + function filter(context: any, args: T): HookerFilter; } -declare class HookerOverride implements IHookerPostHookResult, IHookerPreHookResult { - value: any; +declare class HookerOverride { + value: T; } -declare class HookerPreempt implements IHookerPreHookResult { - value: any; +declare class HookerPreempt { + value: T; } -declare class HookerFilter implements IHookerPreHookResult { +declare class HookerFilter { context: any; - args: any[]; + args: T; } -interface IHookerPostHookResult {} - -interface IHookerPreHookResult {} - -interface IHookerOptions { - pre?: HookerPreHookFunction | undefined; - post?: HookerPostHookFunction | undefined; - once?: boolean | undefined; - passName?: boolean | undefined; +interface IHookerOptions any = (...args: any[]) => any> { + /** + * A pre-hook function to be executed before the original function. Arguments passed into the method will be passed into the pre-hook function as well. + */ + pre?: HookerPreHookFunction; + /** + * A post-hook function to be executed after the original function. The original function's result is passed into the post-hook function as its first argument, followed by the method arguments. + */ + post?: HookerPostHookFunction; + /** + * If true, auto-unhook the function after the first execution. + */ + once?: boolean; + /** + * If true, pass the name of the method into the pre-hook function as its first arg (preceding all other arguments), and into the post-hook function as the second arg (after result but preceding all other arguments). + */ + passName?: boolean; } From 09a3e130ff50e9c7d1ae24d637c96aaf32bf7230 Mon Sep 17 00:00:00 2001 From: Alec Gibson <12036746+alecgibson@users.noreply.github.com> Date: Fri, 3 Apr 2026 03:53:13 +0100 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74827=20[sinon?= =?UTF-8?q?]=20Fix=20`@sinonjs/fake-timers`=20config=20import=20by=20@alec?= =?UTF-8?q?gibson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/sinon/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index 9eb93d6d94b7ed..abf48d9bd2f3e9 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -1182,7 +1182,7 @@ declare namespace Sinon { * If set to true, the sandbox will have a clock property. * You can optionally pass in a configuration object that follows the specification for fake timers, such as { toFake: ["setTimeout", "setInterval"] }. */ - useFakeTimers: boolean | Partial; + useFakeTimers: boolean | Partial[0]>; /** * The assert options can help limit the amount of output produced by assert.fail */ @@ -1332,7 +1332,7 @@ declare namespace Sinon { * * Important note: when faking `nextTick`, normal calls to `process.nextTick()` will not execute automatically as they would during normal event-loop phases. You would have to call either `clock.next()`, `clock.tick()`, `clock.runAll()` or `clock.runToLast()` manually (see example below). You can easily work around this using the `config.toFake` option. Please refer to the [`fake-timers`](https://github.com/sinonjs/fake-timers) documentation for more information. * @param config */ - useFakeTimers(config?: number | Date | Partial): SinonFakeTimers; + useFakeTimers(config?: number | Date | Partial[0]>): SinonFakeTimers; /** * Restores all fakes created through sandbox. */ From 533d244944187803b4a3cb9d049db4e31fdc3b65 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 3 Apr 2026 02:53:48 +0000 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/sinon/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index abf48d9bd2f3e9..10407a80277212 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -1182,7 +1182,7 @@ declare namespace Sinon { * If set to true, the sandbox will have a clock property. * You can optionally pass in a configuration object that follows the specification for fake timers, such as { toFake: ["setTimeout", "setInterval"] }. */ - useFakeTimers: boolean | Partial[0]>; + useFakeTimers: boolean | Partial[0]>; /** * The assert options can help limit the amount of output produced by assert.fail */ @@ -1332,7 +1332,7 @@ declare namespace Sinon { * * Important note: when faking `nextTick`, normal calls to `process.nextTick()` will not execute automatically as they would during normal event-loop phases. You would have to call either `clock.next()`, `clock.tick()`, `clock.runAll()` or `clock.runToLast()` manually (see example below). You can easily work around this using the `config.toFake` option. Please refer to the [`fake-timers`](https://github.com/sinonjs/fake-timers) documentation for more information. * @param config */ - useFakeTimers(config?: number | Date | Partial[0]>): SinonFakeTimers; + useFakeTimers(config?: number | Date | Partial[0]>): SinonFakeTimers; /** * Restores all fakes created through sandbox. */