Skip to content

Commit

Permalink
fix(app-check, types): add newReactNativeFirebaseAppCheckProvider f…
Browse files Browse the repository at this point in the history
…unction type

it was only missing due to oversight originally, apologies
  • Loading branch information
mikehardy committed Feb 14, 2023
1 parent 0c7f51c commit 9f5f231
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/app-check/__tests__/appcheck.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ describe('appCheck()', function () {
);
});
});

describe('react-native-firebase provider', function () {
it('correctly creates a provider instance', function () {
expect(firebase.appCheck().newReactNativeFirebaseAppCheckProvider()).toBeDefined();
});
});
});
5 changes: 5 additions & 0 deletions packages/app-check/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ export namespace FirebaseAppCheckTypes {
*
*/
export class Module extends FirebaseModule {
/**
* create a ReactNativeFirebaseAppCheckProvider option for use in react-native-firebase
*/
newReactNativeFirebaseAppCheckProvider(): ReactNativeFirebaseAppCheckProvider;

/**
* initialize the AppCheck module. Note that in react-native-firebase AppCheckOptions must always
* be an object with a `provider` member containing `ReactNativeFirebaseAppCheckProvider` that has returned successfully
Expand Down

0 comments on commit 9f5f231

Please sign in to comment.