Commit 357a524
authored
🤖 Merge PR #61334 [sinon] support missing fake timer options by @alecgibson
At the moment, it's not possible to use some of the fake timer options,
such as [`shouldClearNativeTimers`][1], because the `sinon` types uses
its own hand-rolled [options object][2] which is missing the property.
`@types/sinon` already has a [dependency][3] on the `fake-timers`
typings, which defines its own [config object][4] with the missing
properties, so this change just uses that interface directly.
[1]: https://github.com/sinonjs/fake-timers/blob/3a77a0978eaccd73ccc87dd42204b54e2bac0f6f/src/fake-timers-src.js#L99
[2]: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/658b4ded756f0c98e1a22e9592014c3c6bc4323a/types/sinon/index.d.ts#L789-L793
[3]: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/658b4ded756f0c98e1a22e9592014c3c6bc4323a/types/sinon/index.d.ts#L13
[4]: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/658b4ded756f0c98e1a22e9592014c3c6bc4323a/types/sinonjs__fake-timers/index.d.ts#L335-L3691 parent 93ea81e commit 357a524
2 files changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | 789 | | |
796 | 790 | | |
797 | 791 | | |
| |||
1450 | 1444 | | |
1451 | 1445 | | |
1452 | 1446 | | |
1453 | | - | |
| 1447 | + | |
1454 | 1448 | | |
1455 | 1449 | | |
1456 | 1450 | | |
| |||
1572 | 1566 | | |
1573 | 1567 | | |
1574 | 1568 | | |
1575 | | - | |
| 1569 | + | |
1576 | 1570 | | |
1577 | 1571 | | |
1578 | 1572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments