refactor: deprecate and clean up variable-related methods. (#8415)

* refactor: deprecate and clean up variable-related methods.

* chore: Add deprecation JSDoc.
This commit is contained in:
Aaron Dodson
2024-07-22 17:13:20 -07:00
committed by GitHub
parent fb82c9c9bb
commit 91892ac303
6 changed files with 91 additions and 89 deletions

View File

@@ -140,21 +140,6 @@ export class VariableModel implements IVariableModel<IVariableState> {
workspace.getVariableMap().addVariable(variable);
eventUtils.fire(new (eventUtils.get(eventUtils.VAR_CREATE))(variable));
}
/**
* A custom compare function for the VariableModel objects.
*
* @param var1 First variable to compare.
* @param var2 Second variable to compare.
* @returns -1 if name of var1 is less than name of var2, 0 if equal, and 1 if
* greater.
* @internal
*/
static compareByName(var1: VariableModel, var2: VariableModel): number {
return var1
.getName()
.localeCompare(var2.getName(), undefined, {sensitivity: 'base'});
}
}
registry.register(