Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
TSEnumMember(node) {
const { id, initializer } = node;
const scope = this.currentScope();
scope.__define(id, new Definition("EnumMemberName", id, node));
// Set `eslintUsed` flag to the defined variable because the enum member is obviously exported.
const variable = scope.set.get(id.name);
variable.eslintUsed = true;
if (initializer) {
scope.__referencing(
id,
Reference.WRITE,
initializer,
null,
false,
true
);
this.visit(initializer);
}
}