Article 5BA1V Syntax for passing {} objects to typescript functions

Syntax for passing {} objects to typescript functions

by
TheIndependentAquarius
from LinuxQuestions.org on (#5BA1V)
https://rxjs-dev.firebaseapp.com/guide/observable
Code:observable.subscribe({
next(x) { console.log('got value ' + x); },
error(err) { console.error('something wrong occurred: ' + err); },
complete() { console.log('done'); } });As I can see they have passed functions to {} object and then passed this object as a parameter to function subscribe.

What is the function syntax for this kind of parameter accepting functions?
Does this actually mean that we are passing an object which has definitions of functions inside it as a function parameter?
Please point out the documentation.latest?d=yIl2AUoC8zA latest?i=loqgmtWQoA0:tzli2rXyARM:F7zBnMy latest?i=loqgmtWQoA0:tzli2rXyARM:V_sGLiP latest?d=qj6IDK7rITs latest?i=loqgmtWQoA0:tzli2rXyARM:gIN9vFwloqgmtWQoA0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments