Skip to content

private static class field naming-issue when using Object.freeze() #1355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rbrtbrnschn opened this issue Feb 2, 2021 · 0 comments
Open

Comments

@rbrtbrnschn
Copy link

non-private field 👍

/**
 * Holding builtin toHtml variants.
 * @property {toHtml} classic - designed for {@link TaxiOptions}.data type of string[]. 
 */
static ToHtml = Object.freeze({
  classic: (entry) => {
    return `<div class="taxi-card" value="${entry}">
      <strong>${entry}</strong>
    </div>`;
  },
});

returns this documentation: (within the class scope)
image

private field 👎🏼

where as this code (which is also within said class scope)

  /**
   * 
   * Default TaxiOptions, to be used incase of none given.
   * @property {*} data - ["Volkwagen", "Mercedes", "Daimler"]
   * @property {query} query - {@link #taxiquery}
   */
  static #TaxiOptionsDefaults = Object.freeze({
    data: ["Volkwagen", "Mercedes", "Daimler"],
    query: Taxi.Query.strict,
    toHtml: Taxi.ToHtml.classic,
    minChar: 1,
    showWarnings: true,
  });

Turns up below the class, as the following.
image

I tried:

giving a * @name ANYTHING_BUT_FREEZE to the latter documentation, which didnt work.
and that is about it, i really like documentation.js but I don't know how to fix it apart from making it public which I'm not a fan of, since they needn't be public.

  • What version of documentation.js are you using?: 13.1.1
  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): via npm(node.js) global install without sudo(not that that would make a difference)

any help would be appreciated, also if it means I need to change my code to something else, as long as it's not going to be public :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant