mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-24 23:18:12 +08:00
type makeContinousDimensionName callsite
This commit is contained in:
@@ -1,7 +1,24 @@
|
||||
import { makeContinuousDimensionName } from "../util/nameCreators";
|
||||
import { Action } from "redux";
|
||||
import type { RootState } from ".";
|
||||
import {
|
||||
ContinuousNamespace,
|
||||
makeContinuousDimensionName,
|
||||
} from "../util/nameCreators";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
|
||||
const ContinuousSelection = (state = {}, action: any) => {
|
||||
export interface ContinuousSelectionAction extends Action<string> {
|
||||
continuousNamespace: ContinuousNamespace;
|
||||
selection: string;
|
||||
range: [number, number];
|
||||
}
|
||||
|
||||
export interface ContinuousSelectionState {
|
||||
[name: string]: [number, number];
|
||||
}
|
||||
|
||||
const ContinuousSelection = (
|
||||
state: ContinuousSelectionState = {},
|
||||
action: ContinuousSelectionAction
|
||||
): RootState => {
|
||||
switch (action.type) {
|
||||
case "reset subset":
|
||||
case "subset to selection":
|
||||
@@ -25,7 +42,6 @@ const ContinuousSelection = (state = {}, action: any) => {
|
||||
action.continuousNamespace,
|
||||
action.selection
|
||||
);
|
||||
// @ts-expect-error ts-migrate(2537) FIXME: Type '{}' has no matching index signature for type... Remove this comment to see the full error message
|
||||
const { [name]: deletedField, ...newState } = state;
|
||||
return newState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user