mirror of
https://github.com/apache/superset.git
synced 2026-05-12 03:15:55 +00:00
feat(fe): upgrade superset-frontend to Typescript v5 (#31979)
Signed-off-by: hainenber <dotronghai96@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
@@ -26,8 +26,14 @@ import { StyledIcon } from 'src/views/CRUD/utils';
|
||||
import Modal from 'src/components/Modal';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
|
||||
import { OnlyKeyWithType } from 'src/utils/types';
|
||||
import { AnnotationLayerObject } from './types';
|
||||
|
||||
type AnnotationLayerObjectStringKeys = keyof Pick<
|
||||
AnnotationLayerObject,
|
||||
OnlyKeyWithType<AnnotationLayerObject, string>
|
||||
>;
|
||||
|
||||
interface AnnotationLayerModalProps {
|
||||
addDangerToast: (msg: string) => void;
|
||||
addSuccessToast: (msg: string) => void;
|
||||
@@ -167,7 +173,7 @@ const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
|
||||
descr: currentLayer ? currentLayer.descr : '',
|
||||
};
|
||||
|
||||
data[target.name] = target.value;
|
||||
data[target.name as AnnotationLayerObjectStringKeys] = target.value;
|
||||
setCurrentLayer(data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user