Well typed headers for javascript