mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Added type check for setting object and format function overloads.
This commit is contained in:
+12
-3
@@ -5,7 +5,16 @@
|
||||
|
||||
|
||||
declare namespace moment {
|
||||
interface Duration {
|
||||
format(template: string, precision?: string, settings?: any): string;
|
||||
interface DurationFormatSettings {
|
||||
template?: string;
|
||||
precision?: number;
|
||||
trim?: boolean|string;
|
||||
forceLength?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
interface Duration {
|
||||
format(template: string, precision?: number, settings?: DurationFormatSettings): string;
|
||||
format(template: string, settings?: DurationFormatSettings): string;
|
||||
format(settings: DurationFormatSettings): string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user