diff --git a/docs/dev-guide/Adding_Components.md b/docs/dev-guide/Adding_Components.md index e94f430..cf498e6 100644 --- a/docs/dev-guide/Adding_Components.md +++ b/docs/dev-guide/Adding_Components.md @@ -119,7 +119,7 @@ interface ImageComponentProps { parentPath: string; readOnly: boolean; docString: string; - addNotification: (string) => void; + addNotification: (message: string) => void; // Define your component specific props here value: string; format: string; diff --git a/frontend/src/components/AsyncMethodComponent.tsx b/frontend/src/components/AsyncMethodComponent.tsx index 4b84216..c0ea50b 100644 --- a/frontend/src/components/AsyncMethodComponent.tsx +++ b/frontend/src/components/AsyncMethodComponent.tsx @@ -10,7 +10,7 @@ interface AsyncMethodProps { value: Record; docString?: string; hideOutput?: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => { diff --git a/frontend/src/components/ButtonComponent.tsx b/frontend/src/components/ButtonComponent.tsx index 469d1ef..468c7de 100644 --- a/frontend/src/components/ButtonComponent.tsx +++ b/frontend/src/components/ButtonComponent.tsx @@ -10,7 +10,7 @@ interface ButtonComponentProps { readOnly: boolean; docString: string; mapping?: [string, string]; // Enforce a tuple of two strings - addNotification: (string) => void; + addNotification: (message: string) => void; } export const ButtonComponent = React.memo((props: ButtonComponentProps) => { diff --git a/frontend/src/components/ColouredEnumComponent.tsx b/frontend/src/components/ColouredEnumComponent.tsx index 697da4f..c1d81e4 100644 --- a/frontend/src/components/ColouredEnumComponent.tsx +++ b/frontend/src/components/ColouredEnumComponent.tsx @@ -10,7 +10,7 @@ interface ColouredEnumComponentProps { docString?: string; readOnly: boolean; enumDict: Record; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentProps) => { diff --git a/frontend/src/components/DataServiceComponent.tsx b/frontend/src/components/DataServiceComponent.tsx index 6371dd3..7640cb1 100644 --- a/frontend/src/components/DataServiceComponent.tsx +++ b/frontend/src/components/DataServiceComponent.tsx @@ -8,7 +8,7 @@ type DataServiceProps = { props: DataServiceJSON; parentPath?: string; isInstantUpdate: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; }; export type DataServiceJSON = Record; diff --git a/frontend/src/components/EnumComponent.tsx b/frontend/src/components/EnumComponent.tsx index b44e13d..a173163 100644 --- a/frontend/src/components/EnumComponent.tsx +++ b/frontend/src/components/EnumComponent.tsx @@ -9,7 +9,7 @@ interface EnumComponentProps { value: string; docString?: string; enumDict: Record; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const EnumComponent = React.memo((props: EnumComponentProps) => { diff --git a/frontend/src/components/GenericComponent.tsx b/frontend/src/components/GenericComponent.tsx index 4958c59..d7e4f9a 100644 --- a/frontend/src/components/GenericComponent.tsx +++ b/frontend/src/components/GenericComponent.tsx @@ -40,7 +40,7 @@ type GenericComponentProps = { name: string; parentPath: string; isInstantUpdate: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; }; export const GenericComponent = React.memo( diff --git a/frontend/src/components/ImageComponent.tsx b/frontend/src/components/ImageComponent.tsx index 166f634..86b2256 100644 --- a/frontend/src/components/ImageComponent.tsx +++ b/frontend/src/components/ImageComponent.tsx @@ -10,7 +10,7 @@ interface ImageComponentProps { readOnly: boolean; docString: string; format: string; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const ImageComponent = React.memo((props: ImageComponentProps) => { diff --git a/frontend/src/components/ListComponent.tsx b/frontend/src/components/ListComponent.tsx index 6c35ca2..1ff670c 100644 --- a/frontend/src/components/ListComponent.tsx +++ b/frontend/src/components/ListComponent.tsx @@ -8,7 +8,7 @@ interface ListComponentProps { value: Attribute[]; docString: string; isInstantUpdate: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const ListComponent = React.memo((props: ListComponentProps) => { diff --git a/frontend/src/components/MethodComponent.tsx b/frontend/src/components/MethodComponent.tsx index 96646c0..be0f67f 100644 --- a/frontend/src/components/MethodComponent.tsx +++ b/frontend/src/components/MethodComponent.tsx @@ -9,7 +9,7 @@ interface MethodProps { parameters: Record; docString?: string; hideOutput?: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const MethodComponent = React.memo((props: MethodProps) => { diff --git a/frontend/src/components/NumberComponent.tsx b/frontend/src/components/NumberComponent.tsx index d89c63e..4a3a10b 100644 --- a/frontend/src/components/NumberComponent.tsx +++ b/frontend/src/components/NumberComponent.tsx @@ -22,7 +22,7 @@ interface NumberComponentProps { value: number, callback?: (ack: unknown) => void ) => void; - addNotification: (string) => void; + addNotification: (message: string) => void; } // TODO: highlight the digit that is being changed by setting both selectionStart and diff --git a/frontend/src/components/SliderComponent.tsx b/frontend/src/components/SliderComponent.tsx index eb7be12..2f3d8f5 100644 --- a/frontend/src/components/SliderComponent.tsx +++ b/frontend/src/components/SliderComponent.tsx @@ -15,7 +15,7 @@ interface SliderComponentProps { docString: string; stepSize: number; isInstantUpdate: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const SliderComponent = React.memo((props: SliderComponentProps) => { diff --git a/frontend/src/components/StringComponent.tsx b/frontend/src/components/StringComponent.tsx index ff17d88..46f5f11 100644 --- a/frontend/src/components/StringComponent.tsx +++ b/frontend/src/components/StringComponent.tsx @@ -13,7 +13,7 @@ interface StringComponentProps { readOnly: boolean; docString: string; isInstantUpdate: boolean; - addNotification: (string) => void; + addNotification: (message: string) => void; } export const StringComponent = React.memo((props: StringComponentProps) => {