Bolisov / google-api-typings-generator

⚠️ This repo is no longer maintained and outdated, use active fork ⚠️
https://github.com/Maxim-Mazurok/google-api-typings-generator
8 stars 5 forks source link

[v3] gapi.calendar #6

Open ovaar opened 5 years ago

ovaar commented 5 years ago

Property 'calendar' does not exist on type 'typeof client'.

Example as shown in gapi.client.calendar results in the error above.

const response = await gapi.client.events.list(options);

Should be:

const response = await gapi.client.calendar.events.list(options);
amoshydra commented 4 years ago

A workaround following nwshane's example

// `gapicalendar.d.ts` file in my own application
declare namespace gapi.client.calendar {
  const acl: gapi.client.calendar.AclResource;
  const calendarList: gapi.client.calendar.CalendarListResource;
  const calendars: gapi.client.calendar.CalendarsResource;
  const channels: gapi.client.calendar.ChannelsResource;
  const colors: gapi.client.calendar.ColorsResource;
  const events: gapi.client.calendar.EventsResource;
  const freebusy: gapi.client.calendar.FreebusyResource;
  const settings: gapi.client.calendar.SettingsResource;
}
Maxim-Mazurok commented 4 years ago

This repo is abandoned, see #19 and use active fork instead: Maxim-Mazurok/google-api-typings-generator

Please, close this issue if you will, thanks for your cooperation!