Thanks for calling that out, I edited the post and added the rationale:
Cool, time to actually write some TypeScript. TypeScript will only allow TypeScript features in files with .ts or .tsx extensions; if we try to add typings to a .js file, TypeScript won’t run any of its typing logic and will throw all sorts of syntax errors (recall that allowJs tells the compiler to essentially pass-through JavaScript, it does not enforce any new logic). We begin by renaming our User file: