title: Typescript - Property 'userId' does not exist on type 'unknown'
body: <p>I have the following simple code for practicing rxJS in Typescript.</p>
  
  <pre><code>import fetch from 'node-fetch';
  import {
      Observable, Subject, asapScheduler, pipe, of, from,
      interval, merge, fromEvent, SubscriptionLike, PartialObserver
  } from 'rxjs';
  import { map, filter, scan } from 'rxjs/operators';
  
  function getUserId() {
      return from&lt;Promise&lt;{userId: number}&gt;&gt;(
          fetch('https://jsonplaceholder.typicode.com/posts/1').then(r =&gt; r.json())
      )
      .pipe(map(v =&gt; v.userId))
      .subscribe(console.log);
  }
  
  getUserId();
  </code></pre>
  
  <p>Why does the command prompt throws an error?</p>
  
  <pre><code>C:\Users\Administrator\Downloads\typescript&gt;ts-node from.ts
  
  C:\Users\Administrator\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:423
  
      return new TSError(diagnosticText, diagnosticCodes)
             ^
  TSError: ⨯ Unable to compile TypeScript:
  from.ts:12:22 - error TS2339: Property 'userId' does not exist on type 'unknown'
  .
  
  12     .pipe(map(v =&gt; v.userId))
                          ~~~~~~
  ...
  </code></pre>
  
  <p>i thought the code should work because the userId is already defined in <code>return from&lt;Promise&lt;{userId: number}&gt;&gt;{...</code></p>
  
  <p>VScode also gives me the error message related with the <strong><em>userId</em></strong>
  <code>Property 'userId' does not exist on type 'unknown'.ts(2339)</code></p>