How to get or access the properties and methods of figure HTML element tag without errors in TypeScript?