vovaspace / brandi

The dependency injection container powered by TypeScript.
https://brandi.js.org
ISC License
194 stars 12 forks source link

Compilation error with TypeScript 4.9.5 #35

Open Loginov-Sergei opened 1 year ago

Loginov-Sergei commented 1 year ago

We use brandi@5.0.0 in our project and it worked well with TypeScript@4.6.4. But recently we had to update TypeScript version up to 4.9.5 and now we are facing with the following compilation error:

node_modules/.pnpm/brandi@5.0.0/node_modules/brandi/lib/typings/types.d.ts:5:70 - error TS2344: Type 'T' does not satisfy the constraint 'object'.

5 export declare type UnknownCreator<T = unknown> = UnknownConstructor | UnknownFunction; ~

node_modules/.pnpm/brandi@5.0.0/node_modules/brandi/lib/typings/types.d.ts:5:36 5 export declare type UnknownCreator<T = unknown> = UnknownConstructor | UnknownFunction;


    This type parameter might need an `extends object` constraint.

Could you fix it?