oidc-client-js icon indicating copy to clipboard operation
oidc-client-js copied to clipboard

Method createSignoutRequest not in the DOC

Open stegithub opened this issue 5 years ago • 5 comments

Usefull method createSignoutRequest is not explicit into docs

stegithub avatar Jun 07 '19 08:06 stegithub

Is it possible to submit PRs for Wiki updates? Sorry for my newbie question but I may be able to help here now that I'm trying to understand how createSignoutRequest works 😎

Narshe1412 avatar Aug 21 '19 13:08 Narshe1412

The wiki doesn't allow that, IIRC, but feel free to open an issue with the proposed text/changes.

brockallen avatar Aug 21 '19 14:08 brockallen

@brockallen How are your feelings to add JSDOC comments via pull requests to the most common functions of the library? This way it's self documented and most IDEs can pick it up for the intellisense. I understand that it will add a burden to maintain those comments from that point on, but maybe that's something that can be outsourced to the community as well.

Otherwise I'll create an issue with the text as soon as I get some spare minutes.

Narshe1412 avatar Aug 23 '19 09:08 Narshe1412

JSDOC -- I'm not familiar with that, but sounds interesting.

brockallen avatar Aug 23 '19 12:08 brockallen

Not sure how that's called in other languages. There's one for Java also called Javadoc. I believe in C# they're just called XML comments.

Example:

  /**
   * Implements the Fisher-Yates Shuffle algorithm that returns an array of randomized elements ensuring no duplicates
   * @param array The array to shuffle
   * @author https://stackoverflow.com/a/2450976/5866637
   */
  private shuffle(array: number[]): number[] {
    const cpArray = [...array]; 
// ...

It will later look like this on IDEs: image

And can also generate an automatic documentation website with some software like: https://github.com/jsdoc/jsdoc

Of course, it will require that all the public api for the library to be annotated in this way for the current and future versions, that's why I have asked before doing any PR as I don't know if I will be here tomorrow to keep contributing and may become a burden for you or your other contributors. It's also not fully standarized, hopefully it shouldn't become another Gif-Jif discussion but you know how the internet works.

Narshe1412 avatar Aug 23 '19 13:08 Narshe1412