parse-community / node-apn

Apple Push Notification module for Node.js
Other
177 stars 64 forks source link

Typescript type check failed when passing proxy info to ProviderOptions. #46

Closed ChopperLee2011 closed 3 years ago

ChopperLee2011 commented 3 years ago

I am following the doc to provide the proxy option when creating the APN provider, and I am using Typescript. code sample: https://www.npmjs.com/package/@parse/node-apn#connecting-through-an-http-proxy but the TS compiler return an error when checking the types

error TS2345: Argument of type '{ token: { key: any; keyId: any; teamId: any; }; proxy: { host: any; port: number; }; production: false; }' is not assignable to parameter of type 'ProviderOptions'.
  Object literal may only specify known properties, and 'proxy' does not exist in type 'ProviderOptions'.

I checked the index.d.ts, and find the proxy option is missing.

ChopperLee2011 commented 3 years ago

seems this lib doesn't support the proxy option yet.