Skip to content

Commit

Permalink
Address TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Jun 27, 2024
1 parent 31669d2 commit 4362c2e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ interface ExecutionParams {
i18nStart: I18nStart;
}

type GetCsvActionApi = HasType & PublishesSavedSearch & CanAccessViewMode & HasTimeRange; // TODO: Fix this?
type GetCsvActionApi = HasType & PublishesSavedSearch & CanAccessViewMode & HasTimeRange;

const compatibilityCheck = (api: EmbeddableApiContext['embeddable']): api is GetCsvActionApi => {
return (
apiHasType(api) &&
apiIsOfType(api, SEARCH_EMBEDDABLE_TYPE) &&
apiPublishesSavedSearch(api) &&
apiCanAccessViewMode(api)
apiCanAccessViewMode(api) &&
Boolean((api as unknown as HasTimeRange).hasTimeRange)
);
};

Expand Down

0 comments on commit 4362c2e

Please sign in to comment.