I wanted to write code in typesript to capture image from web page
Like all browser have option in inspect element -> select element -> right click -> capture note screenshot
As show in screenshot: 
Code in typesript which will accept page url and capture the image.