Skip to content

Commit fb40a3f

Browse files
committed
Fix various typing issues
1 parent bc441d3 commit fb40a3f

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@babel/eslint-parser": "^7.13.4",
4444
"@babel/runtime": "^7.12.5",
4545
"@types/lodash": "^4.14.170",
46-
"@types/react-native": "^0.63.52",
46+
"@types/react-native": "^0.64.19",
4747
"@types/xdate": "^0.8.32",
4848
"@typescript-eslint/eslint-plugin": "^2.13.0",
4949
"@typescript-eslint/parser": "^2.13.0",

src/agenda/reservation-list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {sameDate} from '../../dateutils';
1010
import {toMarkingFormat} from '../../interface';
1111
import styleConstructor from './style';
1212
import Reservation, {ReservationProps} from './reservation';
13-
import {ReservationItemType, ReservationsType} from 'agenda';
13+
import {ReservationItemType, ReservationsType} from '../../agenda';
1414

1515

1616
export interface DayReservations {

src/calendar/header/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function (theme: Theme = {}) {
3939
disabledArrowImage: {
4040
tintColor: appStyle.disabledArrowColor
4141
},
42+
// @ts-expect-error
4243
week: {
4344
marginTop: 7,
4445
flexDirection: 'row',
@@ -57,7 +58,6 @@ export default function (theme: Theme = {}) {
5758
disabledDayHeader: {
5859
color: appStyle.textSectionTitleDisabledColor
5960
},
60-
// @ts-expect-error
6161
...(theme['stylesheet.calendar.header'] || {})
6262
});
6363
}

src/expandableCalendar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {AccessibilityInfo, PanResponder, Animated, View, ViewStyle, Text, Image,
1313
import {CALENDAR_KNOB} from '../testIDs';
1414
import {page, weekDayNames} from '../dateutils';
1515
import {parseDate, toMarkingFormat} from '../interface';
16-
import {Theme, DateData, Direction} from 'types';
16+
import {Theme, DateData, Direction} from '../types';
1717
import styleConstructor, {HEADER_HEIGHT} from './style';
1818
import CalendarList, {CalendarListProps} from '../calendar-list';
1919
import Calendar from '../calendar';
@@ -139,7 +139,7 @@ class ExpandableCalendar extends Component<Props, State> {
139139
style: ViewStyle;
140140
};
141141
visibleMonth: number;
142-
visibleYear: number;
142+
visibleYear: number | undefined;
143143
initialDate: XDate;
144144
headerStyleOverride: Theme;
145145
header: React.RefObject<any> = React.createRef();
@@ -436,7 +436,6 @@ class ExpandableCalendar extends Component<Props, State> {
436436
if (month && this.visibleMonth !== month) {
437437
this.visibleMonth = month;
438438
if (first(value)?.year) {
439-
// @ts-expect-error
440439
this.visibleYear = first(value)?.year;
441440
}
442441

@@ -580,6 +579,7 @@ class ExpandableCalendar extends Component<Props, State> {
580579
{...others}
581580
theme={themeObject}
582581
ref={this.calendar}
582+
// @ts-expect-error should be converted to string
583583
current={this.initialDate}
584584
onDayPress={this.onDayPress}
585585
onVisibleMonthsChange={this.onVisibleMonthsChange}

src/expandableCalendar/week.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import Day from '../calendar/day/index';
1212
// import BasicDay from '../calendar/day/basic';
1313

1414

15-
interface Props extends CalendarProps {
15+
// TODO: current type should be a string
16+
interface Props extends Omit<CalendarProps, 'current'> {
1617
current: XDate;
1718
}
1819
export type WeekProps = Props;

0 commit comments

Comments
 (0)