If you need to read up on this subject I would suggest you read Your Favorites, Extended. It explains what externs are, how they work, etc.
And as a last warning I quote Phillippe Elsass:
But how do you write externs for complex libraries if they doesn't exist already? Sadly the answer is: with great courage, patience and a lot of free time... Although it is possible to fully automate the process, it is more often entirely manual. I won't recommend you to jump right away on creating externs for a big JS library out there, especially if you aren’t an experienced and motivated Haxe developer: creating and keeping up to date such definitions require dedication; there is nothing more frustrating that discovering out of date (or incorrect) ones.
I could explain it more, but I am not that motivated Haxe developer.
Read more about the subject and I wish you good luck:
Phillippe Elsass wrote an article about this subject. Its very good and explains what you can do with Haxe and external JS-libraries. He describes 3 methods and this document only describes number 3.