chore: convert repository to Typescript #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #106
Changes made
Used
ts-migrate
to perform the migrationThis is a first pass migration where all the files were changed from using a
.js
extensionto using a.ts
extension with the exception ofindex.js
(which is a noop entry file).I opted to use the
reignore
option ints-migrate
in order to have the project be in a compilable state so that we can add types in over time rather than needing to introduce them all within this pull request.Introduced a
tsconfig.json
file in the root directory and in the__tests__
directory.The one in the
__tests__
directory extends from the one in the root directory, but is set to not emit JS files.The configuration of the root directory
tsconfig.json
is the same one as that found innetlify-plugin-gatsby
, butjest
was added to thetypes
property in order to ensure that the types associated with Jest are correctly picked up by the Typescript compiler.Misc. changes
ts-expect-error
statements that were added byts-migrate
package.json
Testing plan
netlify-plugin-gatsby
and able to run demo Gatsby project in that project successfully