Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODEJS-680: Update and Automate TypeScript Support - 1. config and auth #431

Open
wants to merge 5 commits into
base: typescript
Choose a base branch
from

Conversation

SiyaoIsTraveling
Copy link

I created tsconfig.json so that If you run tsc command, it will generate type declaration files .d.ts and source map files .d.ts.map in the folder dist/lib/. Therefore, our package.json needs to point main to lib/index.js and types to dist/lib/index.d.ts.

I also transformed the files in auth folder to clear most of the typescript errors. It mostly involves refactoring es5 classes to es6 classes.

I tested this config with GitHub private npm registry. I published the package privately and tested with a typescript client project. I confirm the type hints and IDE support is working fine for me.

To consider in the future:

  1. License headers?
  2. Bundling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants