Paynow-NodeJS-SDK
Paynow-NodeJS-SDK copied to clipboard
Added Paynow Module support for projects built entirely in typescript
Your module couldn't be imported into a node project written in Typescript as you were not emitting type declarations during your build using tsc. So, I made the following changes to cater for programmers who would like to use your module whilst still writing their code in Typescript
- I set the declaration flag to true in your tsconfig.json file
- I set the declaration output directory to "dist/declarations" in your tsconfig.json file
- I then set the "types" key to "dist/declarations/index.d.ts" in package.json (so Typescript could find the types when your module is imported in a Typescript Project)
- I built the module and then tested it in a MyEAN Stack Web Application written entirely in Typescript and it worked like a charm
- I edited READMe.md to include a pointer on how to import your module in a typescript project. That is, I included the statement : import { Paynow } from "paynow";
NB: Now your module can now be imported in both Typescript projects and regular es6 projects