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

Improve JSDoc tags usage #388

Open
linear bot opened this issue Jan 20, 2025 · 0 comments
Open

Improve JSDoc tags usage #388

linear bot opened this issue Jan 20, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@linear
Copy link

linear bot commented Jan 20, 2025

We should consider removing JSDoc tags on the functions and instead move the descriptions to the properties on the types. This improves reuse and better support IDEs like VSCode's IntelliSense.

IE
Instead of

/**
   * Registers a derivative with license tokens. The derivative IP is registered with license tokens minted from the parent IP's license terms.
   * The license terms of the parent IPs issued with license tokens are attached to the derivative IP.
   * The caller must be the derivative IP owner or an authorized operator.
   * @param request - The request object that contains all data needed to register derivative license tokens.
   *   @param request.childIpId The derivative IP ID.
   *   @param {Array} request.licenseTokenIds The IDs of the license tokens.
   *    @param request.args.maxRts The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000).
   *   @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
   * @returns A Promise that resolves to an object containing the transaction hash.
   */
  public async registerDerivativeWithLicenseTokens(
    request: RegisterDerivativeWithLicenseTokensRequest,
  )

Should be

/**
   * Registers a derivative with license tokens. The derivative IP is registered with license tokens minted from the parent IP's license terms.
   * The license terms of the parent IPs issued with license tokens are attached to the derivative IP.
   * The caller must be the derivative IP owner or an authorized operator.
   */
  public async registerDerivativeWithLicenseTokens(
    request: RegisterDerivativeWithLicenseTokensRequest,
  )
export type RegisterDerivativeWithLicenseTokensRequest = {
  /** The derivative IP ID */
  childIpId: Address;
  /** The IDs of the license tokens.*/
  licenseTokenIds: string[] | bigint[] | number[];
  /**
   * The maximum number of royalty tokens that can be distributed to the 
   * external royalty policies (max: 100,000,000).
   */
  maxRts: number | string;
  txOptions?: TxOptions;
};
@linear linear bot added the documentation Improvements or additions to documentation label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

0 participants