From f9b12bf1e97e2dd1565878515a1ec6ad26df812a Mon Sep 17 00:00:00 2001 From: Ulad Kasach Date: Wed, 20 Nov 2024 20:12:41 -0800 Subject: [PATCH] fix(pkg): ensure isUniMonth utils are exported --- src/index.ts | 3 ++- src/logic/checks/isUniMonth.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7e06e3b..0da6765 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,9 @@ export * from './domain/UniDateTime'; export * from './domain/UniDuration'; export * from './logic/utils/sleep'; -export * from './logic/checks/isUniDate'; export * from './logic/checks/isUniDateTime'; +export * from './logic/checks/isUniDate'; +export * from './logic/checks/isUniMonth'; export * from './logic/casts/toMillisecondsSinceEpoch'; export * from './logic/manipulate/addDuration'; export * from './logic/manipulate/getDuration'; diff --git a/src/logic/checks/isUniMonth.ts b/src/logic/checks/isUniMonth.ts index 92cc69f..14ffbd9 100644 --- a/src/logic/checks/isUniMonth.ts +++ b/src/logic/checks/isUniMonth.ts @@ -1,7 +1,7 @@ import { format, parseISO } from 'date-fns'; import { withAssure } from 'type-fns'; -import { UniDate } from '../../domain/UniDateTime'; +import { UniMonth } from '../../domain/UniDateTime'; import { castInputToDate } from '../casts/castInputToDate'; /** @@ -9,12 +9,12 @@ import { castInputToDate } from '../casts/castInputToDate'; */ export const asUniMonth = ( input: Parameters[0], -): UniDate => format(castInputToDate(input), 'yyyy-MM') as UniDate; +): UniMonth => format(castInputToDate(input), 'yyyy-MM') as UniMonth; /** * checks whether a string literal input is a UniDate */ -export const isUniMonth = withAssure((input: string): input is UniDate => { +export const isUniMonth = withAssure((input: string): input is UniMonth => { try { return asUniMonth(parseISO(input)) === input; } catch {