I am trying to define the data type for query selector in typescript, But I do not know how to define it. I have defined any. But any is not a good way. So, How to define the data type for query selector.
test.ts:
public getMatch:any;
public readyCont:any;
this.getMatch = document.querySelector("#exampleId");
this.readyCont = this.getMatch.shadowRoot.querySelector("#matchId");
getMatchis of typeElementwhen I hover it. You can writepublic getMatch:Element;Elementwithin the document that matches the specified selector, or group of selectors. So you can declaregetMatchtype:public getMatch: Element