He estado escribiendo mi propia biblioteca auxiliar para mis retoques diarios y me gusta agregar documentación a cada función que creo. ahora el problema que tengo es el siguiente:
la forma en que agrego documentación a la mayoría de mis funciones funciona y no hay problema, tomemos mi (w3schools copiado) rng
/** * a function for generating an integer between a and b. * further documentation... * @param {!number} min - this is the lower bound * @param {!number} max - this is the higher bound */ function random (min, max){ return Math.floor(Math.random() * (max - min) ) + min; }esto funciona y me da las instrucciones adecuadas en mi ide(?) vsc
ahora el problema es cuando trato de agregarlo a un objeto js existente como el número, tome mi función para ver si un número está entre otros dos números
/** * a function for checking if n is between but not equals a and b. * @param {!number} lower - the lower number * @param {!number} higher - the higher number */ Number.prototype.isBetween = function (lower, higher) { return (this > lower && this < higher || this > higher && this < lower) ? true : false; } esto ni siquiera me da la sugerencia de que myVar.isBetween(a,b) es una función ni me da ninguna documentación