Demystify Node state (#61)

This commit is contained in:
Maciej Hirsz
2018-09-27 21:30:51 +02:00
committed by GitHub
parent ae81485854
commit bc9d47d358
7 changed files with 157 additions and 97 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import { Types } from '@dotstats/common';
export interface Viewport {
width: number;
height: number;
@@ -36,7 +38,7 @@ export function trimHash(hash: string, length: number): string {
return hash.substr(0, side) + '..' + hash.substr(-side, side);
}
export function milliOrSecond(num: number): string {
export function milliOrSecond(num: Types.Milliseconds | Types.PropagationTime): string {
if (num < 10000) {
return `${num}ms`;
}