Skip to content

Commit e087607

Browse files
committed
types name adjustments
1 parent 7f52f4c commit e087607

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

x-pack/plugins/ml/public/application/explorer/explorer_dashboard_service.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import type { MlFieldFormatService } from '../services/field_format_service';
2323
import type { MlJobService } from '../services/job_service';
2424
import type { ExplorerJob } from './explorer_utils';
2525

26-
type ExplorerActionType = (typeof EXPLORER_ACTION)[keyof typeof EXPLORER_ACTION];
26+
type ExplorerAction = (typeof EXPLORER_ACTION)[keyof typeof EXPLORER_ACTION];
2727

2828
export interface ExplorerActionPayloads {
2929
[EXPLORER_ACTION.SET_EXPLORER_DATA]: DeepPartial<ExplorerState>;
@@ -35,24 +35,24 @@ export interface ExplorerActionPayloads {
3535
}
3636

3737
export type ExplorerActions = {
38-
[K in ExplorerActionType]: K extends keyof ExplorerActionPayloads
38+
[K in ExplorerAction]: K extends keyof ExplorerActionPayloads
3939
? {
4040
type: K;
4141
payload: ExplorerActionPayloads[K];
4242
}
4343
: {
4444
type: K;
4545
};
46-
}[ExplorerActionType];
46+
}[ExplorerAction];
4747

48-
type ExplorerAction = ExplorerActions | Observable<ExplorerActions | null>;
48+
type ExplorerActionMaybeObservable = ExplorerActions | Observable<ExplorerActions | null>;
4949

50-
export const explorerAction$ = new Subject<ExplorerAction>();
50+
export const explorerAction$ = new Subject<ExplorerActionMaybeObservable>();
5151

5252
const explorerFilteredAction$ = explorerAction$.pipe(
5353
// consider observables as side-effects
54-
flatMap((action: ExplorerAction) =>
55-
isObservable(action) ? action : (from([action]) as Observable<ExplorerAction>)
54+
flatMap((action: ExplorerActionMaybeObservable) =>
55+
isObservable(action) ? action : (from([action]) as Observable<ExplorerActionMaybeObservable>)
5656
),
5757
distinctUntilChanged(isEqual)
5858
);

0 commit comments

Comments
 (0)