vsavkin 79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00

31 lines
922 B
TypeScript

import {bind, provide, Provider} from 'angular2/src/core/di';
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
/**
* A metric is measures values
*/
export abstract class Metric {
static bindTo(delegateToken): Provider[] {
return [bind(Metric).toFactory((delegate) => delegate, [delegateToken])];
}
/**
* Starts measuring
*/
beginMeasure(): Promise<any> { throw new BaseException('NYI'); }
/**
* Ends measuring and reports the data
* since the begin call.
* @param restart: Whether to restart right after this.
*/
endMeasure(restart: boolean): Promise<{[key: string]: any}> { throw new BaseException('NYI'); }
/**
* Describes the metrics provided by this metric implementation.
* (e.g. units, ...)
*/
describe(): {[key: string]: any} { throw new BaseException('NYI'); }
}