title: Svelte store typescript Missing return type on function
body: <p>I need to set up a very simple
  store but I'm stuck with this error</p>
  <blockquote>
  <p>Missing return type on function</p>
  </blockquote>
  <pre><code>export interface DataState {
      error: string | null;
      loaded: boolean;
      data: GetIssuesQuery | undefined;
  }
  const initialState: DataState = {
      error: null,
      loaded: false,
      data: undefined
  };
  const store = writable&lt;DataState&gt;(initialState);
  
  const dataStore = {
      subscribe: store.subscribe,
      success: (data: GetIssuesQuery) =&gt; {
          store.update((state) =&gt; {
              return {
                  ...state,
                  loaded: true,
                  data
              };
          });
      },
      failure: (error:string) =&gt; {
          store.update(() =&gt; {
              return {
                  error,
                  loaded: false,
                  data: undefined
              };
          });
      }
  };
  </code></pre>
  <p>The error is triggered by:
  success: (data: GetIssuesQuery)</p>