question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.1.1 still error incorrectly implements interface 'Resolve<SignalRConnection>'

See original GitHub issue

@Injectable() export class SignalRConnectionResolve implements Resolve<SignalRConnection> { constructor(private _signalR: SignalR) { } resolve() { console.log(‘SignalRConnectionResolve. Resolving…’); return this._signalR.connect(); } }

incorrectly implements interface 'Resolve<SignalRConnection>'. Types of property 'resolve' are incompatible. Type '() => Promise<ISignalRConnection>' is not assignable to type '(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => SignalRConnection | Observable<Sig...'. Type 'Promise<ISignalRConnection>' is not assignable to type 'SignalRConnection | Observable<SignalRConnection> | Promise<SignalRConnection>'. Type 'Promise<ISignalRConnection>' is not assignable to type 'Promise<SignalRConnection>'. Type 'ISignalRConnection' is not assignable to type 'SignalRConnection'. Property '_status' is missing in type 'ISignalRConnection'.

with version 2.0.4 get the same error

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
nulayuhzcommented, Dec 21, 2017

you just have to change the import { SignalR, SignalRConnection } from 'ng2-signalr'; to import { SignalR, ISignalRConnection } from 'ng2-signalr';

and change the export class ConnectionResolver implements Resolve<SignalRConnection> to export class ConnectionResolver implements Resolve<ISignalRConnection>

it is just that the example is not updated.

2reactions
Codewizardcommented, Apr 25, 2018

@ahlunju 's fix worked for me with the latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Service incorrectly implements interface - Stack Overflow
It is because in your interface you declared getItems as a field, not a class method. Change it to getItems() and it will...
Read more >
Class incorrectly implements interface in TypeScript | bobbyhadz
The error "Class incorrectly implements interface" occurs when a class implements an interface without specifying all of the properties and methods defined ...
Read more >
Handbook - Interfaces - TypeScript
Class 'Clock' incorrectly implements interface 'ClockConstructor'. Type 'Clock' provides no match for the signature 'new (hour: number, minute: number): any'.
Read more >
Error TS2420: Class 'XRWebGLLayer' incorrectly implements ...
I'm trying to update TS from 4.3.5 to 4.8.4 in this repo, which uses babylon: model-viewer/packages/render-fidelity-tools at master ...
Read more >
Class 'Tabs' incorrectly implements interface ... - Ionic Forum
This morning I was updating the ionic and after the upgrade appeared this error: Typescript Error Class 'Tabs' incorrectly implements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found