Further improve default types

This commit is contained in:
Jan Oberhauser 2021-12-23 18:15:40 +01:00
parent cc4f16f419
commit 85be1223e9

View file

@ -216,13 +216,13 @@ export default mixins(
if (connectionInputData) {
autoCompleteItems.push(`const items = ${JSON.stringify(this.createSimpleRepresentation(connectionInputData))}`);
} else {
autoCompleteItems.push(`const items: {json: any}[] = []`);
autoCompleteItems.push(`const items: {json: {[key: string]: any}}[] = []`);
}
} else if (this.codeAutocomplete === 'functionItem') {
if (connectionInputData) {
autoCompleteItems.push(`const item = $json`);
} else {
autoCompleteItems.push(`const item = {}`);
autoCompleteItems.push(`const item: {[key: string]: any} = {}`);
}
}