Rename root file from `js` to `ts`, improve platform splitting (#11012)


Author Samuel Newman Committer GitHub Date Commit Parent 52aaba40