title: How to access properties of BehaviorSubject in Angular?
body: <p>I have created the below SubjectBahavior of rxjs.</p>
  <pre><code>private userData= new BehaviorSubject&lt;any&gt;({
      userId: 0
  });
  </code></pre>
  <p>Then I have a method checkValue where I check if userData was updated:</p>
  <pre><code>if(this.userData.userId == 0){
          ...
   }
  </code></pre>
  <p>I am getting this error:</p>
  <pre><code>Property 'userId' does not exist on type 'BehaviorSubject&lt;any&gt;'.
  </code></pre>
  <p>Is there a way to check the value of BehaviorSubject in typescript?</p>