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-migrateto perform the migrationThis is a first pass migration where all the files were changed from using a
.jsextensionto using a.tsextension with the exception ofindex.js(which is a noop entry file).I opted to use the
reignoreoption ints-migratein 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.jsonfile 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.jsonis the same one as that found innetlify-plugin-gatsby, butjestwas added to thetypesproperty in order to ensure that the types associated with Jest are correctly picked up by the Typescript compiler.Misc. changes
ts-expect-errorstatements that were added byts-migratepackage.jsonTesting plan
netlify-plugin-gatsbyand able to run demo Gatsby project in that project successfully