MadKudu / node-hubspot

Node wrapper for the HubSpot API
MIT License
192 stars 157 forks source link

Can't set limiter in Typescript #177

Closed paulinetheitgirl closed 5 years ago

paulinetheitgirl commented 5 years ago

When using typed Hubspot and doing:

new Hubspot({
    baseUrl: Config.hubspotUrl,
    apiKey: Config.hubspotApiKey,
    limiter: {
        maxConcurrent: 2,
        minTime: 1000 / 9,
      }
})

I get this error: Argument of type '{ baseUrl: string; apiKey: string; limiter: any; }' is not assignable to parameter of type 'ApiOptions | AccessTokenOptions'. Object literal may only specify known properties, and 'limiter' does not exist in type 'ApiOptions | AccessTokenOptions'.

Do i need to install additional packages?

pcothenet commented 5 years ago

@paulinetheitgirl this seems to be an issue with the option type which does not include the limiter.

pcothenet commented 5 years ago

@paulinetheitgirl actually, this should be the fixed in the latest published version, can you checl

paulinetheitgirl commented 5 years ago

Works now, thanks!