From 9a473227a14ed5d7b72f60fd3eefeee5259263b6 Mon Sep 17 00:00:00 2001 From: Samuel Meyer Date: Tue, 7 Jan 2025 15:15:09 -0800 Subject: [PATCH] add explicit void returns --- canvas_modules/common-canvas/types/index.d.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/canvas_modules/common-canvas/types/index.d.ts b/canvas_modules/common-canvas/types/index.d.ts index d7db18080..42595418e 100644 --- a/canvas_modules/common-canvas/types/index.d.ts +++ b/canvas_modules/common-canvas/types/index.d.ts @@ -1781,7 +1781,7 @@ export type ButtonHandler = ( buttonId: string; carbonIcon: string; }, - callbackIcon: (icon: ReactNode) => {} + callbackIcon: (icon: ReactNode) => void ) => void; /** @@ -1794,7 +1794,7 @@ export type ButtonIconHandler = ( buttonId: string; carbonIcon: string; }, - callbackIcon: (icon: ReactNode) => {} + callbackIcon: (icon: ReactNode) => void ) => void; /** @@ -1805,7 +1805,7 @@ export type PropertyIconHandler = ( propertyId: PropertyId; enumValue: string; }, - callbackIcon: (icon: ReactNode) => {} + callbackIcon: (icon: ReactNode) => void ) => {}; /** @@ -1815,14 +1815,17 @@ export type HelpClickHandler = ( nodeTypeId: string, helpData: unknown, appData: Record -) => {}; +) => 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; /** @@ -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 @@ -2083,7 +2086,7 @@ export interface CommonPropertiesProps { * https://elyra-ai.github.io/canvas/04-common-properties/ */ export declare class CommonProperties extends React.Component { - applyPropertiesEditing: (closeEditor: boolean) => {}; + applyPropertiesEditing: (closeEditor: boolean) => void; } export type PortObject = @@ -2806,4 +2809,4 @@ export interface CommonCanvasProps { bottomPanelContent?: ReactNode; } -export class CommonCanvas extends React.Component {} +export declare class CommonCanvas extends React.Component {}