Skip to content

Commit 40888a0

Browse files
authored
exclude internal types from appearing in the public typings file (#4821)
1 parent d326d55 commit 40888a0

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

packages-exp/auth-exp/src/core/user/token_manager.ts

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export const enum Buffer {
3232
TOKEN_REFRESH = 30_000
3333
}
3434

35+
/**
36+
* We need to mark this class as internal explicitly to exclude it in the public typings, because
37+
* it references AuthInternal which has a circular dependency with UserInternal.
38+
*
39+
* @internal
40+
*/
3541
export class StsTokenManager {
3642
refreshToken: string | null = null;
3743
accessToken: string | null = null;

packages-exp/auth-exp/src/model/auth.ts

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ export interface ConfigInternal extends Config {
4848
clientPlatform: ClientPlatform;
4949
}
5050

51+
/**
52+
* UserInternal and AuthInternal reference each other, so both of them are included in the public typings.
53+
* In order to exclude them, we mark them as internal explicitly.
54+
*
55+
* @internal
56+
*/
5157
export interface AuthInternal extends Auth {
5258
currentUser: User | null;
5359
emulatorConfig: EmulatorConfig | null;

packages-exp/auth-exp/src/model/popup_redirect.ts

+6
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ export interface EventManager {
7979
unregisterConsumer(authEventConsumer: AuthEventConsumer): void;
8080
}
8181

82+
/**
83+
* We need to mark this interface as internal explicitly to exclude it in the public typings, because
84+
* it references AuthInternal which has a circular dependency with UserInternal.
85+
*
86+
* @internal
87+
*/
8288
export interface PopupRedirectResolverInternal extends PopupRedirectResolver {
8389
// Whether or not to initialize the event manager early
8490
_shouldInitProactively: boolean;

packages-exp/auth-exp/src/model/user.ts

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export interface UserParameters {
5252
lastLoginAt?: string | null;
5353
}
5454

55+
/**
56+
* UserInternal and AuthInternal reference each other, so both of them are included in the public typings.
57+
* In order to exclude them, we mark them as internal explicitly.
58+
*
59+
* @internal
60+
*/
5561
export interface UserInternal extends User {
5662
displayName: string | null;
5763
email: string | null;

packages-exp/auth-exp/src/platform_browser/recaptcha/recaptcha_loader.ts

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export const _JSLOAD_CALLBACK = jsHelpers._generateCallbackName('rcb');
3232
const NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);
3333
const RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';
3434

35+
/**
36+
* We need to mark this interface as internal explicitly to exclude it in the public typings, because
37+
* it references AuthInternal which has a circular dependency with UserInternal.
38+
*
39+
* @internal
40+
*/
3541
export interface ReCaptchaLoader {
3642
load(auth: AuthInternal, hl?: string): Promise<Recaptcha>;
3743
clearedOneInstance(): void;

0 commit comments

Comments
 (0)