At the risk of being downvoted into oblivion, why?
You'd be jumping through so many hoops to set up a build pipeline for transpiling Typescript into C++, let alone writing a BSP library in Typescript to interact with the Arduino SoC. ( Which is vaguely interesting, I'd still call it a fool's errand though. )
You'd surely be much better off investing the same amount of time and effort becoming proficient in writing C for the target platform.
You'd be jumping through so many hoops to set up a build pipeline for transpiling Typescript into C++, let alone writing a BSP library in Typescript to interact with the Arduino SoC. ( Which is vaguely interesting, I'd still call it a fool's errand though. ) You'd surely be much better off investing the same amount of time and effort becoming proficient in writing C for the target platform.