Skip to content

Commit 541cc37

Browse files
author
Hugo Marcellin
committed
Tweak typing
1 parent 5ff6d7f commit 541cc37

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/components/dialogs/create-study-dialog/importParametersSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const ImportParametersSection: FunctionComponent = () => {
2727

2828
const handleParamsChange = (
2929
paramName: string,
30-
value: string | string[] | boolean,
30+
value: unknown,
3131
isEdit: boolean
3232
): void => {
3333
if (!isEdit) {

src/components/search/search-bar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
useSnackMessage,
2222
fetchDirectoryContent,
2323
ElementAttributes,
24+
ElementType,
2425
} from '@gridsuite/commons-ui';
2526
import { Search } from '@mui/icons-material';
2627
import { useDispatch, useSelector } from 'react-redux';
@@ -36,7 +37,7 @@ export const SEARCH_FETCH_TIMEOUT_MILLIS = 1000; // 1 second
3637
interface matchingElementProps {
3738
id: string;
3839
name: string;
39-
type: string;
40+
type: ElementType;
4041
pathName: string[];
4142
pathUuid: string[];
4243
}

src/components/search/search-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* License, v. 2.0. If a copy of the MPL was not distributed with this
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
7-
import { getFileIcon } from '@gridsuite/commons-ui';
7+
import { ElementType, getFileIcon } from '@gridsuite/commons-ui';
88
import Grid from '@mui/material/Grid';
99
import Typography from '@mui/material/Typography';
1010
import { FormattedMessage } from 'react-intl';
@@ -44,7 +44,7 @@ interface SearchItemProps {
4444
interface matchingElementProps {
4545
id: string;
4646
name: string;
47-
type: string;
47+
type: ElementType;
4848
pathName: string[];
4949
pathUuid: string[];
5050
}

0 commit comments

Comments
 (0)