@types/calc-percent
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/calc-percent

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.67 kB

Total Files

5

Last publish

Collaborators

  • types