* outline of plugin to remove unused catch binding, test not passing * plugin to remove unused catch binding * Edit README.md and package.json * tests for try catch finally * Add test to handle case when binding is referenced and given new TypeError (not passing) * Fix visitor to not remove catch clause param when binding being assigned a new value * Improve naming of tests and explanations * add test case for catch param not present and fix test for duplicate variable declaration * Remove binding.constantViolations filter in visitor as superfluous * Remove duplicate check that catch clause param present * Alter visitor so returns out when catch binding is not an Identifier * Created failing tests for ObjectPattern params and rewrote visitor so now passing Took out the pass in visitor when param not an Identifier, wrote case to handle when param isObjectPattern, and wrote failing tests for when param isArrayPattern * Handle case when param isArrayPattern, tests passing * Update package.json to v7.0.0-alpha.20 * Revert visitor to only consider transform if param is Identifier
6 lines
93 B
JavaScript
6 lines
93 B
JavaScript
try {
|
|
throw 0;
|
|
} catch ([message]) {
|
|
console.log("it failed, but this code executes");
|
|
}
|