This PR converts the simplest files within our application to TS.
How I did it
Renaming files from .js -> .ts
Building out an interface for a User and Context are probably the most interesting parts of this PR.
Throw an AuthenticationError if user is null when building Context, which is a bit of new logic but is exactly as what the Authed Model classes do shortly afterwards within the Context build code.
Update tests to run against built project. This requires that the project is built before running tests (obviously), which seems non-ideal but I'm not sure of a better way (I'm a tape novice)
How you can test it
Deploying to staging and verifying that the application functions on the most basic level may be generally sufficient. Almost no logic code has changed.
Relates to #187
[!NOTE]
This PR builds off of the work done in #188. As such, #188 should be merged before this PR and this PR's target should be update to main before merging.
What I'm changing
This PR converts the simplest files within our application to TS.
How I did it
.js
->.ts
User
andContext
are probably the most interesting parts of this PR.AuthenticationError
if user isnull
when buildingContext
, which is a bit of new logic but is exactly as what the Authed Model classes do shortly afterwards within theContext
build code.How you can test it
Deploying to staging and verifying that the application functions on the most basic level may be generally sufficient. Almost no logic code has changed.
Relates to #187