You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using node 16.19, and I tried to install statsig-node version 6.3.0 and also 5.31, the case happened in both of them.
It looks like the package uses clearTimeout(timer); with bad syntax or something not supported
can you please fix it or let me know what I should do to fix it from my side?
I'm trying to compile my code with tsc -p .
This is the error:
` tsc -p .
node_modules/statsig-node/src/LogEventProcessor.ts:149:21 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/LogEventProcessor.ts:153:21 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/utils/Dispatcher.ts:92:20 - error TS2769: No overload matches this call.
Overload 1 of 2, '(timeoutId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
92 clearTimeout(this.drainTimer);
~~~~~~~~~~~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/utils/StatsigFetcher.ts:237:24 - error TS2769: No overload matches this call.
Overload 1 of 2, '(timeoutId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
237 clearTimeout(timer);
~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
If you installed statsig-node in your repo, tsc shouldn't be trying to compile the *.ts files under node_modules/statsig-node/src/..., because we already build them into *.js and *.d.ts files.
How are you importing statsig-node into your project? Are there any imports for "statsig-node/src/..." in your codebase?
If that's not the case, here are other resources that would help this investigation:
Your tsconfig.json file
The typescript version in your package.json file
Even better would be a repository in stackblit, codesandbox, replit or similar which reproduces these build errors.
Hi, I'm using node 16.19, and I tried to install statsig-node version 6.3.0 and also 5.31, the case happened in both of them.
It looks like the package uses
clearTimeout(timer);
with bad syntax or something not supportedcan you please fix it or let me know what I should do to fix it from my side?
I'm trying to compile my code with
tsc -p .
This is the error:
` tsc -p .
node_modules/statsig-node/src/LogEventProcessor.ts:149:21 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
149 clearInterval(this.flushTimer);
~~~~~~~~~~~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/LogEventProcessor.ts:153:21 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
153 clearInterval(this.deduperTimer);
~~~~~~~~~~~~~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/utils/Dispatcher.ts:92:20 - error TS2769: No overload matches this call.
Overload 1 of 2, '(timeoutId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
92 clearTimeout(this.drainTimer);
~~~~~~~~~~~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
node_modules/statsig-node/src/utils/StatsigFetcher.ts:237:24 - error TS2769: No overload matches this call.
Overload 1 of 2, '(timeoutId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
237 clearTimeout(timer);
~~~~~
node_modules/@types/node/timers.d.ts:130:17
130 Symbol.dispose: void;
~~~~~~~~~~~~~~~~
'[Symbol.dispose]' is declared here.
Found 4 errors in 3 files.
Errors Files
2 node_modules/statsig-node/src/LogEventProcessor.ts:149
1 node_modules/statsig-node/src/utils/Dispatcher.ts:92
1 node_modules/statsig-node/src/utils/StatsigFetcher.ts:237`
maybe this link can help :
https://stackoverflow.com/questions/55550096/ts2322-type-timeout-is-not-assignable-to-type-number-when-running-unit-te
Thanks!
The text was updated successfully, but these errors were encountered: