providesModule function makeEmptyFunction ( arg ) { return function ( ) { return arg ; } ; } /**
 * This function accepts and discards inputs; it has no side effects. This is
 * primarily useful idiomatically for overridable function endpoints which
 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
 */ interface EmptyFunction { ( ) : void ; thatReturns : < T > ( value : T ) => ( ) => T ; thatReturnsFalse : ( ) => boolean ; thatReturnsTrue : ( ) => boolean ; thatReturnsNull : ( ) => null ; thatReturnsThis : ( ) => this ; thatReturnsArgument : < T > ( value : T ) => T ; } export const emptyFunction = function ( ) { } as EmptyFunction ; Object . assign ( emptyFunction as any , { thatReturns : makeEmptyFunction , thatReturnsFalse : makeEmptyFunction ( false ) , thatReturnsTrue : makeEmptyFunction ( true ) , thatReturnsNull : makeEmptyFunction ( null ) , thatReturnsThis ( ) { return this ; } , thatReturnsArgument ( arg ) { return arg ; } , } ) ;