Skip to content

Commit

Permalink
clean up js docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 19, 2024
1 parent 1a96196 commit c8e42f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
17 changes: 6 additions & 11 deletions test/get_canister_actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@ import { join } from 'path';

import { getCanisterId } from '../dfx';

/**
* Options for getting a canister actor
* @interface GetCanisterActorOptions
* @property {Identity} [identity] - Optional identity for authentication
* @property {Agent} [agent] - Optional pre-configured agent
* @property {string} [parentDir] - Optional parent directory path for the dfx generated files
*/
type GetCanisterActorOptions = {
/** Optional identity for authentication */
identity?: Identity;
/** Optional pre-configured agent */
agent?: Agent;
/** Optional parent directory path for the dfx generated files */
parentDir?: string;
};

/**
* Creates an actor instance for interacting with a canister
* @template T - The interface type of the actor
* @param {string} canisterName - Name of the canister to create an actor for
* @param {GetCanisterActorOptions} [options={}] - Configuration options
* @returns {Promise<ActorSubclass<T>>} A promise that resolves to the actor instance
* @param canisterName - Name of the canister to create an actor for
* @param options - Configuration options
* @returns A promise that resolves to the actor instance
*/
export async function getCanisterActor<T>(
canisterName: string,
Expand Down
6 changes: 3 additions & 3 deletions test/property/get_actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { getCanisterActor } from '../get_canister_actor';

/**
* Creates an actor instance with cache clearing functionality
* @param {string} parentDir - Parent directory path containing the dfx generated files
* @param {Agent} [agent] - Optional pre-configured agent
* @returns {Promise<ActorSubclass<T>>} A promise that resolves to the actor instance
* @param parentDir - Parent directory path containing the dfx generated files
* @param agent - Optional pre-configured agent
* @returns A promise that resolves to the actor instance
*/
export async function getActor<T>(
parentDir: string,
Expand Down

0 comments on commit c8e42f7

Please sign in to comment.