Skip to content

Commit

Permalink
feat(clerk-js): Add loaded to core Clerk instance
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosdouvlis committed Oct 25, 2022
1 parent fb37054 commit 7c08a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ export default class Clerk implements ClerkInterface {
#lastOrganizationInvitation: OrganizationInvitationResource | null = null;
#lastOrganizationMember: OrganizationMembershipResource | null = null;

/**
* @inheritDoc {ClerkInterface.version}
*/
get version(): string {
return Clerk.version;
}

get loaded(): boolean {
return this.#isReady;
}

public constructor(frontendApi: string) {
if (!frontendApi) {
clerkErrorNoFrontendApi();
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export interface Clerk {
*/
version?: string;

loaded: boolean;

/** Clerk Frontend API string. */
frontendApi: string;

Expand Down

0 comments on commit 7c08a91

Please sign in to comment.