Doing the following:
let doc = this.iframe.contentDocument || this.iframe.contentWindow;
let content = `...`
doc!.open();
doc!.write(content);
doc!.close();
However the Typescript linter says:
Property 'write' does not exist on type 'Document | Window'. Property 'write' does not exist on type 'Window'.ts(2339)
How do we fix that?
any.let doc = (this.iframe.contentDocument || this.iframe.contentWindow) as any;