V
V
vetsmen2019-09-10 04:32:36
JavaScript
vetsmen, 2019-09-10 04:32:36

How to pass a context to a method?

I pass the context to the method:
52875e2af6.jpg
In the ws instance, the emit method exists, and I pass it using bind. In toEvent , this context is passed and I have access to it, but the IDE still swears that it is missing. How to specify it explicitly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-09-10
@vetsmen

private toEvent(this: WSClass, event: Event) {...}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question