constructorZone.run(() => { func = function(arg0: any, callback: Function) { expect(Zone.current.name).toEqual(constructorZone.name); callback(arg0); }; boundFunc = Rx.Observable.bindCallback(func, null, Rx.Scheduler.asap); observable = boundFunc('test'); });
constructorZone.run(() => { func = function(arg: any, callback: (error: any, result: any) => any) { expect(Zone.current.name).toEqual(constructorZone.name); callback(arg, null); }; boundFunc = Rx.Observable.bindCallback(func); observable = boundFunc('test'); });
constructorZone.run(() => { func = function(arg0: any, callback: Function) { expect(Zone.current.name).toEqual(constructorZone.name); callback(arg0); }; boundFunc = Rx.Observable.bindCallback(func, (arg: any) => { expect(Zone.current.name).toEqual(constructorZone.name); return 'selector' + arg; }); observable = boundFunc('test'); });