-
Notifications
You must be signed in to change notification settings - Fork 121
feat: add jsdoc comments to v6 public interface types #690
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
feat: add jsdoc comments to v6 public interface types #690
Conversation
🦋 Changeset detectedLatest commit: 87cea48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
||
export interface PayPalV6Namespace { | ||
/** | ||
* Creates an SDK instance with the specified components and configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Creates an SDK instance with the specified components and configuration. | |
* Creates a SDK instance which is the first step in a SDK integration. This instance serves as the base layer for all SDK components. |
* Creates an SDK instance with the specified components and configuration. | ||
* | ||
* This is an asynchronous method that initializes the PayPal SDK with the provided | ||
* client token and components. The SDK is designed to be lightweight and modular, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove this part about the SDK design. It feels like marketing material.
* client token and components. The SDK is designed to be lightweight and modular, | |
* client token and components. |
* allowing you to load only the functionality you need. | ||
* | ||
* @param {CreateInstanceOptions} createInstanceOptions - Configuration options for creating the SDK instance | ||
* @returns {Promise<SdkInstance<T>>} - A promise that resolves to an SDK instance with methods based on the specified components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any context about what T
is here for the generic to make sense. I wonder if we can replace with
* @returns {Promise<SdkInstance<T>>} - A promise that resolves to an SDK instance with methods based on the specified components | |
* @returns {Promise<SdkInstance<Components[]>>} - A promise that resolves to an SDK instance with methods based on the specified components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @nbierdeman! 💯
I left a minor comment about the createInstance description. After that's addressed, I'm happy to see this get merged.
5596195
to
b9f0713
Compare
This PR adds JSDoc comments to v6 public interface types.