Convert distribution to JS + declaration files

Story

"As a consumer of Providence, I want to be shielded from TypeScript type inference changes that aren't in my code so that compilation doesn't fail when I upgrade TypeScript in my own project."

Full description

Currently, Providence ships with the original TypeScript files as its distribution. This is great since you can look at the original source code!

...But there is a reason why other libraries don't do this: Type inference and checking rules can vary by TypeScript version, so if there's a discrepency between how Providence's last version of TypeScript analyzed its code and your local version, your code will fail to compile because of code that you don't control.

Most other libraries, instead, ship the compiled JS files alongside .d.ts files. Since the .d.ts files only document the types of interfaces, they can remain far more stable for consuming projects.

Completion criteria

  • The build commands are revised to publish .js and .d.ts files, and not .ts files.

Stretch goals:

  • Upgrade our internal TypeScript version to the latest one
  • Address the comment in the code that references this issue so that it passes type checking if possible.

Documentation updates & improvements criteria

  • Visit any existing documentation on the build, and update it as needed.
Edited by Fox Danger Piacenti