Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comments for installations, performance and remote config #4766

Merged
merged 6 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages-exp/analytics-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Analytics
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2019 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/auth-exp/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Authentication
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2017 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/functions-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Cloud Functions
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2017 Google LLC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';

/**
* Deletes the Firebase Installation and all associated data.
* @param installations - The Installations instance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "Installations" a literal Fei?

If so, we should backtick it, here and throughout (wherever it is a literal).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the product name, like Firebase App

*
* @public
*/
Expand Down
1 change: 1 addition & 0 deletions packages-exp/installations-exp/src/api/get-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';
/**
* Creates a Firebase Installation if there isn't one for the app and
* returns the Installation ID.
* @param installations - The Installations instance
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @public
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { FirebaseInstallations } from '../interfaces/public-types';

/**
* Returns an instance of FirebaseInstallations associated with the given FirebaseApp instance.
* @param app - The Firebase App.
*
* @public
*/
Expand Down
2 changes: 2 additions & 0 deletions packages-exp/installations-exp/src/api/get-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import { FirebaseInstallations } from '../interfaces/public-types';

/**
* Returns an Installation auth token, identifying the current Firebase Installation.
* @param installations - The Installations instance
* @param forceRefresh - Force refresh regardless of token expiration.
*
* @public
*/
Expand Down
3 changes: 3 additions & 0 deletions packages-exp/installations-exp/src/api/on-id-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export type IdChangeUnsubscribeFn = () => void;
/**
* Sets a new callback that will get called when Installation ID changes.
* Returns an unsubscribe function that will remove the callback when called.
* @param installations - The Installations instance
* @param callback - The callback function which will be invoked when FID changes
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
* @returns A function that can be called to unsubscribe
*
* @public
*/
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/installations-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Installations
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2019 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/messaging-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Cloud Messaging
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2017 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/performance-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Performance Monitoring
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2020 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/performance-exp/src/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/

/**
* Defines configuration options for the Performance Monitoring SDK
*
* @public
*/
export interface PerformanceSettings {
Expand All @@ -27,6 +29,8 @@ export interface PerformanceSettings {
}

/**
* The Firebase Performance Monitoring service interface.
*
* @public
*/
export interface FirebasePerformance {
Expand All @@ -42,6 +46,8 @@ export interface FirebasePerformance {
}

/**
* The interface representing a Trace
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @public
*/
export interface PerformanceTrace {
Expand Down
44 changes: 22 additions & 22 deletions packages-exp/remote-config-exp/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { getModularInstance } from '@firebase/util';

/**
*
* @param app - the firebase app instance
* @returns a remote config instance
* @param app - The firebase app instance.
* @returns A remote config instance.
*
* @public
*/
Expand All @@ -44,7 +44,7 @@ export function getRemoteConfig(app: FirebaseApp = getApp()): RemoteConfig {

/**
* Makes the last fetched config available to the getters.
* @param remoteConfig - the remote config instance
* @param remoteConfig - The remote config instance.
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
* @returns A promise which resolves to true if the current call activated the fetched configs.
* If the fetched configs were already activated, the promise will resolve to false.
*
Expand Down Expand Up @@ -75,9 +75,9 @@ export async function activate(remoteConfig: RemoteConfig): Promise<boolean> {

/**
* Ensures the last activated config are available to the getters.
* @param remoteConfig - the remote config instance
* @param remoteConfig - The remote config instance.
*
* @returns A promise that resolves when the last activated config is available to the getters
* @returns A promise that resolves when the last activated config is available to the getters.
* @public
*/
export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {
Expand All @@ -92,7 +92,7 @@ export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {

/**
* Fetches and caches configuration from the Remote Config service.
* @param remoteConfig - the remote config instance
* @param remoteConfig - The remote config instance.
* @public
*/
export async function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
Expand Down Expand Up @@ -134,8 +134,8 @@ export async function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
/**
* Gets all config.
*
* @param remoteConfig - the remote config instance
* @returns all config
* @param remoteConfig - The remote config instance.
* @returns All config.
*
* @public
*/
Expand All @@ -155,10 +155,10 @@ export function getAll(remoteConfig: RemoteConfig): Record<string, Value> {
*
* Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.
*
* @param remoteConfig - the remote config instance
* @param key - the name of the parameter
* @param remoteConfig - The remote config instance.
* @param key - The name of the parameter.
*
* @returns the value for the given key as a boolean
* @returns The value for the given key as a boolean.
* @public
*/
export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean {
Expand All @@ -170,10 +170,10 @@ export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean {
*
* Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.
*
* @param remoteConfig - the remote config instance
* @param key - the name of the parameter
* @param remoteConfig - The remote config instance.
* @param key - The name of the parameter.
*
* @returns the value for the given key as a number
* @returns The value for the given key as a number.
*
* @public
*/
Expand All @@ -185,10 +185,10 @@ export function getNumber(remoteConfig: RemoteConfig, key: string): number {
* Gets the value for the given key as a String.
* Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.
*
* @param remoteConfig - the remote config instance
* @param key - the name of the parameter
* @param remoteConfig - The remote config instance.
* @param key - The name of the parameter.
*
* @returns the value for the given key as a String
* @returns The value for the given key as a String.
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @public
*/
Expand All @@ -199,10 +199,10 @@ export function getString(remoteConfig: RemoteConfig, key: string): string {
/**
* Gets the {@link @firebase/remote-config-types#Value} for the given key.
*
* @param remoteConfig - the remote config instance
* @param key - the name of the parameter
* @param remoteConfig - The remote config instance.
* @param key - The name of the parameter.
*
* @returns the value for the given key
* @returns The value for the given key.
*
* @public
*/
Expand Down Expand Up @@ -230,8 +230,8 @@ export function getValue(remoteConfig: RemoteConfig, key: string): Value {
/**
* Defines the log level to use.
*
* @param remoteConfig - the remote config instance
* @param logLevel - the log level to set
* @param remoteConfig - The remote config instance.
* @param logLevel - The log level to set.
*
* @public
*/
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/remote-config-exp/src/api2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { getModularInstance } from '@firebase/util';
*
* Performs fetch and activate operations, as a convenience.
*
* @param remoteConfig - the remote config instance
* @param remoteConfig - The remote config instance.
*
* @returns A promise which resolves to true if the current call activated the fetched configs.
* If the fetched configs were already activated, the promise will resolve to false.
Expand Down
6 changes: 6 additions & 0 deletions packages-exp/remote-config-exp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Remote Config
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2020 Google LLC
Expand Down
2 changes: 1 addition & 1 deletion packages/database/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../config/api-extractor.json",
// Point it to your entry point d.ts file.
"mainEntryPointFilePath": "<projectFolder>/exp-types/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/exp/index.d.ts"
}
6 changes: 6 additions & 0 deletions packages/database/exp/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Realtime Database
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2020 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages/firestore/exp/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Cloud Firestore
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2020 Google LLC
Expand Down
6 changes: 6 additions & 0 deletions packages/storage/exp/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Firebase Cloud Storage
Feiyang1 marked this conversation as resolved.
Show resolved Hide resolved
*
* @packageDocumentation
*/

/**
* @license
* Copyright 2020 Google LLC
Expand Down
9 changes: 9 additions & 0 deletions scripts/exp/docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ async function generateDocs(forDevsite: boolean = false) {
}
);

// build database-exp
await spawn(
'yarn',
['lerna', 'run', '--scope', '@firebase/database', 'build:exp'],
{
stdio: 'inherit'
}
);

// generate public typings for firestore
await spawn(
'yarn',
Expand Down