title: Why this.store.select("uiState") return an empty object in ngrx/store (2.0+)
body: <p>I have this code in my effect/store: </p>
  
  <pre><code>  @Effect() newMessages$ = Observable.interval(5000)
          .withLatestFrom(this.store.select("uiState"))
          .map(([unreadMessages, uiState]) =&gt; new NewMessagesReceivedAction({
            unreadMessages,
            currentThreadId: uiState.currentThreadId,
            currentUserId: uiState.currentUserId
          }))
  </code></pre>
  
  <p>Webstorm warns me that: </p>
  
  <blockquote>
    <p>Property 'currentThreadId' does not exist on type '{}'.</p>
  </blockquote>
  
  <p>And here is my store file: </p>
  
  <pre><code>     export interface ApplicationState {
        uiState: UiState,
        storeData: StoreData
      }
  
      export const INITIAL_APPLICATION_STATE: ApplicationState = {
        uiState: INITIAL_UI_STATE,
        storeData: INITIAL_STORE_DATA
      }
  </code></pre>
  
  <p>And here is my uistate file: </p>
  
  <pre><code>    export interface UiState {
            userId: string;
            currentThreadId: string;
          }
  
          export const INITIAL_UI_STATE: UiState = {
            userId: undefined,
            currentThreadId: undefined
          }
  </code></pre>
  
  <p>Anyone know why? </p>
  
  <p>UPDATE: </p>
  
  <p>After @cartant suggestion I updated the code of the @Effect() as below, and I ran into another Webstorm Typescirpt error:</p>
  
  <pre><code>      @Effect() newMessages$ = Observable.interval(5000)
          .withLatestFrom(this.store.select&lt;UiState&gt;("uiState"))
          .map(([any,uiState]) =&gt; uiState)
          .filter(uiState =&gt; uiState.userId) //Error right here --- As I need to filter out the uiState.userId when there is no userId when the store initialized with undefined value. 
          .switchMap(uiState =&gt; this.threadsService.loadNewMessagesForUser(uiState.userId))
          .withLatestFrom(this.store.select&lt;UiState&gt;("uiState"))
          .map(([unreadMessages, uiState]) =&gt; new NewMessagesReceivedAction({
            unreadMessages,
            currentThreadId: uiState.currentThreadId,
            currentUserId: uiState.userId
          }))
  </code></pre>
  
  <blockquote>
    <p>Argument of type '(uiState: UiState) => string' is not assignable to parameter of type '(value: UiState, index: number) => boolean'. Type 'string' is not assignable to type 'boolean'.)</p>
  </blockquote>
  
  <p>I need a way to filter out the initial state or any empty userId situation to make sure I do not pass in undefined or null into Firebase call. </p>