6.0.5 • Published 6 months ago
@types/timestring v6.0.5
Installation
npm install --save @types/timestring
Summary
This package contains type definitions for timestring (https://github.com/mike182uk/timestring).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/timestring.
index.d.ts
// Type definitions for timestring 6.0
// Project: https://github.com/mike182uk/timestring
// Definitions by: Devin Spikowski <https://github.com/vegeta897>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function timestring(input: string, returnUnit?: timestring.ReturnUnit, opts?: timestring.Options): number;
declare namespace timestring {
type ReturnUnit =
| 'ms'
| 'milli'
| 'millisecond'
| 'milliseconds'
| 's'
| 'sec'
| 'secs'
| 'second'
| 'seconds'
| 'm'
| 'min'
| 'mins'
| 'minute'
| 'minutes'
| 'h'
| 'hr'
| 'hrs'
| 'hour'
| 'hours'
| 'd'
| 'day'
| 'days'
| 'w'
| 'week'
| 'weeks'
| 'mon'
| 'mth'
| 'mths'
| 'month'
| 'months'
| 'y'
| 'yr'
| 'yrs'
| 'year'
| 'years';
interface Options {
/**
* @default 24
*/
hoursPerDay?: number | undefined;
/**
* @default 7
*/
daysPerWeek?: number | undefined;
/**
* @default 4
*/
weeksPerMonth?: number | undefined;
/**
* @default 12
*/
monthsPerYear?: number | undefined;
/**
* @default 365.25s
*/
daysPerYear?: number | undefined;
}
}
export = timestring;
Additional Details
- Last updated: Fri, 02 Jul 2021 19:37:06 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Devin Spikowski.