Add functionality to object like Jquery plugin to support with TypeScript