Skip to content

RequestInit missing from types.d.ts causing failed Typescript builds #46

@deremer

Description

@deremer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions