mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #15746 from TwoStone/moment-duration-fix
Fix and extend moment-duration-format types
This commit is contained in:
+13
-5
@@ -1,11 +1,19 @@
|
||||
// Type definitions for moment-duration-format v1.3.0
|
||||
// Type definitions for moment-duration-format 1.3
|
||||
// Project: https://github.com/jsmreese/moment-duration-format
|
||||
// Definitions by: Swint De Coninck <https://github.com/SwintDC>
|
||||
// Definitions by: Swint De Coninck <https://github.com/SwintDC>, Niklas Walter <https://github.com/TwoStone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as moment from "moment";
|
||||
|
||||
declare namespace moment {
|
||||
declare module "moment" {
|
||||
interface Duration {
|
||||
format(template: string, precision?: string, settings?: any): string;
|
||||
format(template: string, precision?: number, settings?: DurationFormatSettings): string;
|
||||
}
|
||||
}
|
||||
|
||||
interface DurationFormatSettings {
|
||||
template: string;
|
||||
precision: number;
|
||||
trim: boolean;
|
||||
forceLength: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Reference in New Issue
Block a user