refactor: Use IVariableModel instead of VariableModel. (#8400)

* refactor: Use IVariableModel methods instead of directly accessing properties.

* refactor: replace references to VariableModel with IVariableModel.
This commit is contained in:
Aaron Dodson
2024-07-19 14:58:04 -07:00
committed by GitHub
parent 02e64bebbe
commit 294ef74d1b
22 changed files with 248 additions and 141 deletions

View File

@@ -144,9 +144,9 @@ const CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = {
const id = this.getFieldValue('VAR');
const variableModel = Variables.getVariable(this.workspace, id)!;
if (this.type === 'variables_get_dynamic') {
this.outputConnection!.setCheck(variableModel.type);
this.outputConnection!.setCheck(variableModel.getType());
} else {
this.getInput('VALUE')!.connection!.setCheck(variableModel.type);
this.getInput('VALUE')!.connection!.setCheck(variableModel.getType());
}
},
};