mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
17 lines
566 B
TypeScript
17 lines
566 B
TypeScript
// Type definitions for ms.macro 2.0
|
|
// Project: https://github.com/knpwrs/ms.macro#readme
|
|
// Definitions by: Cameron Knight <https://github.com/ckknight>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/**
|
|
* Convert various time formats to milliseconds at build time in Babel.
|
|
* @param value The value to convert
|
|
* @example
|
|
* const ONE_DAY = ms('1 day');
|
|
* const TWO_DAYS = ms('2 days');
|
|
* @example
|
|
* const ONE_DAY = ms`1 day`;
|
|
* const TWO_DAYS = ms`2 days`;
|
|
*/
|
|
export default function ms(value: string | TemplateStringsArray): number;
|