Skip to content

Commit e583b80

Browse files
committed
Copy fixes for documentation.
1 parent 31b10e1 commit e583b80

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

.changeset/afraid-fishes-repair.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
'firebase': minor
55
---
66

7-
Added a new interface `FirebaseServerApp` which extends FirebaseApp and is intended to bridge state
8-
data between client and server runtime environments.
7+
Added the new `FirebaseServerApp` interface to bridge state
8+
data between client and server runtime environments. This interface extends `FirebaseApp`.

docs-devsite/app.firebaseserverapp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# FirebaseServerApp interface
13-
A [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) holds the initialization information for a collection of services running in server enviornments.
13+
A [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) holds the initialization information for a collection of services running in server environments.
1414

1515
Do not call this constructor directly. Instead, use [initializeServerApp()](./app.md#initializeserverapp_30ab697) to create an app.
1616

@@ -25,7 +25,7 @@ export interface FirebaseServerApp extends FirebaseApp
2525
2626
| Property | Type | Description |
2727
| --- | --- | --- |
28-
| [authIdTokenVerified](./app.firebaseserverapp.md#firebaseserverappauthidtokenverified) | () =&gt; Promise&lt;void&gt; | Checks to see if the local verification of the <code>authIdToken</code> provided to [initializeServerApp()](./app.md#initializeserverapp_30ab697) has completed.<!-- -->It is recommend that your application awaits this <code>Promise</code> before invoking <code>getAuth</code> if an <code>authIdToken</code> was provided in the <code>FirebaseServerAppSettings</code>.<!-- -->The returned <code>Promise</code> is completed immediately if the optional authIdToken parameter was omitted from <code>FirebaseServerApp</code> initialization. |
28+
| [authIdTokenVerified](./app.firebaseserverapp.md#firebaseserverappauthidtokenverified) | () =&gt; Promise&lt;void&gt; | Checks to see if the local verification of the <code>authIdToken</code> provided to [initializeServerApp()](./app.md#initializeserverapp_30ab697) has completed.<!-- -->It is recommend that your application awaits this <code>Promise</code> before invoking <code>getAuth</code> if an <code>authIdToken</code> was provided in the <code>FirebaseServerAppSettings</code>.<!-- -->The returned <code>Promise</code> is completed immediately if the optional <code>authIdToken</code> parameter was omitted from <code>FirebaseServerApp</code> initialization. |
2929
| [name](./app.firebaseserverapp.md#firebaseserverappname) | string | There is no <code>getApp()</code> operation for <code>FirebaseServerApp</code>, so the name is not relevant for applications. However, it may be used internally, and is declared here so that <code>FirebaseServerApp</code> conforms to the <code>FirebaseApp</code> interface. |
3030
| [settings](./app.firebaseserverapp.md#firebaseserverappsettings) | [FirebaseServerAppSettings](./app.firebaseserverappsettings.md#firebaseserverappsettings_interface) | The (read-only) configuration settings for this server app. These are the original parameters given in [initializeServerApp()](./app.md#initializeserverapp_30ab697)<!-- -->. |
3131
@@ -35,7 +35,7 @@ Checks to see if the local verification of the `authIdToken` provided to [initia
3535
3636
It is recommend that your application awaits this `Promise` before invoking `getAuth` if an `authIdToken` was provided in the `FirebaseServerAppSettings`<!-- -->.
3737
38-
The returned `Promise` is completed immediately if the optional authIdToken parameter was omitted from `FirebaseServerApp` initialization.
38+
The returned `Promise` is completed immediately if the optional `authIdToken` parameter was omitted from `FirebaseServerApp` initialization.
3939
4040
<b>Signature:</b>
4141

docs-devsite/app.firebaseserverappsettings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export interface FirebaseServerAppSettings extends FirebaseAppSettings
2424
| Property | Type | Description |
2525
| --- | --- | --- |
2626
| [authIdToken](./app.firebaseserverappsettings.md#firebaseserverappsettingsauthidtoken) | string | An optional Auth ID token used to resume a signed in user session from a client runtime environment.<!-- -->If provided, the <code>FirebaseServerApp</code> works to validate the token even before <code>Auth</code> is initialized. The result of the validation can be queried via . Awaiting the <code>Promise</code> returned by is highly recommended if an <code>authIdToken</code> token is provided.<!-- -->Invoking <code>getAuth</code> with a <code>FirebaseServerApp</code> configured with a validated <code>authIdToken</code> causes an automatic attempt to sign in the user that the <code>authIdToken</code> represents. The token needs to have been recently minted for this operation to succeed.<!-- -->If the token fails local verification, or if the Auth service has failed to validate it when the Auth SDK is initialized, then a warning is logged to the console and the Auth SDK will not sign in a user on initalization.<!-- -->If a user is successfully signed in, then the Auth instance's <code>onAuthStateChanged</code> callback is invoked with the <code>User</code> object as per standard Auth flows. However, <code>User</code> objects created via an <code>authIdToken</code> do not have a refresh token. Attempted <code>refreshToken</code> operations fail. |
27-
| [name](./app.firebaseserverappsettings.md#firebaseserverappsettingsname) | undefined | There is no get for <code>FirebaseServerApp</code>, so the name is not relevant. However it's always a blank string so that <code>FirebaseServerAp</code>p<code> conforms to the </code>FirebaseApp<!-- -->\` interface declaration. |
28-
| [releaseOnDeref](./app.firebaseserverappsettings.md#firebaseserverappsettingsreleaseonderef) | object | An optional object. If provided, the Firebase SDK uses a <code>FinalizationRegistry</code> object to monitor the garbage collection status of the provided object. The Firebase SDK releases its refrence on the <code>FirebaseServerApp</code> instance when the provided <code>releaseOnDeref</code> object is garbage collected.<!-- -->The intent of this field is to help reduce memory overhead for cloud functions. If provided, the customer's app running in a SSR pass need not worry about <code>FirebaseServerApp</code> cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)<!-- -->If an object is not provided then the application must clean up the <code>FirebaseServerApp</code> instance by invoking <code>deleteApp</code>.<!-- -->If the application provides an object in this parameter, but the application is executed in a JavaScript engine that predates the support of <code>FinalizationRegistry</code> (introduced in node v14.6.0, for instance), then an error is thrown at <code>FirebaseServerApp</code> initialization. |
27+
| [name](./app.firebaseserverappsettings.md#firebaseserverappsettingsname) | undefined | There is no <code>getApp()</code> operation for <code>FirebaseServerApp</code>, so the name is not relevant for applications. However, it may be used internally, and is declared here so that <code>FirebaseServerApp</code> conforms to the <code>FirebaseApp</code> interface. |
28+
| [releaseOnDeref](./app.firebaseserverappsettings.md#firebaseserverappsettingsreleaseonderef) | object | An optional object. If provided, the Firebase SDK uses a <code>FinalizationRegistry</code> object to monitor the garbage collection status of the provided object. The Firebase SDK releases its refrence on the <code>FirebaseServerApp</code> instance when the provided <code>releaseOnDeref</code> object is garbage collected.<!-- -->You can use this field to reduce memory management overhead for your application. If provided, an app running in a SSR pass does not need to perform <code>FirebaseServerApp</code> cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)<!-- -->If an object is not provided then the application must clean up the <code>FirebaseServerApp</code> instance by invoking <code>deleteApp</code>.<!-- -->If the application provides an object in this parameter, but the application is executed in a JavaScript engine that predates the support of <code>FinalizationRegistry</code> (introduced in node v14.6.0, for instance), then an error is thrown at <code>FirebaseServerApp</code> initialization. |
2929
3030
## FirebaseServerAppSettings.authIdToken
3131
@@ -47,7 +47,7 @@ authIdToken?: string;
4747
4848
## FirebaseServerAppSettings.name
4949
50-
There is no get for `FirebaseServerApp`<!-- -->, so the name is not relevant. However it's always a blank string so that `FirebaseServerAp`<!-- -->p` conforms to the `<!-- -->FirebaseApp<!-- -->\` interface declaration.
50+
There is no `getApp()` operation for `FirebaseServerApp`<!-- -->, so the name is not relevant for applications. However, it may be used internally, and is declared here so that `FirebaseServerApp` conforms to the `FirebaseApp` interface.
5151
5252
<b>Signature:</b>
5353
@@ -59,7 +59,7 @@ name?: undefined;
5959
6060
An optional object. If provided, the Firebase SDK uses a `FinalizationRegistry` object to monitor the garbage collection status of the provided object. The Firebase SDK releases its refrence on the `FirebaseServerApp` instance when the provided `releaseOnDeref` object is garbage collected.
6161
62-
The intent of this field is to help reduce memory overhead for cloud functions. If provided, the customer's app running in a SSR pass need not worry about `FirebaseServerApp` cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)
62+
You can use this field to reduce memory management overhead for your application. If provided, an app running in a SSR pass does not need to perform `FirebaseServerApp` cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)
6363
6464
If an object is not provided then the application must clean up the `FirebaseServerApp` instance by invoking `deleteApp`<!-- -->.
6565

docs-devsite/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This package coordinates the communication between the different Firebase compon
4343
| [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) | A [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) holds the initialization information for a collection of services.<!-- -->Do not call this constructor directly. Instead, use [initializeApp()](./app.md#initializeapp_cb2f5e1) to create an app. |
4444
| [FirebaseAppSettings](./app.firebaseappsettings.md#firebaseappsettings_interface) | Configuration options given to [initializeApp()](./app.md#initializeapp_cb2f5e1) |
4545
| [FirebaseOptions](./app.firebaseoptions.md#firebaseoptions_interface) | Firebase configuration object. Contains a set of parameters required by services in order to successfully communicate with Firebase server APIs and to associate client data with your Firebase project and Firebase application. Typically this object is populated by the Firebase console at project setup. See also: [Learn about the Firebase config object](https://firebase.google.com/docs/web/setup#config-object)<!-- -->. |
46-
| [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) | A [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) holds the initialization information for a collection of services running in server enviornments.<!-- -->Do not call this constructor directly. Instead, use [initializeServerApp()](./app.md#initializeserverapp_30ab697) to create an app. |
46+
| [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) | A [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface) holds the initialization information for a collection of services running in server environments.<!-- -->Do not call this constructor directly. Instead, use [initializeServerApp()](./app.md#initializeserverapp_30ab697) to create an app. |
4747
| [FirebaseServerAppSettings](./app.firebaseserverappsettings.md#firebaseserverappsettings_interface) | Configuration options given to [initializeServerApp()](./app.md#initializeserverapp_30ab697) |
4848

4949
## Variables

packages/app/src/api.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe('API tests', () => {
199199

200200
it('creates FirebaseServerApp with options', async () => {
201201
if (isBrowser()) {
202-
// FirebaseServerApp isn't supported for execution in browser enviornments.
202+
// FirebaseServerApp isn't supported for execution in browser environments.
203203
return;
204204
}
205205

@@ -218,7 +218,7 @@ describe('API tests', () => {
218218

219219
it('creates FirebaseServerApp with automaticDataCollectionEnabled', async () => {
220220
if (isBrowser()) {
221-
// FirebaseServerApp isn't supported for execution in browser enviornments.
221+
// FirebaseServerApp isn't supported for execution in browser environments.
222222
return;
223223
}
224224

@@ -239,7 +239,7 @@ describe('API tests', () => {
239239

240240
it('creates FirebaseServerApp with releaseOnDeref', async () => {
241241
if (isBrowser()) {
242-
// FirebaseServerApp isn't supported for execution in browser enviornments.
242+
// FirebaseServerApp isn't supported for execution in browser environments.
243243
return;
244244
}
245245

@@ -258,7 +258,7 @@ describe('API tests', () => {
258258

259259
it('creates FirebaseServerApp with FirebaseApp', async () => {
260260
if (isBrowser()) {
261-
// FirebaseServerApp isn't supported for execution in browser enviornments.
261+
// FirebaseServerApp isn't supported for execution in browser environments.
262262
return;
263263
}
264264

@@ -283,7 +283,7 @@ describe('API tests', () => {
283283

284284
it('create similar FirebaseServerApps does not return the same object', async () => {
285285
if (isBrowser()) {
286-
// FirebaseServerApp isn't supported for execution in browser enviornments.
286+
// FirebaseServerApp isn't supported for execution in browser environments.
287287
return;
288288
}
289289

@@ -311,7 +311,7 @@ describe('API tests', () => {
311311

312312
it('create FirebaseServerApps with varying deleteOnDeref, and they still return same object ', async () => {
313313
if (isBrowser()) {
314-
// FirebaseServerApp isn't supported for execution in browser enviornments.
314+
// FirebaseServerApp isn't supported for execution in browser environments.
315315
return;
316316
}
317317

@@ -338,7 +338,7 @@ describe('API tests', () => {
338338

339339
it('create duplicate FirebaseServerApps returns the same object', async () => {
340340
if (isBrowser()) {
341-
// FirebaseServerApp isn't supported for execution in browser enviornments.
341+
// FirebaseServerApp isn't supported for execution in browser environments.
342342
return;
343343
}
344344

@@ -360,7 +360,7 @@ describe('API tests', () => {
360360

361361
it('deleting FirebaseServerApps is ref counted', async () => {
362362
if (isBrowser()) {
363-
// FirebaseServerApp isn't supported for execution in browser enviornments.
363+
// FirebaseServerApp isn't supported for execution in browser environments.
364364
return;
365365
}
366366

packages/app/src/public-types.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export interface FirebaseApp {
7373

7474
/**
7575
* A {@link @firebase/app#FirebaseServerApp} holds the initialization information
76-
* for a collection of services running in server enviornments.
76+
* for a collection of services running in server environments.
7777
*
7878
* Do not call this constructor directly. Instead, use
7979
* {@link (initializeServerApp:1) | initializeServerApp()} to create
@@ -89,7 +89,7 @@ export interface FirebaseServerApp extends FirebaseApp {
8989
* It is recommend that your application awaits this `Promise` before invoking `getAuth` if an
9090
* `authIdToken` was provided in the `FirebaseServerAppSettings`.
9191
*
92-
* The returned `Promise` is completed immediately if the optional authIdToken parameter
92+
* The returned `Promise` is completed immediately if the optional `authIdToken` parameter
9393
* was omitted from `FirebaseServerApp` initialization.
9494
*/
9595
authIdTokenVerified: () => Promise<void>;
@@ -219,8 +219,8 @@ export interface FirebaseServerAppSettings extends FirebaseAppSettings {
219219
* Firebase SDK releases its refrence on the `FirebaseServerApp` instance when the
220220
* provided `releaseOnDeref` object is garbage collected.
221221
*
222-
* The intent of this field is to help reduce memory overhead for cloud functions.
223-
* If provided, the customer's app running in a SSR pass need not worry about
222+
* You can use this field to reduce memory management overhead for your application.
223+
* If provided, an app running in a SSR pass does not need to perform
224224
* `FirebaseServerApp` cleanup, so long as the reference object is deleted (by falling out of
225225
* SSR scope, for instance.)
226226
*
@@ -235,8 +235,9 @@ export interface FirebaseServerAppSettings extends FirebaseAppSettings {
235235
releaseOnDeref?: object;
236236

237237
/**
238-
* There is no get for `FirebaseServerApp`, so the name is not relevant. However it's always
239-
* a blank string so that `FirebaseServerAp`p` conforms to the `FirebaseApp` interface declaration.
238+
* There is no `getApp()` operation for `FirebaseServerApp`, so the name is not relevant for
239+
* applications. However, it may be used internally, and is declared here so that
240+
* `FirebaseServerApp` conforms to the `FirebaseApp` interface.
240241
*/
241242
name?: undefined;
242243
}

0 commit comments

Comments
 (0)