- Safe ✅: The refactoring will not change the behavior of your code.
- Information ℹ️: The refactoring might detrimentally affect comments or readability.
- Warning ⚠️: The refactoring might change the behavior of your code. The text will include short hints at what you need to check to proceed safely. The documentation page for the code action might contain more details.
- Error ⛔: The refactoring will change the behavior of your code and can introduce defects. You might still want to proceed, particularly if you want to change the behavior on purpose.
The safety analysis analyzes single files without a larger type context. Some indirect types resolved by TypeScript in your program might be considered
P42 identifies whether a file is run in an isolated context (i.e.,
function do not change the global scope) based on the file extension or the use of
require. Files with a
.cjs extension or a top-level
module.exports are assumed to run as Node.js CommonJS modules. Files with a
.mjs extension or
var could affect the global scope.
The safety analysis does not cover runtime performance, which can be vital if you work on hotspot areas of your application. Refactorings might negatively impact the application performance in some cases.