How to use the escope/lib/referencer.default.prototype function in escope

To help you get started, we’ve selected a few escope examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github karthikv / tradeship / patches / escope.js View on Github external
};

referencer.prototype.visitProperty = function(node) {
  visitDecorators.call(this, node);
  visitProperty.call(this, node);
};

function visitDecorators(node) {
  if (!node.decorators) {
    return;
  }
  node.decorators.forEach(d => this.visit(d));
}

// register class properties by visiting them as regular properties
referencer.prototype.ClassProperty = function(node) {
  this.visitProperty(node);
};

module.exports = require("escope");
github karthikv / tradeship / patches / escope.js View on Github external
const referencer = require("escope/lib/referencer").default;

const { visitClass, visitProperty } = referencer.prototype;

// visit decorators on classes/properties to resolve their identifiers
referencer.prototype.visitClass = function(node) {
  visitDecorators.call(this, node);
  visitClass.call(this, node);
};

referencer.prototype.visitProperty = function(node) {
  visitDecorators.call(this, node);
  visitProperty.call(this, node);
};

function visitDecorators(node) {
  if (!node.decorators) {
    return;
  }
  node.decorators.forEach(d => this.visit(d));
}

// register class properties by visiting them as regular properties
referencer.prototype.ClassProperty = function(node) {
  this.visitProperty(node);
};
github karthikv / tradeship / patches / escope.js View on Github external
const referencer = require("escope/lib/referencer").default;

const { visitClass, visitProperty } = referencer.prototype;

// visit decorators on classes/properties to resolve their identifiers
referencer.prototype.visitClass = function(node) {
  visitDecorators.call(this, node);
  visitClass.call(this, node);
};

referencer.prototype.visitProperty = function(node) {
  visitDecorators.call(this, node);
  visitProperty.call(this, node);
};

function visitDecorators(node) {
  if (!node.decorators) {
    return;
  }
  node.decorators.forEach(d => this.visit(d));
}
github karthikv / tradeship / patches / escope.js View on Github external
const referencer = require("escope/lib/referencer").default;

const { visitClass, visitProperty } = referencer.prototype;

// visit decorators on classes/properties to resolve their identifiers
referencer.prototype.visitClass = function(node) {
  visitDecorators.call(this, node);
  visitClass.call(this, node);
};

referencer.prototype.visitProperty = function(node) {
  visitDecorators.call(this, node);
  visitProperty.call(this, node);
};

function visitDecorators(node) {
  if (!node.decorators) {
    return;
  }

escope

ECMAScript scope analyzer

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

77 / 100
Full package analysis