$ cnpm install @types/pretty-time
npm install --save @types/pretty-time
This package contains type definitions for pretty-time (https://github.com/jonschlinkert/pretty-time).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pretty-time.
// Type definitions for pretty-time 1.1
// Project: https://github.com/jonschlinkert/pretty-time
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.3
type Increment =
| 'ns'
| 'nano'
| 'nanosecond'
| 'nanoseconds'
| 'μs'
| 'micro'
| 'microsecond'
| 'microseconds'
| 'ms'
| 'milli'
| 'millisecond'
| 'milliseconds'
| 's'
| 'sec'
| 'second'
| 'seconds'
| 'm'
| 'min'
| 'minute'
| 'minutes'
| 'h'
| 'hr'
| 'hour'
| 'hours'
| 'd'
| 'day'
| 'days'
| 'w'
| 'wk'
| 'week'
| 'weeks';
declare function prettyTime(time: number | number[] | string[], smallest?: Increment | string, digits?: number): string;
export = prettyTime;
These definitions were written by Adam Zerella.
Copyright 2013 - present © cnpmjs.org | Home |