From 509950cfefa6e7d8356f617af6ec78ba71673db8 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 29 Jul 2022 17:00:56 +0300 Subject: [PATCH] fix typings --- CHANGELOG.md | 3 ++- index.d.ts | 12 ++++++------ package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b089ee9..ed806b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog -## 6.0.2 +## 6.0.2 - 6.0.6 +Multiple version bumps because brain no worky - TS typings diff --git a/index.d.ts b/index.d.ts index 0307cc2..27d38a9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -13,11 +13,11 @@ type ReturnUnit = 'y' type TimestringOptions = { - hoursPerDay: number - daysPerWeek: number - weeksPerMonth: number - monthsPerYear: number - daysPerYear: number + hoursPerDay?: number + daysPerWeek?: number + weeksPerMonth?: number + monthsPerYear?: number + daysPerYear?: number } -declare function timestring(string: string, returnUnit: ReturnUnit, opts: TimestringOptions): any; \ No newline at end of file +declare function timestring(string: string, returnUnit?: ReturnUnit, opts?: TimestringOptions): any; \ No newline at end of file diff --git a/package.json b/package.json index fe1b990..a5bd7fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@navy.gif/timestring", - "version": "6.0.5", + "version": "6.0.6", "description": "Parse a human readable time string into a time based value", "main": "./index.js", "types": "./index.d.ts",