chore: move index.js
into src
and TS-ify
#6049
Merged
index.js
into src
and TS-ify
#6049