Skip to content

Commit 7bce14e

Browse files
committed
Fix for optional types
1 parent 3193f00 commit 7bce14e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

types/luxon-business-days/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export interface HolidayHelpersDict {
1515

1616
declare module "luxon" {
1717
interface DateTime<IsValid extends boolean> {
18-
holidayHelpers: HolidayHelper[] | undefined;
19-
holidayMatchers: HolidayMatcher[] | undefined;
18+
businessDays?: BusinessDays;
19+
holidayMatchers?: HolidayMatcher[];
2020
availableHolidayHelpers: HolidayHelpersDict;
2121
availableHolidayMatchers: HolidayMatchersDict;
2222

types/luxon-business-days/luxon-business-days-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ now.setupBusiness({ holidayMatchers: [(d: DateTime) => false] }); // $ExpectType
2222
now.setupBusiness({ businessDays: [1, 2, 3], holidayMatchers: [(d: DateTime) => false] }); // $ExpectType void
2323
now.clearBusinessSetup(); // $ExpectType void
2424

25-
now.holidayHelpers; // $ExpectType HolidayHelper[] | undefined
25+
now.businessDays; // $ExpectType BusinessDays | undefined
2626
now.holidayMatchers; // $ExpectType HolidayMatcher[] | undefined
2727
now.availableHolidayHelpers; // $ExpectType HolidayHelpersDict
2828
now.availableHolidayMatchers; // $ExpectType HolidayMatchersDict

0 commit comments

Comments
 (0)