mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Enforce type checking in all node params (#2509)
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
INodePropertyOptions,
|
||||
NodeApiError,
|
||||
} from 'n8n-workflow';
|
||||
@@ -445,12 +446,12 @@ export function populateFields(
|
||||
|
||||
export const toOptions = (option: string) => ({ name: option, value: option });
|
||||
|
||||
export const toDisplayName = ({ name, value }: Option) => {
|
||||
export const toDisplayName = ({ name, value }: Option): INodePropertyOptions => {
|
||||
return { name: splitPascalCase(name), value };
|
||||
};
|
||||
|
||||
export const splitPascalCase = (word: string) => {
|
||||
return word.match(/($[a-z])|[A-Z][^A-Z]+/g)?.join(' ');
|
||||
return word.match(/($[a-z])|[A-Z][^A-Z]+/g)!.join(' ');
|
||||
};
|
||||
|
||||
export function adjustTransactionDates(
|
||||
|
||||
Reference in New Issue
Block a user