JSPM

apns-types

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q54078F
  • License Apache-2.0

Type definitions for APNS (Apple Push Notification Service)

Package Exports

  • apns-types
  • apns-types/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (apns-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

apns-types

Type definitions for APNS (Apple Push Notification Service)

Description

This is a zero dependency module with only type definitions for APNS dictionaries.

If you only need the types for your APIs or similar and don't want to add a dependency to the APNS client implementation found in node-apn, this module is for you!

References:

Installation

npm install apns-types

or

yarn add apns-types

Example usage

import {Aps} from 'apns-types';

interface MyAppPushNotification {
  myCustomField: string;
  someOtherField?: string;
  aps: Aps;
}

const n: MyAppPushNotification = {
  myCustomField: 'Hello, world!',
  aps: {
    alert: {
      title: 'Title',
      body: 'Body'
    },
    'thread-id': '42',
    sound: 'default'
  }
};