Skip to content

Commit

Permalink
refactor[utils.ts]: Change arrow functions to normal functions
Browse files Browse the repository at this point in the history
  • Loading branch information
igorrCarvalho authored and anovazzi1 committed Jul 19, 2023
1 parent 6d5ef26 commit 9a75153
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/frontend/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `<span class="font-semibold chat-message-highlight">{${name}}</span>`;
return html;
};
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 9a75153

Please sign in to comment.