From 6ac7434b8b2a8429d4a2f94ef55478b62fc74f5d Mon Sep 17 00:00:00 2001 From: EamonHetherton Date: Thu, 8 Dec 2016 16:07:27 +1000 Subject: [PATCH 1/2] Ensure that zoneAbbr and zoneName are expected type (string). --- moment-timezone/moment-timezone-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index 410c45fe2e..5ce57818c1 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -80,7 +80,7 @@ moment.tz.setDefault('America/Los_Angeles'); moment.tz.guess(); -moment.tz('America/Los_Angeles').zoneAbbr(); +var zoneAbbr: string = moment.tz('America/Los_Angeles').zoneAbbr(); -moment.tz('America/Los_Angeles').zoneName(); +var zoneName: string = moment.tz('America/Los_Angeles').zoneName(); From b1b9addfb04b62133d5cfde4edc16595988e780a Mon Sep 17 00:00:00 2001 From: EamonHetherton Date: Thu, 8 Dec 2016 16:08:22 +1000 Subject: [PATCH 2/2] Update moment-timezone.d.ts --- moment-timezone/moment-timezone.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index c1d7e2d23f..870f0d6309 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -9,8 +9,8 @@ declare namespace moment { interface Moment { tz(): string; tz(timezone: string): Moment; - zoneAbbr() :Moment; - zoneName() :Moment; + zoneAbbr(): string; + zoneName(): string; } interface MomentStatic {