frontend: updating addNotification type hints

This commit is contained in:
Mose Müller 2023-10-30 13:26:25 +01:00
parent 3d42366ada
commit 7dcec88c9a
13 changed files with 13 additions and 13 deletions

View File

@ -119,7 +119,7 @@ interface ImageComponentProps {
parentPath: string; parentPath: string;
readOnly: boolean; readOnly: boolean;
docString: string; docString: string;
addNotification: (string) => void; addNotification: (message: string) => void;
// Define your component specific props here // Define your component specific props here
value: string; value: string;
format: string; format: string;

View File

@ -10,7 +10,7 @@ interface AsyncMethodProps {
value: Record<string, string>; value: Record<string, string>;
docString?: string; docString?: string;
hideOutput?: boolean; hideOutput?: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => { export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {

View File

@ -10,7 +10,7 @@ interface ButtonComponentProps {
readOnly: boolean; readOnly: boolean;
docString: string; docString: string;
mapping?: [string, string]; // Enforce a tuple of two strings mapping?: [string, string]; // Enforce a tuple of two strings
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const ButtonComponent = React.memo((props: ButtonComponentProps) => { export const ButtonComponent = React.memo((props: ButtonComponentProps) => {

View File

@ -10,7 +10,7 @@ interface ColouredEnumComponentProps {
docString?: string; docString?: string;
readOnly: boolean; readOnly: boolean;
enumDict: Record<string, string>; enumDict: Record<string, string>;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentProps) => { export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentProps) => {

View File

@ -8,7 +8,7 @@ type DataServiceProps = {
props: DataServiceJSON; props: DataServiceJSON;
parentPath?: string; parentPath?: string;
isInstantUpdate: boolean; isInstantUpdate: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
}; };
export type DataServiceJSON = Record<string, Attribute>; export type DataServiceJSON = Record<string, Attribute>;

View File

@ -9,7 +9,7 @@ interface EnumComponentProps {
value: string; value: string;
docString?: string; docString?: string;
enumDict: Record<string, string>; enumDict: Record<string, string>;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const EnumComponent = React.memo((props: EnumComponentProps) => { export const EnumComponent = React.memo((props: EnumComponentProps) => {

View File

@ -40,7 +40,7 @@ type GenericComponentProps = {
name: string; name: string;
parentPath: string; parentPath: string;
isInstantUpdate: boolean; isInstantUpdate: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
}; };
export const GenericComponent = React.memo( export const GenericComponent = React.memo(

View File

@ -10,7 +10,7 @@ interface ImageComponentProps {
readOnly: boolean; readOnly: boolean;
docString: string; docString: string;
format: string; format: string;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const ImageComponent = React.memo((props: ImageComponentProps) => { export const ImageComponent = React.memo((props: ImageComponentProps) => {

View File

@ -8,7 +8,7 @@ interface ListComponentProps {
value: Attribute[]; value: Attribute[];
docString: string; docString: string;
isInstantUpdate: boolean; isInstantUpdate: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const ListComponent = React.memo((props: ListComponentProps) => { export const ListComponent = React.memo((props: ListComponentProps) => {

View File

@ -9,7 +9,7 @@ interface MethodProps {
parameters: Record<string, string>; parameters: Record<string, string>;
docString?: string; docString?: string;
hideOutput?: boolean; hideOutput?: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const MethodComponent = React.memo((props: MethodProps) => { export const MethodComponent = React.memo((props: MethodProps) => {

View File

@ -22,7 +22,7 @@ interface NumberComponentProps {
value: number, value: number,
callback?: (ack: unknown) => void callback?: (ack: unknown) => void
) => void; ) => void;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
// TODO: highlight the digit that is being changed by setting both selectionStart and // TODO: highlight the digit that is being changed by setting both selectionStart and

View File

@ -15,7 +15,7 @@ interface SliderComponentProps {
docString: string; docString: string;
stepSize: number; stepSize: number;
isInstantUpdate: boolean; isInstantUpdate: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const SliderComponent = React.memo((props: SliderComponentProps) => { export const SliderComponent = React.memo((props: SliderComponentProps) => {

View File

@ -13,7 +13,7 @@ interface StringComponentProps {
readOnly: boolean; readOnly: boolean;
docString: string; docString: string;
isInstantUpdate: boolean; isInstantUpdate: boolean;
addNotification: (string) => void; addNotification: (message: string) => void;
} }
export const StringComponent = React.memo((props: StringComponentProps) => { export const StringComponent = React.memo((props: StringComponentProps) => {