Skip to content

Compilation error with TypeScript 4.9.5 #35

@Loginov-Sergei

Description

@Loginov-Sergei

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions