Is there anyone out there who can confirm whether the google Calendar API (via the npm package googleapis) for node.js or browser supports types that can be utilized in TypeScript? This would allow for a more strongly typed approach in projects using node or angular.
I have not been able to locate a @types/googleapis npm package, nor any relevant information in the documentation.
Any advice on this matter would be greatly appreciated.
Thank you in advance.
-- According to the documentation, typescript support is included natively within the googleapis package, eliminating the need for a separate package. Documentation - Typescript Section However, when I attempt to implement it as instructed in the documentation:
import { google, calendar_v3 } from 'googleapis';
Typescript gives me the following error message: [ts] Module '"/home/me/myProject/functions/node_modules/googleapis/build/src/index"' has no exported member 'calendar_v3'. [2305]
Upon inspecting the googleapis/build/src/index.d.ts file, I see a reference to GoogleApis which points to ../apis where all APIs are located, including a v3.d.ts file with the namespace defined.
* @namespace calendar
* @type {Function}
* @version v3
* @variation v3
It appears that the necessary code is present, but I seem to be overlooking something. Can anyone shed light on how to properly utilize this library in TypeScript? An example would be most helpful.
Philippe