title: Input of object in template gives error "Property is used before its initialization" in Angular 10
body: <p>I have a class:</p>
  <pre><code>import * as p5 from 'p5';
  
  export class Snake{
      constructor() { }
  
      sketch = (p: p5) =&gt; {
          p.setup = () =&gt; {
            ...
          }
      }
  }
  </code></pre>
  <p>I create its instance in app.component like this:</p>
  <pre><code>import { Component } from '@angular/core';
  import { Snake } from './snake';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    snake = new Snake();
  }
  </code></pre>
  <p>Then I input this instance via template of app.component into my component:</p>
  <pre><code>&lt;game [snake]=snake &gt;&lt;/game&gt;
  </code></pre>
  <p>In component I try to use it like this:</p>
  <pre><code>import { Component, OnInit, Input } from '@angular/core';
  import { Snake } from '../snake';
  
  @Component({
    selector: 'game',
    templateUrl: './game.component.html',
    styleUrls: ['./game.component.css']
  })
  export class GameComponent implements OnInit {
    
    @Input()
    public snake: Snake;
  
    constructor() { }
  
    sketch = new p5(this.snake.sketch); // ERROR HERE
  
    ngOnInit(): void { }
  }
  </code></pre>
  <p>And I get an error <code>Property 'snake' is used before its initialization.</code>
  Any ideas on how to make it work?</p>