This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
update to InitOptions type definitions and related API docs #2647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes no changes to code, only type definitions and documentation.
Description
It seems the type definitions for
InitOptions
intypes/index.d.ts
have gotten a little out of sync with 2.x code changes. This PR updates the type definitions and inline comments forInitOptions
to match the current API docs, specifically:android.senderID
: removed from type definitionandroid.clearBadge
: added to type definitionandroid.messageKey
: added to type definitionandroid.titleKey
: added to type definitionbrowser
: added to type definitionbrowser.pushServiceURL
: added to type definitionbrowser.applicationServerKey
: added to type definitionios.senderID
: removed from type definitionios.voip
: added to type definitionios.fcmSandbox
: updated inline comments to match API docs (old comments referenced GCM and obsoleteios.senderID
field)This PR also makes some minor changes to the API docs for formatting consistency, plus a typo fix.
Motivation and Context
Without the type definition changes, TypeScript IDEs will flag errors on perfectly valid options passed to
PushNotification.init()
.Types of changes
Checklist:
accordingly.