Skip to content
This repository was archived by the owner on Sep 11, 2022. It is now read-only.

Conversation

@DUHsoALEX
Copy link
Collaborator

No description provided.


export interface BackendInterface {
getFilters: () => Promise<FilterMetadata[]>,
getFilter: (filterId: string) => Promise<{ filterDetails: Filter, filterMetadata: FilterMetadata }> | Error,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Error should be wrapped in Promise<>, as it's returned in the promise

Comment on lines +14 to +18
createFilter: (filter: Filter, filterMetadata: FilterMetadata) => void,
updateFilter: (filter: Filter, filterMetadata: FilterMetadata) => void,
archiveFilter: (filterId: string) => void,
enableFilter: (filterId: string) => void,
disableFilter: (filterId: string) => void,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should all ideally return promises (=> Promise<void>), though it's fine to keep it as this for now. For example, we'd want to know if enabling a filter is successful or not

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants