kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Extract proper location from function expression #82

Open kungfooman opened 8 months ago

kungfooman commented 8 months ago

This code:

/**
 * @class
 * @name pc.ScopeSpace
 * @classdesc The scope for variables and subspaces.
 * @param {string} name - The scope name.
 * @property {string} name The scope name.
 */
var ScopeSpace = function (name) {
  // Store the name
  this.name = name;
  // Create the empty tables
  this.variables = {};
  this.namespaces = {};
};

is currently generating:

  if (!assertType(name, "string", 'unnamed function expression', 'name')) {
    youCanAddABreakpointHere();
  }

Instead of unnamed function expression it should be ScopeSpace