Skip to content

[sinon] Fix @sinonjs/fake-timers config import#74827

Merged
typescript-bot merged 1 commit into
DefinitelyTyped:masterfrom
alecgibson:fix-sinon-fake-timers
Apr 3, 2026
Merged

[sinon] Fix @sinonjs/fake-timers config import#74827
typescript-bot merged 1 commit into
DefinitelyTyped:masterfrom
alecgibson:fix-sinon-fake-timers

Conversation

@alecgibson

Copy link
Copy Markdown
Contributor

@sinonjs/fake-timers renamed the FakeTimerInstallOpts type to Config, which breaks these types for @sinonjs/fake-timers@15.3.0.

This change tries to make these types more robust to this and fixes in a non-breaking way by using Parameters to infer the types rather than directly reference them.

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

`@sinonjs/fake-timers` [renamed][1] the `FakeTimerInstallOpts` type to
`Config`, which breaks these types for `@sinonjs/fake-timers@15.3.0`.

This change tries to make these types more robust to this and fixes in a
non-breaking way by using `Parameters` to infer the types rather than
directly reference them.

[1]: sinonjs/fake-timers@8f096a8#diff-b417af1ed78243852472c4eb3b4456a4e5336cc15d4d6fac0ea00bb4dcc3355aR108
@alecgibson

Copy link
Copy Markdown
Contributor Author

I deliberately haven't touched the tests because this change should be validated by tests still passing

@typescript-bot

typescript-bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

@alecgibson Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 74827,
  "author": "alecgibson",
  "headCommitOid": "e2d52214f33e32828882f2c341b8c4f0ce8cd680",
  "mergeBaseOid": "8fe0c8af85c80359cf96a19fb00e423332cf700f",
  "lastPushDate": "2026-04-02T09:14:30.000Z",
  "lastActivityDate": "2026-04-03T02:52:38.000Z",
  "mergeOfferDate": "2026-04-02T23:22:20.000Z",
  "mergeRequestDate": "2026-04-03T02:52:38.000Z",
  "mergeRequestUser": "alecgibson",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "sinon",
      "kind": "edit",
      "files": [
        {
          "path": "types/sinon/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "mrbigdog2u",
        "nicojs",
        "43081j",
        "gjednaszewski",
        "johnjesse",
        "alecf",
        "SimonSchick",
        "lo1tuma"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "RyanCavanaugh",
      "date": "2026-04-02T23:21:40.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "43081j",
      "date": "2026-04-02T09:27:18.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 4175843327,
  "ciResult": "pass"
}

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey @alecgibson,

😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.

This can potentially save days of time for you!

@typescript-bot

Copy link
Copy Markdown
Contributor

🔔 @MrBigDog2U @nicojs @43081j @gjednaszewski @johnjesse @alecf @SimonSchick @lo1tuma — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@DangerBotOSS

Copy link
Copy Markdown

Formatting

The following files are not formatted:

  1. types/sinon/index.d.ts

Consider running pnpm dprint fmt on these files to make review easier.

Generated by 🚫 dangerJS against e2d5221

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Apr 2, 2026
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Apr 2, 2026
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 2, 2026
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in Pull Request Status Board Apr 2, 2026
@typescript-bot

Copy link
Copy Markdown
Contributor

@alecgibson: Everything looks good here. I am ready to merge this PR (at e2d5221) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@MrBigDog2U, @nicojs, @43081j, @gjednaszewski, @johnjesse, @alecf, @SimonSchick, @lo1tuma: you can do this too.)

@alecgibson

Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in Pull Request Status Board Apr 3, 2026
@typescript-bot typescript-bot merged commit 09a3e13 into DefinitelyTyped:master Apr 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Maintainer Approved Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants