On "typescript": "^3.0.3", when importing the library as import eventbrite from 'eventbrite';, then running tsc, an error is thrown:
node_modules/eventbrite/lib/types.d.ts:6:42 - error TS2304: Cannot find name 'RequestInit'.
6 request: (apiPath: string, options?: RequestInit) => Promise<{}>;
Expected Behavior
Should compile in Typescript
Possible Solution
Define type or interface for RequestInit.
I've added export type RequestInit = any; to the top of the types file and it complies now. Obviously any is not preferable.
Your Environment
- SDK version: 1.0.2
- Node version: 8.11.1
- Operating system: Mac Mojave