Skip to content

Commit 2d32b70

Browse files
committed
Clean up doc comments
1 parent f7775c1 commit 2d32b70

File tree

5 files changed

+39
-20
lines changed

5 files changed

+39
-20
lines changed

common/api-review/app-check-exp.api.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,36 @@
66

77
import { FirebaseApp } from '@firebase/app-exp';
88

9-
// @public (undocumented)
9+
// @public
1010
export function activate(app: FirebaseApp, siteKeyOrProvider: string | AppCheckProvider, isTokenAutoRefreshEnabled?: boolean): void;
1111

12-
// @public (undocumented)
13-
export type AppCheckComponentName = 'appCheck';
12+
// @public
13+
export interface AppCheck {
14+
app: FirebaseApp;
15+
}
1416

15-
// @public (undocumented)
17+
// @internal (undocumented)
18+
export type _AppCheckComponentName = 'app-check-exp';
19+
20+
// Warning: (ae-internal-missing-underscore) The name "AppCheckInternalComponentName" should be prefixed with an underscore because the declaration is marked as @internal
21+
//
22+
// @internal (undocumented)
1623
export type AppCheckInternalComponentName = 'app-check-internal';
1724

18-
// @public (undocumented)
25+
// @public
1926
export interface AppCheckProvider {
2027
getToken(): Promise<AppCheckToken>;
2128
}
2229

23-
// @public (undocumented)
30+
// @public
2431
export interface AppCheckToken {
2532
readonly expireTimeMillis: number;
2633
// (undocumented)
2734
readonly token: string;
2835
}
2936

3037
// @public
31-
export interface FirebaseAppCheck {
32-
activate(siteKeyOrProvider: string | AppCheckProvider, isTokenAutoRefreshEnabled?: boolean): void;
33-
// (undocumented)
34-
setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: boolean): void;
35-
}
38+
export function getAppCheck(app?: FirebaseApp): AppCheck;
3639

3740
// @public (undocumented)
3841
export function setTokenAutoRefreshEnabled(app: FirebaseApp, isTokenAutoRefreshEnabled: boolean): void;

packages-exp/app-check-exp/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ export function activate(
9696
}
9797
}
9898
/**
99-
*
10099
* @param isTokenAutoRefreshEnabled - If true, the SDK automatically
101100
* refreshes App Check tokens as needed. This overrides any value set
102101
* during `activate()`.
102+
* @public
103103
*/
104104
export function setTokenAutoRefreshEnabled(
105105
app: FirebaseApp,

packages-exp/app-check-exp/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
*/
1717
import { registerVersion, _registerComponent } from '@firebase/app-exp';
1818
import { Component, ComponentType } from '@firebase/component';
19-
import { AppCheckComponentName } from './public-types';
19+
import { _AppCheckComponentName } from './public-types';
2020
import { factory, internalFactory } from './factory';
2121
import { initializeDebugMode } from './debug';
22-
import { AppCheckInternalComponentName } from './types';
22+
import { _AppCheckInternalComponentName } from './types';
2323
import { name, version } from '../package.json';
2424

2525
// Used by other Firebase packages.
26-
export { AppCheckInternalComponentName };
26+
export { _AppCheckInternalComponentName as AppCheckInternalComponentName };
2727

2828
export * from './api';
2929
export * from './public-types';
3030

31-
const APP_CHECK_NAME: AppCheckComponentName = 'app-check-exp';
32-
const APP_CHECK_NAME_INTERNAL: AppCheckInternalComponentName =
31+
const APP_CHECK_NAME: _AppCheckComponentName = 'app-check-exp';
32+
const APP_CHECK_NAME_INTERNAL: _AppCheckInternalComponentName =
3333
'app-check-internal';
3434
function registerAppCheck(): void {
3535
// The public interface

packages-exp/app-check-exp/src/public-types.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,23 @@ export interface AppCheck {
2929
app: FirebaseApp;
3030
}
3131

32+
/**
33+
* An App Check provider. This can be either the built-in reCAPTCHA
34+
* provider or a custom provider. For more on custom providers, see
35+
* https://firebase.google.com/docs/app-check/web-custom-provider
36+
* @public
37+
*/
3238
export interface AppCheckProvider {
3339
/**
34-
* Returns an AppCheck token
40+
* Returns an AppCheck token.
3541
*/
3642
getToken(): Promise<AppCheckToken>;
3743
}
3844

45+
/**
46+
* The token returned from an {@link AppCheckProvider}.
47+
* @public
48+
*/
3949
export interface AppCheckToken {
4050
readonly token: string;
4151
/**
@@ -44,4 +54,7 @@ export interface AppCheckToken {
4454
readonly expireTimeMillis: number;
4555
}
4656

47-
export type AppCheckComponentName = 'app-check-exp';
57+
/**
58+
* @internal
59+
*/
60+
export type _AppCheckComponentName = 'app-check-exp';

packages-exp/app-check-exp/src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export interface AppCheckTokenResult {
3838
readonly error?: Error;
3939
}
4040

41-
export type AppCheckInternalComponentName = 'app-check-internal';
41+
/**
42+
* @internal
43+
*/
44+
export type _AppCheckInternalComponentName = 'app-check-internal';
4245

4346
declare module '@firebase/component' {
4447
interface NameServiceMapping {

0 commit comments

Comments
 (0)