node-red / node-red-node-test-helper

A test framework for Node-RED nodes
Apache License 2.0
57 stars 41 forks source link

Versions after 0.2.7 does not compile (0.3.0) #62

Closed FStefanni closed 1 year ago

FStefanni commented 1 year ago

Hi,

I am using typescript, with these packages:

If I switch node-red-node-test-helper to version 0.3.0, the project does not compiles anymore:

node_modules/@types/sinon/index.d.ts:1447:53 - error TS2694: Namespace '"node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'FakeTimerInstallOpts'.

1447         useFakeTimers: boolean | Partial<FakeTimers.FakeTimerInstallOpts>;
                                                         ~~~~~~~~~~~~~~~~~~~~

node_modules/@types/sinon/index.d.ts:1569:67 - error TS2694: Namespace '"node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'FakeTimerInstallOpts'.

1569         useFakeTimers(config?: number | Date | Partial<FakeTimers.FakeTimerInstallOpts>): SinonFakeTimers;
                                                                       ~~~~~~~~~~~~~~~~~~~~
Found 2 errors in the same file, starting at: node_modules/@types/sinon/index.d.ts:1447

I suppose it is an internal dependency of node-red-node-test-helper which breaks the compatibility of types. For testing the issue, my code is available here: https://gitlab.com/open-kappa/nodejs/mytest.git

Regards

knolleary commented 1 year ago

I can only assume @types/node-red-node-test-helper may be out of date.

We in the Node-RED project have never contributed anything to @types/* - if they are out of date, that isn't something we deal with.

FStefanni commented 1 year ago

Hi,

ok, so I close this issue. I'll signal this problem to types maintainers. I wrongly assumed you were the maintainers of the types definitions.

Regards