It does have a compile time cost and that's not negligible... although with all the heavy transpilation going on these days, a bit of type checking might drown that out.
At a previous job we tried TypeScript but it took around 20 seconds to build our front end. Since then I hear speed has improved.