Deprecated export class ProgressCalculator { private _value : number = 0 ; private readonly _total : number ; param total param initial constructor ( total , initial = 0 ) { this . _value = initial ; this . _total = total ; } public incr ( ) { ++ this . _value ; } public value ( ) { return this . _value ; } public total ( ) { return this . _total ; } public percentage ( ) { if ( this . _total === 0 ) { return 100 ; } return 100 * ( this . _value / this . _total ) ; } public static calculate ( count , total , defaultValue = 0 ) { if ( total === 0 ) { return defaultValue ; } return 100 * ( count / total ) ; } }