Typescript improvements
- Fix type errors in the three main script files
- Using @ts-expect-error where more work needs to be done in the near future. Once we get proper types set up for those scenarios an error will pop up again to prompt us to remove the now-unnecessary @ts-expect-error directive.
- Move compiled output to
distand ignore that folder