UNPKG

expo-calendar

Version:

Provides an API for interacting with the device's system calendars, events, reminders, and associated records.

77 lines (61 loc) 2.42 kB
import type { PermissionResponse } from 'expo'; class ExpoGoCalendarNextStub { static readonly ExpoCalendar = class ExpoCalendar { constructor() { throw new Error('`ExpoCalendar` is not yet available in the Expo Go managed workflow.'); } addEventWithForm() { throw new Error('Calendar@next functionality is not available in Expo Go'); } }; static readonly ExpoCalendarEvent = class ExpoCalendarEvent { constructor() { throw new Error('`ExpoCalendarEvent` is not yet available in the Expo Go managed workflow.'); } }; static readonly ExpoCalendarReminder = class ExpoCalendarReminder { constructor() { throw new Error( '`ExpoCalendarReminder` is not yet available in the Expo Go managed workflow.' ); } }; static readonly ExpoCalendarAttendee = class ExpoCalendarAttendee { constructor() { throw new Error( '`ExpoCalendarAttendee` is not yet available in the Expo Go managed workflow.' ); } }; getDefaultCalendarSync(): void { throw new Error('Calendar@next functionality is not available in Expo Go'); } createCalendar(): void { throw new Error('Calendar@next functionality is not available in Expo Go'); } async getCalendars(): Promise<void> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async listEvents(): Promise<void> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async presentPicker(): Promise<void> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async requestCalendarPermissions(writeOnly?: boolean): Promise<PermissionResponse> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async getCalendarPermissions(writeOnly?: boolean): Promise<PermissionResponse> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async requestRemindersPermissions(): Promise<PermissionResponse> { throw new Error('Calendar@next functionality is not available in Expo Go'); } async getRemindersPermissions(): Promise<PermissionResponse> { throw new Error('Calendar@next functionality is not available in Expo Go'); } getSourcesSync(): void { throw new Error('Calendar@next functionality is not available in Expo Go'); } } export default ExpoGoCalendarNextStub;