Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Wrap Axios type and export new type #210

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joe-yeager
Copy link
Contributor

@joe-yeager joe-yeager commented Nov 14, 2024

Description and Context

Wraps the AxiosPromise in a HubSpotPromise type and exports it so that integrators don't need to use ReturnType annotations to have access to the type.

http/index.ts Outdated
@@ -16,6 +16,8 @@ import { HubSpotHttpError } from '../models/HubSpotHttpError';

const i18nKey = 'http.index';

export type HubSpotResponse<T = unknown> = AxiosPromise<T>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the primary change, all of the others are reactionary.

@joe-yeager joe-yeager marked this pull request as ready for review November 15, 2024 22:06
Copy link
Contributor

@kemmerle kemmerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked over the changes, and the type change makes sense to me.

Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor thing, LGTM otherwise

@@ -16,6 +16,8 @@ import { HubSpotHttpError } from '../models/HubSpotHttpError';

const i18nKey = 'http.index';

export type HubSpotPromise<T = unknown> = AxiosPromise<T>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LDL currently defines all types within the types dir, so this should live in types/http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants