Skip to content

Commit

Permalink
feat(ts): add connection_id for Client instance
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed May 18, 2024
1 parent edc3d5c commit af4d000
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ class Client {
});
return new Response(result);
}

get connection_id(): string {
if (!this.uuid)
throw new Error(
"Client may not connected yet, or this caused by an internal error"
);
return this.uuid;
}
}

export async function connect(entrance: string): Promise<Client> {
Expand Down

0 comments on commit af4d000

Please sign in to comment.