mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Improve default types if there is not execution data
This commit is contained in:
@@ -213,9 +213,17 @@ export default mixins(
|
||||
autoCompleteItems.push(`const $node = ${JSON.stringify(nodes)}`);
|
||||
|
||||
if (this.codeAutocomplete === 'function') {
|
||||
autoCompleteItems.push(`const items = ${JSON.stringify(this.createSimpleRepresentation(connectionInputData))}`);
|
||||
if (connectionInputData) {
|
||||
autoCompleteItems.push(`const items = ${JSON.stringify(this.createSimpleRepresentation(connectionInputData))}`);
|
||||
} else {
|
||||
autoCompleteItems.push(`const items: {json: any}[] = []`);
|
||||
}
|
||||
} else if (this.codeAutocomplete === 'functionItem') {
|
||||
autoCompleteItems.push(`const item = $json`);
|
||||
if (connectionInputData) {
|
||||
autoCompleteItems.push(`const item = $json`);
|
||||
} else {
|
||||
autoCompleteItems.push(`const item = {}`);
|
||||
}
|
||||
}
|
||||
|
||||
this.monacoLibrary = monaco.languages.typescript.javascriptDefaults.addExtraLib(
|
||||
|
||||
Reference in New Issue
Block a user