title: Cannot find function name
body: <p>I'm trying to do my first TypeScript/React project and I'm running into issues.</p>
  
  <p>Using <a href="https://stackoverflow.com/a/27852403">this answer</a>, I have managed to read and play sound from my mic and also display some sample analysis data in the console. Now i'm trying to translate it into TS. Going step by step, I've arrived at this:</p>
  
  <pre><code>export class Processor {
      readonly BUFFER_SIZE = 16384;
  
      audioContext: AudioContext;
      gainNode: GainNode;
      microphoneStream: MediaElementAudioSourceNode;
  
      constructor() {
          this.audioContext = new AudioContext();
  
          console.log('audio is starting up ...');
  
          if (navigator.getUserMedia) {
              navigator.getUserMedia(
                  { audio: true },
                  function (stream) {
                      startMicrophone(stream);
                  },
                  function (e) {
                      alert('Error capturing audio.');
                  });
          } else {
              alert('Seems like this browser might not be supported.');
          }
      }
  
      private startMicrophone(stream: MediaStream) {
          this.gainNode = this.audioContext.createGain();
          this.gainNode.connect(this.audioContext.destination);
  
          this.microphoneStream = 
  this.audioContext.createMediaStreamSource(stream);
      }
  }
  </code></pre>
  
  <p>Except the call to startMicrophone gives me</p>
  
  <pre><code>'Cannot find name 'startMicrophone'.'
  </code></pre>
  
  <p>I also tried to refer to it with <code>this</code>, which results in a different error:</p>
  
  <pre><code>''this' implicitly has type 'any' because it does not have a type annotation.'
  </code></pre>
  
  <p>I don't know what I'm doing wrong and could really use a bit of guidance.</p>