K
K
Konstantin2020-01-28 14:49:07
typescript
Konstantin, 2020-01-28 14:49:07

What does this entry mean in TypeScript?

public subscribe(channel: string, handler: (value: any) => void) {
    return this.data.subscribe(handler);
}


Does this mean that the second argument is a function with a value parameter?

And that it is returned as a result from the function?

What will the subscribe function return?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-01-28
@Junart1

Does this mean that the second argument is a function with a value parameter?

Yes
And that it is returned as a result from the function?

No
What will the subscribe function return?

Will return the same value as returned by the "this.data.subscribe" function. The return type will also be the same

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question