Skip to content

Commit cb68a40

Browse files
committed
Fix auth api extractor warnings
1 parent 8ae7f03 commit cb68a40

File tree

7 files changed

+33
-20
lines changed

7 files changed

+33
-20
lines changed

common/api-review/auth-exp.api.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function applyActionCode(auth: Auth, oobCode: string): Promise<void>;
8282
export interface Auth {
8383
readonly config: Config;
8484
readonly currentUser: User | null;
85-
// Warning: (ae-forgotten-export) The symbol "EmulatorConfig" needs to be exported by the entry point index.d.ts
85+
// Warning: (ae-forgotten-export) The symbol "EmulatorConfig" needs to be exported by the entry point index.doc.d.ts
8686
readonly emulatorConfig: EmulatorConfig | null;
8787
languageCode: string | null;
8888
readonly name: string;
@@ -102,14 +102,14 @@ export class AuthCredential {
102102
protected constructor(
103103
providerId: string,
104104
signInMethod: string);
105-
// Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.d.ts
106-
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts
105+
// Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.doc.d.ts
106+
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.doc.d.ts
107107
//
108108
// @internal (undocumented)
109109
_getIdTokenResponse(_auth: AuthInternal): Promise<PhoneOrOauthTokenResponse>;
110110
// @internal (undocumented)
111111
_getReauthenticationResolver(_auth: AuthInternal): Promise<IdTokenResponse>;
112-
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts
112+
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.doc.d.ts
113113
//
114114
// @internal (undocumented)
115115
_linkToIdToken(_auth: AuthInternal, _idToken: string): Promise<IdTokenResponse>;
@@ -277,6 +277,9 @@ export function connectAuthEmulator(auth: Auth, url: string, options?: {
277277
disableWarnings: boolean;
278278
}): void;
279279

280+
// @public
281+
export const cordovaPopupRedirectResolver: PopupRedirectResolver;
282+
280283
// @public
281284
export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
282285

@@ -330,7 +333,7 @@ export class EmailAuthProvider implements AuthProvider {
330333

331334
export { ErrorFn }
332335

333-
// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.d.ts
336+
// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.doc.d.ts
334337
//
335338
// @public
336339
export class FacebookAuthProvider extends BaseOAuthProvider {
@@ -470,7 +473,7 @@ export type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;
470473
export class OAuthCredential extends AuthCredential {
471474
accessToken?: string;
472475
static fromJSON(json: string | object): OAuthCredential | null;
473-
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts
476+
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.doc.d.ts
474477
//
475478
// @internal (undocumented)
476479
static _fromParams(params: OAuthCredentialParams): OAuthCredential;
@@ -549,7 +552,7 @@ export class PhoneAuthCredential extends AuthCredential {
549552
_getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
550553
// @internal (undocumented)
551554
_linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
552-
// Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.d.ts
555+
// Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.doc.d.ts
553556
//
554557
// @internal (undocumented)
555558
_makeVerificationRequest(): SignInWithPhoneNumberRequest;
@@ -622,6 +625,9 @@ export interface ReactNativeAsyncStorage {
622625
setItem(key: string, value: string): Promise<void>;
623626
}
624627

628+
// @public
629+
export const reactNativeLocalPersistence: Persistence;
630+
625631
// @public
626632
export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
627633

@@ -634,14 +640,14 @@ export function reauthenticateWithPopup(user: User, provider: AuthProvider, reso
634640
// @public
635641
export function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
636642

637-
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.d.ts
643+
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.doc.d.ts
638644
//
639645
// @public
640646
export class RecaptchaVerifier implements ApplicationVerifierInternal {
641-
// Warning: (ae-forgotten-export) The symbol "Parameters" needs to be exported by the entry point index.d.ts
647+
// Warning: (ae-forgotten-export) The symbol "Parameters" needs to be exported by the entry point index.doc.d.ts
642648
constructor(containerOrId: HTMLElement | string, parameters: Parameters_2, authExtern: Auth);
643649
clear(): void;
644-
// Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.d.ts
650+
// Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.doc.d.ts
645651
//
646652
// @internal (undocumented)
647653
readonly _recaptchaLoader: ReCaptchaLoader;
@@ -655,7 +661,7 @@ export class RecaptchaVerifier implements ApplicationVerifierInternal {
655661
// @public
656662
export function reload(user: User): Promise<void>;
657663

658-
// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.d.ts
664+
// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.doc.d.ts
659665
//
660666
// @public
661667
export class SAMLAuthProvider extends FederatedAuthProvider {
@@ -799,4 +805,6 @@ export function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCode
799805
export function verifyPasswordResetCode(auth: Auth, code: string): Promise<string>;
800806

801807

808+
// (No @packageDocumentation comment for this package)
809+
802810
```

packages-exp/auth-exp/index.rn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import { AsyncStorage } from 'react-native';
2626

2727
import { FirebaseApp, getApp, _getProvider } from '@firebase/app-exp';
28-
import { Auth } from './src/model/public_types';
28+
import { Auth, Persistence } from './src/model/public_types';
2929

3030
import { initializeAuth } from './src';
3131
import { registerAuth } from './src/core/auth/register';
@@ -41,7 +41,7 @@ export * from './src';
4141
*
4242
* @public
4343
*/
44-
export const reactNativeLocalPersistence =
44+
export const reactNativeLocalPersistence: Persistence =
4545
getReactNativePersistence(AsyncStorage);
4646

4747
export function getAuth(app: FirebaseApp = getApp()): Auth {

packages-exp/auth-exp/src/core/auth/emulator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ import { _castAuth } from './auth_impl';
3636
*
3737
* @param auth - The {@link Auth} instance.
3838
* @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').
39-
* @param options.disableWarnings - (Optional: default false) Disable the warning banner attached to the DOM
39+
* @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to
40+
* `true` to disable the warning banner attached to the DOM.
4041
*
4142
* @public
4243
*/

packages-exp/auth-exp/src/core/providers/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export abstract class BaseOAuthProvider
130130
export class OAuthProvider extends BaseOAuthProvider {
131131
/**
132132
* Creates an {@link OAuthCredential} from a JSON string or a plain object.
133-
* @param json A plain object or a JSON string
133+
* @param json - A plain object or a JSON string
134134
*/
135135
static credentialFromJSON(json: object | string): OAuthCredential {
136136
const obj = typeof json === 'string' ? JSON.parse(json) : json;

packages-exp/auth-exp/src/core/providers/saml.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const SAML_PROVIDER_PREFIX = 'saml.';
3636
export class SAMLAuthProvider extends FederatedAuthProvider {
3737
/**
3838
* Constructor. The providerId must start with "saml."
39-
* @param - providerId
39+
* @param providerId - SAML provider ID.
4040
*/
4141
constructor(providerId: string) {
4242
_assert(
@@ -60,7 +60,7 @@ export class SAMLAuthProvider extends FederatedAuthProvider {
6060
* const credential = SAMLAuthProvider.credentialFromResult(userCredential);
6161
* ```
6262
*
63-
* @param userCredential
63+
* @param userCredential - The user credential.
6464
*/
6565
static credentialFromResult(
6666
userCredential: UserCredential
@@ -84,7 +84,7 @@ export class SAMLAuthProvider extends FederatedAuthProvider {
8484

8585
/**
8686
* Creates an {@link AuthCredential} from a JSON string or a plain object.
87-
* @param json A plain object or a JSON string
87+
* @param json - A plain object or a JSON string
8888
*/
8989
static credentialFromJSON(json: string | object): AuthCredential {
9090
const credential = SAMLAuthCredential.fromJSON(json);

packages-exp/auth-exp/src/platform_browser/providers/phone.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class PhoneAuthProvider {
150150

151151
/**
152152
* Generates an {@link AuthCredential} from a {@link UserCredential}.
153-
* @param userCredential
153+
* @param userCredential - The user credential.
154154
*/
155155
static credentialFromResult(
156156
userCredential: UserCredential
@@ -189,7 +189,7 @@ export class PhoneAuthProvider {
189189
* // At this point, auth.currentUser.phoneNumber === number.
190190
* ```
191191
*
192-
* @param error
192+
* @param error - The error to generate a credential from.
193193
*/
194194
static credentialFromError(error: FirebaseError): AuthCredential | null {
195195
return PhoneAuthProvider.credentialFromTaggedObject(

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
* limitations under the License.
1616
*/
1717

18+
/**
19+
* This needs a comment block or tsdoc will think the header comment
20+
* is associated with this interface.
21+
*/
1822
export interface Parameters {
1923
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2024
[key: string]: any;

0 commit comments

Comments
 (0)