Skip to content

Error importing package in angular version ^20.1.4 and typescript ^5.8.2 #204

@derianmarchan

Description

@derianmarchan

X [ERROR] TS2416: Property 'once' in type 'WrappedSocket<ListenEvents, EmitEvents>' is not assignable to the same property in base type 'WrappedSocketIface<WrappedSocket<DefaultEventsMap, DefaultEventsMap>>'.
Type '<Ev extends ReservedOrUserEventNames<SocketReservedEvents, ListenEvents>>(eventName: Ev, callback: ReservedOrUserListener<SocketReservedEvents, ListenEvents, Ev>) => this' is not assignable to type '(ev: string, listener: (...args: any[]) => void) => WrappedSocket<DefaultEventsMap, DefaultEventsMap>'.
Types of parameters 'callback' and 'listener' are incompatible.
Type '(...args: any[]) => void' is not assignable to type 'FallbackToUntypedListener<string extends EventNames ? ListenEvents[keyof ListenEvents & string] : never>'. [plugin angular-compiler]

node_modules/ngx-socket-io/index.d.ts:67:4:
  67 │     once<Ev extends ReservedOrUserEventNames<SocketReservedEvents,...
     ╵     ~~~~

X [ERROR] TS2416: Property 'removeListener' in type 'WrappedSocket<ListenEvents, EmitEvents>' is not assignable to the same property in base type 'WrappedSocketIface<WrappedSocket<DefaultEventsMap, DefaultEventsMap>>'.
Type '<Ev extends ReservedOrUserEventNames<SocketReservedEvents, ListenEvents>>(eventName?: Ev | undefined, callback?: ReservedOrUserListener<SocketReservedEvents, ListenEvents, Ev> | undefined) => this' is not assignable to type '(ev?: string | undefined, listener?: ((...args: any[]) => void) | undefined) => WrappedSocket<DefaultEventsMap, DefaultEventsMap>'.
Types of parameters 'callback' and 'listener' are incompatible.
Type '((...args: any[]) => void) | undefined' is not assignable to type 'FallbackToUntypedListener<string extends EventNames ? ListenEvents[keyof ListenEvents & string] : never> | undefined'.
Type '(...args: any[]) => void' is not assignable to type 'FallbackToUntypedListener<string extends EventNames ? ListenEvents[keyof ListenEvents & string] : never>'. [plugin angular-compiler]

node_modules/ngx-socket-io/index.d.ts:73:4:
  73 │     removeListener<Ev extends ReservedOrUserEventNames<SocketReser...
     ╵     ~~~~~~~~~~~~~~

X [ERROR] TS2416: Property 'off' in type 'WrappedSocket<ListenEvents, EmitEvents>' is not assignable to the same property in base type 'WrappedSocketIface<WrappedSocket<DefaultEventsMap, DefaultEventsMap>>'.
Type '<Ev extends ReservedOrUserEventNames<SocketReservedEvents, ListenEvents>>(eventName?: Ev | undefined, listener?: ReservedOrUserListener<SocketReservedEvents, ListenEvents, Ev> | undefined) => this' is not assignable to type '(ev?: string | undefined, listener?: ((...args: any[]) => void) | undefined) => WrappedSocket<DefaultEventsMap, DefaultEventsMap>'.
Types of parameters 'listener' and 'listener' are incompatible.
Type '((...args: any[]) => void) | undefined' is not assignable to type 'FallbackToUntypedListener<string extends EventNames ? ListenEvents[keyof ListenEvents & string] : never> | undefined'.
Type '(...args: any[]) => void' is not assignable to type 'FallbackToUntypedListener<string extends EventNames ? ListenEvents[keyof ListenEvents & string] : never>'. [plugin angular-compiler]

node_modules/ngx-socket-io/index.d.ts:81:4:
  81 │     off<Ev extends ReservedOrUserEventNames<SocketReservedEvents, ...
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions