Skip to content
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

Merged

Conversation

zacronos
Copy link
Contributor

@zacronos zacronos commented Dec 9, 2018

This PR makes no changes to code, only type definitions and documentation.

Description

It seems the type definitions for InitOptions in types/index.d.ts have gotten a little out of sync with 2.x code changes. This PR updates the type definitions and inline comments for InitOptions to match the current API docs, specifically:

  • android.senderID: removed from type definition
  • android.clearBadge: added to type definition
  • android.messageKey: added to type definition
  • android.titleKey: added to type definition
  • browser: added to type definition
  • browser.pushServiceURL: added to type definition
  • browser.applicationServerKey: added to type definition
  • ios.senderID: removed from type definition
  • ios.voip: added to type definition
  • ios.fcmSandbox: updated inline comments to match API docs (old comments referenced GCM and obsolete ios.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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@fredgalvao fredgalvao merged commit e5370c4 into phonegap:master Dec 9, 2018
@fredgalvao
Copy link
Collaborator

That's awesome, thanks for helping keep it in sync!

@lock
Copy link

lock bot commented Jan 8, 2019

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants