Skip to content

Commit 63dc50f

Browse files
authored
Fix type of ApolloServerPluginUsageReporting reportTimer (#7799)
Fixes #7798 In src/plugin/usageReporting/plugin.ts reportTimer is typed as NodeJS.Timer, it is actually a timeout, so using node 18> types it is incompatible with clearInterval()
1 parent a7ecbba commit 63dc50f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fair-squids-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@apollo/server': patch
3+
---
4+
5+
Fix type of ApolloServerPluginUsageReporting reportTimer

packages/server/src/plugin/usageReporting/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function ApolloServerPluginUsageReporting<TContext extends BaseContext>(
206206
}
207207
| undefined;
208208

209-
let reportTimer: NodeJS.Timer | undefined;
209+
let reportTimer: NodeJS.Timeout | undefined;
210210
if (!sendReportsImmediately) {
211211
reportTimer = setInterval(
212212
() => sendAllReportsAndReportErrors(),

0 commit comments

Comments
 (0)