Skip to content

Commit

Permalink
Adding JSDocs for types file
Browse files Browse the repository at this point in the history
  • Loading branch information
erdimaden committed May 14, 2024
1 parent 33fe676 commit afb9cf5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/coinbase/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@ import { AxiosPromise } from "axios";
import { User as UserModel } from "./../client/api";

/**
* UserAPI client type definition
* UserAPI client type definition.
*/
export type UserAPIClient = { getCurrentUser(options?): AxiosPromise<UserModel> };
export type UserAPIClient = {
/**
* Retrieves the current user.
* @param {Object} [options] - Axios request options.
* @returns {AxiosPromise<UserModel>} - A promise resolving to the User model.
* @throws {Error} If the request fails.
*/
getCurrentUser(options?): AxiosPromise<UserModel>;
};

/**
* API clients type definition for the Coinbase SDK
* API clients type definition for the Coinbase SDK.
* Represents the set of API clients available in the SDK.
* @typedef {Object} ApiClients
* @property {UserAPIClient} [user] - The User API client.
*/
export type ApiClients = {
/**
* The User API client.
* @type {UserAPIClient}
*/
user?: UserAPIClient;
};

0 comments on commit afb9cf5

Please sign in to comment.