Closed johnmccollum closed 2 years ago
Adding the do not merge
label for now until #4 has been merged. (As we rely on Webpack config in this branch)
But given it's such a small change, I'll look into it.
Took a little more effort than I thought 🙈
Added a script that
Had a play about with things and I can happily vouch for the following:
convert-ts
command does what we'd expect ( of course the real magic would be if we could convert them back at will also)Sadly as things stand, the tests don't run if you use a type in the src
files. This would be enough to block the whole endeavour for me, as ideally we'd like to see candidates testing. Unless there's some Jest config shenanigans we can pull out the bag, @johnmccollum?
I think I need to spend a bit more time looking at the testing side. Thanks for giving it a test drive @futuresocks and @jordandavidson1990!
In lieu of me having write-access to this repo, @johnmccollum 👀
The test issue should be fixable by installing @babel/preset-typescript
and adding it to babel.config.json
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}
I've tried this locally and it means I can use custom types and interfaces from the types
folder in files without Jest getting upset.
Sorry about that, @futuresocks. You should have push access now, would you like to try again?
Sorry about that, @futuresocks. You should have push access now, would you like to try again?
Not sure I can approve this now I'm involved up to my neck. But if you're reading this I reckon it works great
This PR adds TS support so that candidates can choose the language that best suits them. It will also allow us to use this repo as an internal training tool to upskill devs on TS!