Skip to content

Fix typing in AsyncStoreOptions #96

@Beramos

Description

@Beramos

https://github.com/square/svelte-store/blob/ccb97fce941344c510f2e80eedb523a477df6213/src/async-stores/types.ts#L37C1-L41C2

I think "true" should be "boolean", the following returns an error

  const {store: positionStore, state: positionState} = asyncReadable(
    {},
    async () => {
      const response = await fetch(URL_API + 'positions');
      const userObject = await response.json();
      console.log(userObject)
      return userObject;
    },
    { reloadable: false, trackState: true }
  );

Type 'false' is not assignable to type 'true'.ts(2322)
(property) reloadable?: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions