-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Report
- I have searched existing issues and this is not a duplicate.
Environment
- Platforms: N/A (Development issue)
- Android version: -
- iOS version: -
Issues and Steps to Reproduce
In a TypeScript RN project, use this code
NotificationHub.registerTemplate({
connectionString: "",
hubName: "",
senderID: "",
template: "",
templateName: "",
tags: []
});
Expected Behavior
Describe what you expected would happen.
The above mentioned code should not trigger a TS error
Actual Behavior
Describe what actually happened. Include screenshots, if applicable.
A TS error is given
Argument of type '{ connectionString: string; hubName: string; senderID: string; template: string; templateName: string; }' is not assignable to parameter of type 'TemplateRegistrationConfig'.
Type '{ connectionString: string; hubName: string; senderID: string; template: string; templateName: string; }' is missing the following properties from type 'TemplateRegistrationConfig': channelName, channelImportance, channelShowBadge, channelEnableLights, channelEnableVibrationts(2345)
Here: https://github.com/CatalystCode/react-native-azurenotificationhub/blob/master/docs/android-installation.md it mentions that all these missing properties are optional. But the typing doesn't declare them as optional.
Link to Code
If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.