I recently studied ES6, and this led to the fact that I used Babylon a lot. Being a curious type, I started looking at the Babel Github repository to find out how they built this awesome tool, and I know if I can somehow contribute.
However, I came across this file and it says everything as declare class BabelNodeSourceLocation {} , and the file ends in .js.
This confused me a lot, and now I'm wondering if there is a declare keyword in JavaScript that I did not know about, or is it just syntax specific to Babel? All of my Google searches did not return anything.
Update: Entering the code in Babel REPL has failed. Babel simply ignored the code and did not give the equivalent output of ES5. It also did not cause errors.
javascript ecmascript-6 babeljs
Kizer
source share