From 9a75153125c18291a278f3c27b56b6cc0adc120b Mon Sep 17 00:00:00 2001 From: Igor Carvalho Date: Wed, 19 Jul 2023 18:17:51 -0300 Subject: [PATCH] refactor[utils.ts]: Change arrow functions to normal functions --- src/frontend/src/utils/utils.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/utils/utils.ts b/src/frontend/src/utils/utils.ts index 6f57e49eb..a537dad37 100644 --- a/src/frontend/src/utils/utils.ts +++ b/src/frontend/src/utils/utils.ts @@ -256,7 +256,7 @@ export function getRandomKeyByssmm(): string { return seconds + milliseconds + Math.abs(Math.floor(Math.random() * 10001)); } -export const varHighlightHTML = ({ name }: IVarHighlightType) => { +export function varHighlightHTML({ name }: IVarHighlightType): string { const html = `{${name}}`; return html; }; @@ -281,11 +281,11 @@ export function buildTweakObject(tweak) { * @param {string} flowId - The id of the flow * @returns {string} - The python code */ -export const getPythonApiCode = ( +export function getPythonApiCode( flow: FlowType, tweak?: any[], tabsState?: TabsState -): string => { +): string { const flowId = flow.id; // create a dictionary of node ids and the values is an empty dictionary @@ -338,11 +338,11 @@ print(run_flow(inputs, flow_id=FLOW_ID, tweaks=TWEAKS))`; * @param {string} flowId - The id of the flow * @returns {string} - The curl code */ -export const getCurlCode = ( +export function getCurlCode( flow: FlowType, tweak?: any[], tabsState?: TabsState -): string => { +): string { const flowId = flow.id; const tweaks = buildTweaks(flow); const inputs = buildInputs(tabsState, flow.id); @@ -364,11 +364,11 @@ export const getCurlCode = ( * @param {string} flowName - The name of the flow * @returns {string} - The python code */ -export const getPythonCode = ( +export function getPythonCode( flow: FlowType, tweak?: any[], tabsState?: TabsState -): string => { +): string { const flowName = flow.name; const tweaks = buildTweaks(flow); const inputs = buildInputs(tabsState, flow.id);