tinypool icon indicating copy to clipboard operation
tinypool copied to clipboard

Installing tinypool causes typescript errors.

Open mshima opened this issue 1 year ago • 3 comments

Tinypool is conflicting so some dependency:

Error: node_modules/tinypool/dist/index.d.ts(21,15): error TS2417: Class static side 'typeof EventEmitterAsyncResource' incorrectly extends base class static side 'typeof EventEmitter'.
  Types of property 'EventEmitterAsyncResource' are incompatible.
    Types of construct signatures are incompatible.
      Type 'new (options?: string | Options$1 | undefined) => EventEmitterAsyncResource' is not assignable to type 'new (options?: EventEmitterAsyncResourceOptions | undefined) => EventEmitterAsyncResource'.
        Construct signature return types 'EventEmitterAsyncResource' and 'EventEmitterAsyncResource' are incompatible.
          The types of 'asyncId' are incompatible between these types.
            Type '() => number' is not assignable to type 'number'.
Error: node_modules/tinypool/dist/index.d.ts(146,31): error TS2304: Cannot find name 'Worker'.

CI run: https://github.com/mshima/generator-jhipster/actions/runs/7835634934/job/21381450038?pr=914

mshima avatar Feb 08 '24 21:02 mshima

Could you set up a minimal reproduction for this? Or maybe solve this by not checking types of your dependencies by using skipLibCheck in tsconfig.json?

AriPerkkio avatar May 01 '24 17:05 AriPerkkio

Disabling skipLibCheck because a single dependency is quite drastic. We’ve switched to piscina.

mshima avatar May 01 '24 20:05 mshima

Similar issue from Piscina: https://github.com/piscinajs/piscina/issues/426

Tinypool should apply similar changes as in https://github.com/piscinajs/piscina/pull/433.

AriPerkkio avatar May 02 '24 04:05 AriPerkkio