Skip to content

Commit 9df03c9

Browse files
authored
Update comments for installations, performance and remote config (#4766)
* add package descriptions * initial capitals and periods * add parameter description to installations * add interface descriptions for perf * address comments * address comments2
1 parent 626c05b commit 9df03c9

File tree

20 files changed

+113
-30
lines changed

20 files changed

+113
-30
lines changed

packages-exp/analytics-exp/src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Analytics
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2019 Google LLC

packages-exp/auth-exp/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Authentication
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2017 Google LLC

packages-exp/functions-exp/src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Cloud Functions for Firebase
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2017 Google LLC

packages-exp/installations-exp/src/api/delete-installations.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';
2424

2525
/**
2626
* Deletes the Firebase Installation and all associated data.
27+
* @param installations - The `Installations` instance.
2728
*
2829
* @public
2930
*/

packages-exp/installations-exp/src/api/get-id.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';
2323
/**
2424
* Creates a Firebase Installation if there isn't one for the app and
2525
* returns the Installation ID.
26+
* @param installations - The `Installations` instance.
2627
*
2728
* @public
2829
*/

packages-exp/installations-exp/src/api/get-installations.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';
2020

2121
/**
2222
* Returns an instance of FirebaseInstallations associated with the given FirebaseApp instance.
23+
* @param app - The `FirebaseApp` instance.
2324
*
2425
* @public
2526
*/

packages-exp/installations-exp/src/api/get-token.ts

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { FirebaseInstallations } from '../interfaces/public-types';
2525

2626
/**
2727
* Returns an Installation auth token, identifying the current Firebase Installation.
28+
* @param installations - The `Installations` instance.
29+
* @param forceRefresh - Force refresh regardless of token expiration.
2830
*
2931
* @public
3032
*/

packages-exp/installations-exp/src/api/on-id-change.ts

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export type IdChangeUnsubscribeFn = () => void;
3535
/**
3636
* Sets a new callback that will get called when Installation ID changes.
3737
* Returns an unsubscribe function that will remove the callback when called.
38+
* @param installations - The `Installations` instance.
39+
* @param callback - The callback function that is invoked when FID changes.
40+
* @returns A function that can be called to unsubscribe.
3841
*
3942
* @public
4043
*/

packages-exp/installations-exp/src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Installations
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2019 Google LLC

packages-exp/messaging-exp/src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Cloud Messaging
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2017 Google LLC

packages-exp/performance-exp/src/index.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Performance Monitoring
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2020 Google LLC
@@ -45,7 +51,7 @@ const DEFAULT_ENTRY_NAME = '[DEFAULT]';
4551

4652
/**
4753
* Returns a FirebasePerformance instance for the given app.
48-
* @param app - The FirebaseApp to use.
54+
* @param app - The `FirebaseApp` to use.
4955
* @public
5056
*/
5157
export function getPerformance(
@@ -59,8 +65,8 @@ export function getPerformance(
5965

6066
/**
6167
* Returns a FirebasePerformance instance for the given app. Can only be called once.
62-
* @param app - The FirebaseApp to use.
63-
* @param settings - Optional settings for the Performance instance.
68+
* @param app - The `FirebaseApp` to use.
69+
* @param settings - Optional settings for the `FirebasePerformance` instance.
6470
* @public
6571
*/
6672
export function initializePerformance(
@@ -83,8 +89,8 @@ export function initializePerformance(
8389
}
8490

8591
/**
86-
* Returns a new PerformanceTrace instance.
87-
* @param performance - The FirebasePerformance instance to use.
92+
* Returns a new `PerformanceTrace` instance.
93+
* @param performance - The `FirebasePerformance` instance to use.
8894
* @param name - The name of the trace.
8995
* @public
9096
*/

packages-exp/performance-exp/src/public_types.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717

1818
/**
19+
* Defines configuration options for the Performance Monitoring SDK.
20+
*
1921
* @public
2022
*/
2123
export interface PerformanceSettings {
@@ -27,6 +29,8 @@ export interface PerformanceSettings {
2729
}
2830

2931
/**
32+
* The Firebase Performance Monitoring service interface.
33+
*
3034
* @public
3135
*/
3236
export interface FirebasePerformance {
@@ -42,6 +46,8 @@ export interface FirebasePerformance {
4246
}
4347

4448
/**
49+
* The interface representing a `Trace`.
50+
*
4551
* @public
4652
*/
4753
export interface PerformanceTrace {

packages-exp/remote-config-exp/src/api.ts

+23-23
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import { getModularInstance } from '@firebase/util';
3131

3232
/**
3333
*
34-
* @param app - the firebase app instance
35-
* @returns a remote config instance
34+
* @param app - The `FirebaseApp` instance.
35+
* @returns A `RemoteConfig` instance.
3636
*
3737
* @public
3838
*/
@@ -44,7 +44,7 @@ export function getRemoteConfig(app: FirebaseApp = getApp()): RemoteConfig {
4444

4545
/**
4646
* Makes the last fetched config available to the getters.
47-
* @param remoteConfig - the remote config instance
47+
* @param remoteConfig - The `RemoteConfig` instance.
4848
* @returns A promise which resolves to true if the current call activated the fetched configs.
4949
* If the fetched configs were already activated, the promise will resolve to false.
5050
*
@@ -75,9 +75,9 @@ export async function activate(remoteConfig: RemoteConfig): Promise<boolean> {
7575

7676
/**
7777
* Ensures the last activated config are available to the getters.
78-
* @param remoteConfig - the remote config instance
78+
* @param remoteConfig - The `RemoteConfig` instance.
7979
*
80-
* @returns A promise that resolves when the last activated config is available to the getters
80+
* @returns A promise that resolves when the last activated config is available to the getters.
8181
* @public
8282
*/
8383
export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {
@@ -92,7 +92,7 @@ export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {
9292

9393
/**
9494
* Fetches and caches configuration from the Remote Config service.
95-
* @param remoteConfig - the remote config instance
95+
* @param remoteConfig - The `RemoteConfig` instance.
9696
* @public
9797
*/
9898
export async function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
@@ -134,8 +134,8 @@ export async function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
134134
/**
135135
* Gets all config.
136136
*
137-
* @param remoteConfig - the remote config instance
138-
* @returns all config
137+
* @param remoteConfig - The `RemoteConfig` instance.
138+
* @returns All config.
139139
*
140140
* @public
141141
*/
@@ -155,10 +155,10 @@ export function getAll(remoteConfig: RemoteConfig): Record<string, Value> {
155155
*
156156
* Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.
157157
*
158-
* @param remoteConfig - the remote config instance
159-
* @param key - the name of the parameter
158+
* @param remoteConfig - The `RemoteConfig` instance.
159+
* @param key - The name of the parameter.
160160
*
161-
* @returns the value for the given key as a boolean
161+
* @returns The value for the given key as a boolean.
162162
* @public
163163
*/
164164
export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean {
@@ -170,10 +170,10 @@ export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean {
170170
*
171171
* Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.
172172
*
173-
* @param remoteConfig - the remote config instance
174-
* @param key - the name of the parameter
173+
* @param remoteConfig - The `RemoteConfig` instance.
174+
* @param key - The name of the parameter.
175175
*
176-
* @returns the value for the given key as a number
176+
* @returns The value for the given key as a number.
177177
*
178178
* @public
179179
*/
@@ -182,13 +182,13 @@ export function getNumber(remoteConfig: RemoteConfig, key: string): number {
182182
}
183183

184184
/**
185-
* Gets the value for the given key as a String.
185+
* Gets the value for the given key as a string.
186186
* Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.
187187
*
188-
* @param remoteConfig - the remote config instance
189-
* @param key - the name of the parameter
188+
* @param remoteConfig - The `RemoteConfig` instance.
189+
* @param key - The name of the parameter.
190190
*
191-
* @returns the value for the given key as a String
191+
* @returns The value for the given key as a string.
192192
*
193193
* @public
194194
*/
@@ -199,10 +199,10 @@ export function getString(remoteConfig: RemoteConfig, key: string): string {
199199
/**
200200
* Gets the {@link Value} for the given key.
201201
*
202-
* @param remoteConfig - the remote config instance
203-
* @param key - the name of the parameter
202+
* @param remoteConfig - The `RemoteConfig` instance.
203+
* @param key - The name of the parameter.
204204
*
205-
* @returns the value for the given key
205+
* @returns The value for the given key.
206206
*
207207
* @public
208208
*/
@@ -230,8 +230,8 @@ export function getValue(remoteConfig: RemoteConfig, key: string): Value {
230230
/**
231231
* Defines the log level to use.
232232
*
233-
* @param remoteConfig - the remote config instance
234-
* @param logLevel - the log level to set
233+
* @param remoteConfig - The `RemoteConfig` instance.
234+
* @param logLevel - The log level to set.
235235
*
236236
* @public
237237
*/

packages-exp/remote-config-exp/src/api2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { getModularInstance } from '@firebase/util';
2525
*
2626
* Performs fetch and activate operations, as a convenience.
2727
*
28-
* @param remoteConfig - the remote config instance
28+
* @param remoteConfig - The remote config instance.
2929
*
3030
* @returns A promise which resolves to true if the current call activated the fetched configs.
3131
* If the fetched configs were already activated, the promise will resolve to false.

packages-exp/remote-config-exp/src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Remote Config
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2020 Google LLC

packages/database/api-extractor.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"extends": "../../config/api-extractor.json",
33
// Point it to your entry point d.ts file.
4-
"mainEntryPointFilePath": "<projectFolder>/exp-types/index.d.ts"
4+
"mainEntryPointFilePath": "<projectFolder>/dist/exp/index.d.ts"
55
}

packages/database/exp/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Firebase Realtime Database
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2020 Google LLC

packages/firestore/exp/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Cloud Firestore
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2020 Google LLC

packages/storage/exp/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Cloud Storage for Firebase
3+
*
4+
* @packageDocumentation
5+
*/
6+
17
/**
28
* @license
39
* Copyright 2020 Google LLC

scripts/exp/docgen.ts

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ async function generateDocs(forDevsite: boolean = false) {
5353
}
5454
);
5555

56+
// build database-exp
57+
await spawn(
58+
'yarn',
59+
['lerna', 'run', '--scope', '@firebase/database', 'build:exp'],
60+
{
61+
stdio: 'inherit'
62+
}
63+
);
64+
5665
// generate public typings for firestore
5766
await spawn(
5867
'yarn',

0 commit comments

Comments
 (0)