@@ -68,7 +68,7 @@ export function asThenable<T>(callback: () => T | TPromise<T> | Thenable<T>): Th
6868 } else {
6969 resolve ( item ) ;
7070 }
71- } , ( ) => { /* not supported */ } ) ;
71+ } ) ;
7272}
7373
7474export interface ITask < T > {
@@ -136,8 +136,6 @@ export class Throttler {
136136
137137 return new TPromise ( ( c , e ) => {
138138 this . queuedPromise . then ( c , e ) ;
139- } , ( ) => {
140- // no-op
141139 } ) ;
142140 }
143141
@@ -287,8 +285,6 @@ export class Barrier {
287285 this . _isOpen = false ;
288286 this . _promise = new TPromise < boolean > ( ( c , e ) => {
289287 this . _completePromise = c ;
290- } , ( ) => {
291- console . warn ( 'You should really not try to cancel this ready promise!' ) ;
292288 } ) ;
293289 }
294290
@@ -712,11 +708,11 @@ export class RunOnceWorker<T> extends RunOnceScheduler {
712708export function nfcall ( fn : Function , ...args : any [ ] ) : TPromise ;
713709export function nfcall < T > ( fn : Function , ...args : any [ ] ) : TPromise < T > ;
714710export function nfcall ( fn : Function , ...args : any [ ] ) : any {
715- return new TPromise ( ( c , e ) => fn ( ...args , ( err : any , result : any ) => err ? e ( err ) : c ( result ) ) , ( ) => null ) ;
711+ return new TPromise ( ( c , e ) => fn ( ...args , ( err : any , result : any ) => err ? e ( err ) : c ( result ) ) ) ;
716712}
717713
718714export function ninvoke ( thisArg : any , fn : Function , ...args : any [ ] ) : TPromise ;
719715export function ninvoke < T > ( thisArg : any , fn : Function , ...args : any [ ] ) : TPromise < T > ;
720716export function ninvoke ( thisArg : any , fn : Function , ...args : any [ ] ) : any {
721- return new TPromise ( ( c , e ) => fn . call ( thisArg , ...args , ( err : any , result : any ) => err ? e ( err ) : c ( result ) ) , ( ) => null ) ;
717+ return new TPromise ( ( c , e ) => fn . call ( thisArg , ...args , ( err : any , result : any ) => err ? e ( err ) : c ( result ) ) ) ;
722718}
0 commit comments