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

[FX] implement service interfaces that prevent "execute" abstractions #3

Open
ngfelixl opened this issue Mar 3, 2022 · 0 comments
Open

Comments

@ngfelixl
Copy link
Member

ngfelixl commented Mar 3, 2022

Idea:

Any abstraction must be learned. Therefore the goal should be to implement as few abstractions as possible. One idea to prevent the "execute" function abstraction could be to define interfaces which make the services compatible with the FX pipe conventions. This maybe can be in the form of a Service type

@Injectable()
export class MyService implements FxService {}

or by defining each of the functions individually

@Injectable()
export class MyService {
  loadEntities<A, T>(): FxOutput<T> {
    // this.http....
  }
}
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