| | |
| | | type: 'code', |
| | | required: true, |
| | | value: 'const main = (arg1, arg2) =>{\n return {\n result1: arg1,\n result2: arg2\n }\n}', |
| | | language: ['text', 'javascript'], |
| | | defaultLanguage: 'javascript', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | type: 'resource_value', |
| | | required: true, |
| | | value: '', |
| | | language: ['text', 'javascript'], |
| | | defaultLanguage: 'text', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | * @param key |
| | | * @param val |
| | | */ |
| | | static getConfigValue = (obj: any, key: string, val: string) => { |
| | | static getConfigValue = (obj: any, key: string, val: any) => { |
| | | const value = obj[key]; |
| | | if (!value || value !== val) { |
| | | obj[key] = val; |
| | | } |
| | | |
| | | return val; |
| | | }; |
| | | |
| | | |
| | | |
| | | static getHandleId = (node: any, handleType: HandleType, order?: number) => { |
| | | const orderSuffix = order == undefined ? '' : `__${order + ''}`; |
| | | return `${node.id}__handle-${handleType}${orderSuffix}`; |