From a1efd4a2705c4336cb33c425c4ca98e61a75b0b1 Mon Sep 17 00:00:00 2001 From: David Duwaer Date: Mon, 12 Jul 2021 15:30:44 +0200 Subject: [PATCH] Fixed lost types at overloaded methods & updated version number --- package-lock.json | 2 +- package.json | 2 +- src/Instant.ts | 6 +++--- src/LocalDateTime.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ff0d4c..40c1992 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "globol", - "version": "0.4.0", + "version": "0.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2d243ad..58ede2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "globol", - "version": "0.4.0", + "version": "0.4.1", "description": "Javascript/Typescript date/time as it should be: immutable, fluent, multi-zone, intuitive. Inspired by the masterful java.time library which suddenly made dates easy.", "keywords": [ "time", diff --git a/src/Instant.ts b/src/Instant.ts index f7da52e..1100a59 100644 --- a/src/Instant.ts +++ b/src/Instant.ts @@ -60,9 +60,9 @@ export class Instant return new Instant(this.epochMilli + duration.asMillis); } - public atZone(zoneIdString: ZoneIdString) - public atZone(zoneId: ZoneId) - public atZone(arg: ZoneId | ZoneIdString) + public atZone(zoneIdString: ZoneIdString): ZonedDateTime + public atZone(zoneId: ZoneId): ZonedDateTime + public atZone(arg: ZoneId | ZoneIdString): ZonedDateTime { return new ZonedDateTime(this.toJS(), toZoneId(arg)); } diff --git a/src/LocalDateTime.ts b/src/LocalDateTime.ts index 44aa04c..bcd32e8 100644 --- a/src/LocalDateTime.ts +++ b/src/LocalDateTime.ts @@ -33,9 +33,9 @@ export class LocalDateTime .atZone(ZoneId.browser()); } - public atZone(zoneIdString: ZoneIdString) - public atZone(zoneId: ZoneId) - public atZone(arg: ZoneId | ZoneIdString) + public atZone(zoneIdString: ZoneIdString): ZonedDateTime + public atZone(zoneId: ZoneId): ZonedDateTime + public atZone(arg: ZoneId | ZoneIdString): ZonedDateTime { const zoneId = toZoneId(arg); const zonedMoment = this.toZonedMoment(zoneId);