A JS file can still point to a TS file, so we need to expand the roots in the checkJs case too. Fixes: #15163