Skip to content

Commit cfad64d

Browse files
fix: fix rule no dup class members
1 parent 5f5d411 commit cfad64d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/@internationalized/date/src/CalendarDate.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ export class ZonedDateTime {
375375
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
376376
set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime;
377377
set(fields: DateFields & TimeFields, constrainDay?: boolean): ZonedDateTime;
378-
set(...args: any[]) {
378+
set(fields: DateFields & TimeFields, value?: Disambiguation | boolean) {
379379
let disambiguation, constrainDay = false;
380-
if (args[1] && typeof args[1] === 'string') {
381-
disambiguation = args[1];
382-
} else if (args[1] && typeof args[1] === 'boolean') {
383-
constrainDay = args[1];
380+
if (value && typeof value === 'string') {
381+
disambiguation = value;
382+
} else if (value && typeof value === 'boolean') {
383+
constrainDay = value;
384384
}
385-
return setZoned(this, args[0], disambiguation, constrainDay);
385+
return setZoned(this, fields, disambiguation, constrainDay);
386386
}
387387

388388

0 commit comments

Comments
 (0)