const userId = 123; const [userName, userAge] = ["Eve", 25];
id_assignment = file.code_block.get_local_var_assignment("userId") id_assignment.set_value("456") name_assignment = file.code_block.get_local_var_assignment("name") name_assignment.rename("userName")
let status; const data = fetchData();
status_assignment = file.code_block.get_local_var_assignment("status") status_assignment.set_type_annotation("Status") status_assignment.set_value("Status.ACTIVE") data_assignment = file.code_block.get_local_var_assignment("data") data_assignment.set_type_annotation("ResponseData<T>") # Result: let status: Status = Status.ACTIVE; const data: ResponseData<T> = fetchData();
assignment = file.code_block.get_local_var_assignment("userId") # Get all usages of the assignment usages = assignment.usages # Get all dependencies of the assignment dependencies = assignment.dependencies
Was this page helpful?