title: RTK Query createApi results in: "Property '....' does not exist on type 'Api<BaseQueryFn>"
body: <p>The following code uses RTK query to create a Redux Hook:</p>
  <pre><code>export const specialtiesApi = createApi({
      reducerPath: 'specialtiesApi',
      baseQuery: fetchBaseQuery({ baseUrl: 'https://someplace.com/' }),
      endpoints: (builder) =&gt; ({
          getSpecialties: builder.query({
              query: (name) =&gt; `specialties`,
          }),
      }),
  });
  
  export const { useGetSpecialtiesQuery } = specialtiesApi;
  </code></pre>
  <p>The last line of code throws a Typescript compile-time error:</p>
  <pre><code>Property 'useGetSpecialtiesQuery' does not exist on type 'Api&lt;BaseQueryFn&lt;string | FetchArgs, unknown, FetchBaseQueryError, {}, FetchBaseQueryMeta&gt;, { getSpecialties: QueryDefinition&lt;...&gt;; }, &quot;specialtiesApi&quot;, never, unique symbol&gt;'
  </code></pre>
  <p>My code is adapted from <a href="https://redux-toolkit.js.org/rtk-query/usage-with-typescript" rel="noreferrer">https://redux-toolkit.js.org/rtk-query/usage-with-typescript</a> using Typescript 4.3.5.</p>
  <p>I can't see what's wrong with it. Any ideas?</p>