Installation
npm install --save @types/calc-percent
Summary
This package contains type definitions for calc-percent (https://github.com/kevva/calc-percent).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/calc-percent.
index.d.ts
/**
* Calculate percentage
* @param val - Value which should be calculated.
* @param total - Total that val should be compared against.
* @param [opts]
*/
declare function calc(val: number, total: number, opts?: calc.Options): string;
declare namespace calc {
interface Options {
/**
* Number of decimals
* @default 0
*/
decimal?: number | undefined;
/**
* Append a suffix.
* @default ''
*/
suffix?: string | undefined;
}
}
export = calc;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
Credits
These definitions were written by Piotr Błażejewicz.