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

feat: abstract task logic to core #89

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

paoloricciuti
Copy link
Collaborator

A bit of spare time today...i moved all the logic for task into createTask inside a core.ts file and used an adapter pattern to communicate between the logic and the layer that build the integration with svelte stores.

This will make it much easier to switch to runes or go agnostic if we decide too.

I've used camelCase for this since we might endup exposing this function.

One thing that i don't properly like about this approach is that each adapter will need to add the handlers in it's module, i've tried abstracting that away but i got owned by TS.

I've also renamed the derived states to camelCase so if we merge this before the docs we can more easily work on adding the other derived states (which btw i think will need a bit of rework since the general loading state should be derived from all the loading of the instance).

@paoloricciuti paoloricciuti added the enhancement New feature or request label May 25, 2024
@paoloricciuti paoloricciuti merged commit fdaa699 into main May 31, 2024
4 checks passed
@paoloricciuti paoloricciuti deleted the abstract-task-to-core branch May 31, 2024 08:36
@github-actions github-actions bot mentioned this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants