Properly typehint formatters.ts

This commit is contained in:
Matthias 2020-07-11 17:13:27 +02:00
parent bf5c9b80d1
commit d5cb48d186

View File

@ -1,10 +1,10 @@
import * as moment from 'moment';
export function formatPercent(value: number) {
export function formatPercent(value: number): string {
return value ? `${(value * 100).toFixed(3)}%` : '';
}
export function formatPrice(value: number) {
export function formatPrice(value: number): string {
return value ? value.toFixed(8) : '';
}