Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing in AsyncStoreOptions #96

Open
Beramos opened this issue Mar 21, 2024 · 1 comment
Open

Fix typing in AsyncStoreOptions #96

Beramos opened this issue Mar 21, 2024 · 1 comment

Comments

@Beramos
Copy link

Beramos commented Mar 21, 2024

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

@Beramos
Copy link
Author

Beramos commented Mar 21, 2024

I'm happy to contribute here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant