Open TysonAndre opened 3 years ago
A switch to typescript may make sense in a major version
index.d.ts may get out of sync with the implementation. It may be easier to write everything in typescript and add a publish hook to convert code to typescript (https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-dynamodb/package.json https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-dynamodb/tsconfig.json)
(the publish hook would trigger a typescript build to dist/ or a subdirectory)
Alternately, with --checkJs, jsdoc can be type checked in CI
Also, class syntax can be used in node 6+ - the upstream code was supporting node 4+ and declared function Client instead of class Client https://github.com/parse-community/node-apn/blob/master/lib/client.js
function Client
class Client
What are the maintainer's thoughts on those ideas? Would you accept PRs?
Yes. I think that it makes sense and I'd be glad to review a PR.
Added a bounty so hopefully someone will pick this up.
A switch to typescript may make sense in a major version
index.d.ts may get out of sync with the implementation. It may be easier to write everything in typescript and add a publish hook to convert code to typescript (https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-dynamodb/package.json https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-dynamodb/tsconfig.json)
(the publish hook would trigger a typescript build to dist/ or a subdirectory)
Alternately, with --checkJs, jsdoc can be type checked in CI
Also, class syntax can be used in node 6+ - the upstream code was supporting node 4+ and declared
function Client
instead ofclass Client
https://github.com/parse-community/node-apn/blob/master/lib/client.jsWhat are the maintainer's thoughts on those ideas? Would you accept PRs?