Skip to content

Commit bfb9296

Browse files
russellwheatleymikehardy
authored andcommitted
fix(functions): expose HttpsErrorCode for modular API
1 parent 6a7867c commit bfb9296

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

packages/functions/__tests__/functions.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import functions, {
66
connectFunctionsEmulator,
77
httpsCallable,
88
httpsCallableFromUrl,
9+
HttpsErrorCode,
910
} from '../lib';
1011

1112
describe('Cloud Functions', function () {
@@ -79,5 +80,9 @@ describe('Cloud Functions', function () {
7980
it('`httpsCallableFromUrl` function is properly exposed to end user', function () {
8081
expect(httpsCallableFromUrl).toBeDefined();
8182
});
83+
84+
it('`HttpsErrorCode` function is properly exposed to end user', function () {
85+
expect(HttpsErrorCode).toBeDefined();
86+
});
8287
});
8388
});

packages/functions/lib/modular/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import FirebaseApp = ReactNativeFirebase.FirebaseApp;
55
import Functions = FirebaseFunctionsTypes.Module;
66
import HttpsCallable = FirebaseFunctionsTypes.HttpsCallable;
77
import HttpsCallableOptions = FirebaseFunctionsTypes.HttpsCallableOptions;
8+
import HttpsErrorCodeType = FirebaseFunctionsTypes.HttpsErrorCode;
9+
10+
export const HttpsErrorCode: HttpsErrorCodeType;
11+
812
/**
913
* Get a {@link Functions} instance for the given app.
1014
* @param {FirebaseApp | undefined} app - The FirebaseApp to use. Optional.

packages/functions/lib/modular/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,5 @@ export function httpsCallable(functionsInstance, name, options) {
7070
export function httpsCallableFromUrl(functionsInstance, url, options) {
7171
return functionsInstance.httpsCallableFromUrl(url, options);
7272
}
73+
74+
export { HttpsErrorCode } from '../index';

0 commit comments

Comments
 (0)