@@ -318,19 +318,27 @@ declare module moment {
318
318
319
319
}
320
320
321
- interface MomentLanguage {
321
+ interface BaseMomentLanguage {
322
+ months ?: any ;
323
+ monthsShort ?: any ;
324
+ weekdays ?: any ;
325
+ weekdaysShort ?: any ;
326
+ weekdaysMin ?: any ;
327
+ relativeTime ?: MomentRelativeTime ;
328
+ meridiem ?: ( hour : number , minute : number , isLowercase : boolean ) => string ;
329
+ calendar ?: MomentCalendar ;
330
+ ordinal ?: ( num : number ) => string ;
331
+ }
322
332
323
- months ?: any ;
324
- monthsShort ?: any ;
325
- weekdays ?: any ;
326
- weekdaysShort ?: any ;
327
- weekdaysMin ?: any ;
333
+ interface MomentLanguage extends BaseMomentLanguage {
328
334
longDateFormat ?: MomentLongDateFormat ;
329
- relativeTime ?: MomentRelativeTime ;
330
- meridiem ?: ( hour : number , minute : number , isLowercase : boolean ) => string ;
331
- calendar ?: MomentCalendar ;
332
- ordinal ?: ( num : number ) => string ;
335
+ }
333
336
337
+ interface MomentLanguageData extends BaseMomentLanguage {
338
+ /**
339
+ * @param formatType should be L, LL, LLL, LLLL.
340
+ */
341
+ longDateFormat ( formatType : string ) : string ;
334
342
}
335
343
336
344
interface MomentLongDateFormat {
@@ -412,7 +420,7 @@ declare module moment {
412
420
locale ( language ?: string [ ] ) : string ;
413
421
locale ( language ?: string , definition ?: MomentLanguage ) : string ;
414
422
415
- localeData ( language ?: string ) : MomentLanguage ;
423
+ localeData ( language ?: string ) : MomentLanguageData ;
416
424
417
425
longDateFormat : any ;
418
426
relativeTime : any ;
0 commit comments