File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,14 @@ import { config } from "../../src/v1/config";
2626
2727describe ( "config()" , ( ) => {
2828 it ( "throws an error with migration guidance" , ( ) => {
29- expect ( config ) . to . throw (
29+ expect ( ( ) => {
30+ // @ts -expect-error - config is deprecated and typed as never to cause a build error
31+ config ( ) ;
32+ } ) . to . throw (
3033 Error ,
3134 "functions.config() has been removed in firebase-functions v7. " +
3235 "Migrate to environment parameters using the params module. " +
3336 "Migration guide: https://firebase.google.com/docs/functions/config-env#migrate-config"
3437 ) ;
3538 } ) ;
36- } ) ;
39+ } ) ;
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ export { firebaseConfig } from "../common/config";
2727 * Migrate to environment parameters using the `params` module immediately.
2828 * Migration guide: https://firebase.google.com/docs/functions/config-env#migrate-config
2929 */
30- export function config ( ) : Record < string , any > {
30+ export const config : never = ( ( ) = > {
3131 throw new Error (
3232 "functions.config() has been removed in firebase-functions v7. " +
3333 "Migrate to environment parameters using the params module. " +
3434 "Migration guide: https://firebase.google.com/docs/functions/config-env#migrate-config"
3535 ) ;
36- }
36+ } ) as never ;
You can’t perform that action at this time.
0 commit comments