Question: property 'style' does not exist on type 'string'?
Answer: error RS2339: Property style does not exist on type Element In case you are interested to change the style of an element on the fly/dynamically using typescript. The simplest way is to get hold of the element using querySelector and handle it. let myElement = document. ... let myElement = <HTMLElement[]><any>document.