Skip to content

Commit

Permalink
fix imports ts errors with // @ts-expect-error
Browse files Browse the repository at this point in the history
  • Loading branch information
Inbal-Tish committed Aug 10, 2021
1 parent 7334738 commit 94fd761
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/agenda/reservation-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ import {ActivityIndicator, View, FlatList, StyleProp, ViewStyle, TextStyle, Nati

// @ts-expect-error
import {extractComponentProps} from '../../component-updater';
// @ts-expect-error
import {sameDate} from '../../dateutils';
// @ts-expect-error
import {toMarkingFormat} from '../../interface';
import styleConstructor from './style';
import Reservation, {ReservationProps} from './reservation';
import {ReservationItemType, ReservationsType} from 'agenda';


export interface DayReservations {
reservation?: ReservationItemType;
date?: XDate;
Expand Down
3 changes: 3 additions & 0 deletions src/agenda/reservation-list/reservation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ import {View, Text} from 'react-native';

// @ts-expect-error
import {xdateToData} from '../../interface';
// @ts-expect-error
import {isToday} from '../../dateutils';
// @ts-expect-error
import {RESERVATION_DATE} from '../../testIDs';
import styleConstructor from './style';
import {Theme} from '../../types';
import {DayReservations} from './index';


export interface ReservationProps {
item: DayReservations;
/** Specify theme properties to override specific styles for reservation parts. Default = {} */
Expand Down
3 changes: 3 additions & 0 deletions src/calendar-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import {FlatList, Platform, Dimensions, View, ViewStyle, LayoutChangeEvent, Flat
import {extractComponentProps} from '../component-updater';
// @ts-expect-error
import {xdateToData, parseDate} from '../interface';
// @ts-expect-error
import {page, sameDate} from '../dateutils';
// @ts-expect-error
import {STATIC_HEADER} from '../testIDs';
import styleConstructor from './style';
import Calendar, {CalendarProps} from '../calendar';
import CalendarListItem from './item';
import CalendarHeader from '../calendar/header/index';


const {width} = Dimensions.get('window');
const CALENDAR_WIDTH = width;
const CALENDAR_HEIGHT = 360;
Expand Down
4 changes: 4 additions & 0 deletions src/calendar/day/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ import XDate from 'xdate';
import memoize from 'memoize-one';

import React, {Component} from 'react';

// @ts-expect-error
import {shouldUpdate} from '../../component-updater';
// @ts-expect-error
import {isToday as dateutils_isToday} from '../../dateutils';
// @ts-expect-error
import {xdateToData} from '../../interface';
// @ts-expect-error
import {SELECT_DATE_SLOT} from '../../testIDs';
import BasicDay, {BasicDayProps} from './basic';
import PeriodDay from './period';
import {MarkingProps} from './marking';


const basicDayPropsTypes = _.omit(BasicDay.propTypes, 'date');

export interface DayProps extends Omit<BasicDayProps, 'date'> {
Expand Down
2 changes: 2 additions & 0 deletions src/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {View, ViewStyle, StyleProp} from 'react-native';
// @ts-expect-error
import GestureRecognizer, {swipeDirections} from 'react-native-swipe-gestures';

// @ts-expect-error
import {page, isGTE, isLTE, sameMonth} from '../dateutils';
// @ts-expect-error
import {xdateToData, parseDate, toMarkingFormat} from '../interface';
// @ts-expect-error
import {getState} from '../day-state-manager';
Expand Down

0 comments on commit 94fd761

Please sign in to comment.