-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messaging interface BaseMessage is no longer exported #1184
Comments
I found a few problems with this issue:
|
Hi @rubenvereecken! Thank you for reporting this issue. @hiranya911 should we export |
firebase-admin-node/src/index.d.ts Lines 392 to 398 in d0ccf8f
In more recent versions it is in the namespace, but is not exported: firebase-admin-node/src/messaging/index.ts Lines 52 to 59 in 6bcffa2
@rubenvereecken can you use the Also, can you please verify your SDK versions? We have never released a 7.2.1 or a 7.5.0. |
... I think I meant 9.2.1 and 9.5.0 as I seem to have 9.5.0 installed currently. My current solution to get this working consists of using |
You can probably do something like this: type MyBaseMessage = Partial<TokenMessage | MulticastMessage>
function addCommonFields(m: MyBaseMessage) {
}
const m = { };
addCommonFields(m);
const tm: TokenMessage = {...m, token: 'token'};
const mm: MulticastMessage = {...m, tokens: ['token']}; |
Actually, that's right, I'm very happy with that solution. Thanks @hiranya911! Happy to close it here. |
Glad to hear that @rubenvereecken. We can also revisit the issue of exposing |
I just upgraded to
7.5.0
coming from7.2.1
. I just noticed I could no longer import theBaseMessage
interface, which I use because I've got some functionality that is independent of the exact type of Message. It looks like the interface is no longer exported. Is this on purpose? I had a look at where this was taken out but I struggled navigating thegit blame
on Github.firebase-admin-node/src/messaging/index.ts
Line 52 in 01d8177
The text was updated successfully, but these errors were encountered: