SOURCE

function getAge(birth,callback){
	setTimeout(()=>{
		callback(2020-birth)
	},2000)
}

const getAgeObservable = Rx.Observable.bindCallback(getAge);
const age$ = getAgeObservable(1993);
age$.subscribe(v => console.log(v))
console 命令行工具 X clear

                    
>
console