title: Angular Ivy type check: Type 'SafeHtml' is not assignable to type 'string'
body: <p>I am getting <strong>Typescript error</strong> after switching to <em>Ivy compiler</em>:</p>
  
  <pre class="lang-sh prettyprint-override"><code>[Step 4/5] src/app/app.component.html(1,26): Type 'SafeHtml' is not assignable to type 'string'.
  </code></pre>
  
  <p>In Angular class there is a member property declared as <code>SafeHtml</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>@Component({
    selector: 'app',
    template: `&lt;div [innerHTML]="description"&gt;&lt;/div&gt;`
  })
  export class AppComponent {
    description: SafeHtml;
  
    constructor(private sanitizer: DomSanitizer) {}
  
    ngOnInit(): void {
      this.description = this.sanitizer.sanitize(SecurityContext.HTML, '&lt;strong&gt;whatever comes from server&lt;/strong&gt;');
    }
  }
  </code></pre>
  
  <p>My question is how to convert <code>SafeHtml</code> and <code>SafeUrl</code> to string? Is it just <code>.toString()</code> OK?</p>
  
  <p>Angulars <code>SafeHtml</code> is declared as: </p>
  
  <pre class="lang-js prettyprint-override"><code>/**
   * Marker interface for a value that's safe to use as HTML.
   *
   * @publicApi
   */
  export declare interface SafeHtml extends SafeValue {
  }
  </code></pre>
  
  <p>And [innerHtml] defined in lib.dom.d.ts:</p>
  
  <pre class="lang-js prettyprint-override"><code>interface InnerHTML {
      innerHTML: string;
  }
  </code></pre>
  
  <p>The <code>innerHtml</code> is type of <code>string</code>, whereas I have <code>SafeHtml</code>.</p>
  
  <p>How to reproduce:</p>
  
  <pre class="lang-sh prettyprint-override"><code>git clone https://github.com/felikf/angular-repro-safe-html.git
  npm i
  npm run build
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/A19Nh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A19Nh.png" alt="enter image description here"></a></p>