Skip to content

Commit

Permalink
add explicit void returns
Browse files Browse the repository at this point in the history
  • Loading branch information
samueldmeyer committed Jan 7, 2025
1 parent 6eee5aa commit 9a47322
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions canvas_modules/common-canvas/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ export type ButtonHandler = (
buttonId: string;
carbonIcon: string;
},
callbackIcon: (icon: ReactNode) => {}
callbackIcon: (icon: ReactNode) => void
) => void;

/**
Expand All @@ -1794,7 +1794,7 @@ export type ButtonIconHandler = (
buttonId: string;
carbonIcon: string;
},
callbackIcon: (icon: ReactNode) => {}
callbackIcon: (icon: ReactNode) => void
) => void;

/**
Expand All @@ -1805,7 +1805,7 @@ export type PropertyIconHandler = (
propertyId: PropertyId;
enumValue: string;
},
callbackIcon: (icon: ReactNode) => {}
callbackIcon: (icon: ReactNode) => void
) => {};

/**
Expand All @@ -1815,14 +1815,17 @@ export type HelpClickHandler = (
nodeTypeId: string,
helpData: unknown,
appData: Record<string, unknown>
) => {};
) => void;

/**
* https://elyra-ai.github.io/canvas/04.02-callbacks/#titlechangehandler
*/
export type TitleChangeHandler = (
title: string,
callbackFunction: (data: { type: "warning" | "error"; message: string }) => {}
callbackFunction: (data: {
type: "warning" | "error";
message: string;
}) => void,
) => void;

/**
Expand Down Expand Up @@ -1979,7 +1982,7 @@ export interface CommonPropertiesProps {
*
* https://elyra-ai.github.io/canvas/04.02-callbacks/#closepropertiesdialogclosesource
*/
closePropertiesDialog?: (closeSource: "apply" | "cancel") => {};
closePropertiesDialog?: (closeSource: "apply" | "cancel") => void;
/**
* Executes when a user property values are updated.
* https://elyra-ai.github.io/canvas/04.02-callbacks/#propertylistener
Expand Down Expand Up @@ -2083,7 +2086,7 @@ export interface CommonPropertiesProps {
* https://elyra-ai.github.io/canvas/04-common-properties/
*/
export declare class CommonProperties extends React.Component<CommonPropertiesProps> {
applyPropertiesEditing: (closeEditor: boolean) => {};
applyPropertiesEditing: (closeEditor: boolean) => void;
}

export type PortObject =
Expand Down Expand Up @@ -2806,4 +2809,4 @@ export interface CommonCanvasProps {
bottomPanelContent?: ReactNode;
}

export class CommonCanvas extends React.Component<CommonCanvasProps> {}
export declare class CommonCanvas extends React.Component<CommonCanvasProps> {}

0 comments on commit 9a47322

Please sign in to comment.