firebase-functions
firebase-functions copied to clipboard
fix(params): exporting additional type information
Description
As per this doc, I've been using the defineSecret function. The return type SecretParam was not available for direct use.
import { SecretParam } from 'firebase-functions/params'; // fails
import { SecretParam } from 'firebase-functions/params/types.d'; // fails
This PR fixes it.
Code sample
With this PR we can do the following:
import { SecretParam } from 'firebase-functions/params'
Current solution without this PR:
type SecretParameter = ReturnType<typeof defineSecret>;
Was about to make the same PR. This would be really nice to have. Any chance this could be merged?
Closing this PR based on https://github.com/firebase/firebase-functions/issues/1549#issuecomment-2054135491