Property ‘style’ does not exist on type ‘element‘

Property ‘style’ does not exist on type ‘element’ property does not exist on type ‘element’
Reason: This is caused by TypeScript type checking, which requires a type assertion in front of the querySelector method.

let frameContainObj = document.getElementById("model_view_container")
let iframeObj= <HTMLElement>frameContainObj.querySelector("#modelView");
iframeObj.style.height = document.documentElement.clientHeight* 0.65 + "px";

Extensions: When using QuerySelectorAll, the following scenario can be used:

let block = document.querySelectorAll(".block") as NodeListOf<HTMLElement>;

Tells the TypeScript compiler to pass this code by setting assertions

Read More: