title: ngrx: how to pass parameters to selector inside createSelector method
body: <p>I have a very simple state in my store:</p>
  
  <pre><code>const state = {
   records: [1,2,3],
  };
  </code></pre>
  
  <p>I have a selector for records:</p>
  
  <pre><code>export const getRecords = createSelector(getState, (state: State) =&gt; state.records));
  </code></pre>
  
  <p>And what I want now is to have separate selectors for fetching each record by index.
  For this purpose I want to create one generic selector with props in this way:</p>
  
  <pre><code>export const getRecordByIndex = createSelector(
  getRecords,
  (state: State, { index }) =&gt; state.records[index]),
  );
  </code></pre>
  
  <p>And after that create a couple of specific selectors e. g.:</p>
  
  <pre><code>export const getFirstRecord = createSelector(
  getRecordByIndex(/* somehow pass index = 0 to this selector */),
  (firstRecord) =&gt; firstRecord),
  );
  </code></pre>
  
  <p>But I didn't find any mention how to pass parameters to selectors with props when we use them inside createSelector method. Is it possible?</p>