update heart bindings for new TypeScript version
separate heart.js definitions into separate file