Skip to content
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

Documentation tidyup/updates #993

Merged
merged 61 commits into from Oct 23, 2020
Merged

Documentation tidyup/updates #993

merged 61 commits into from Oct 23, 2020

Conversation

bsian03
Copy link
Collaborator

@bsian03 bsian03 commented Aug 2, 2020

Continuation of #957 (or rather another attempt)

See here for old stuff I haven't done JSDoc this time round, however have done the structure changes:

From inside the namespace, the order is as follows)

  • Constants - Constants and VERSION
  • Types - grouped together, alphabetical order of group name and in each group (i haven't included group name)
  • Interfaces, also as above (Exception being Events and Constants, of which are at the bottom of their respective group)
  • Classes, in alphabetical order

Each category has 2 newline separations, with each group, or each class with a single newline separation

I'll also fill in missing docs for JSDoc

Invite.guild also now gets the relevant guild
Invite.channel now gets the relevant guild channel if the guild is cached. if group channel or not cached this will still be an object

(note for abal, please don't merge this with the other PRs since there's bound to be conflicts once the other PRs get merged)

Documentation/codebase layout changes

  • Everything is now in alphabetical order, this includes all docs (including TypeScript) and methods/props.
  • Added a linter to enforce the above (classes only)
  • Added missing and corrected incorrect docs
  • Consistency in JSDoc types
  • Removed superclass props from JSDoc
  • Invite#guild and Invite#channel will now fetch their respective instances. If Invite#guild is not cached, this will still be an object. If Invite#guild is not cached or Invite#channel is a GroupChannel, this will also still be an object. (this should really be in its own PR but too late)
  • Deprecate supplying userID parameter for messageReactionAdd and messageReactionRemove for DMs (Anything other than "@me" will error)
  • Update to TypeScript v4!

TypeScript v4

  • Updated typescript eslint parser and plugin
  • Slight change to types to respect TypeScript v4 rules
  • Add deprecation flag to deprecated properties/getters/methods! (This also works for overloads)

Warning may be shown in the console of the CI, this can be disregarded, see here

Resolves #1003
Resolves #1004

@bsian03 bsian03 marked this pull request as draft August 2, 2020 01:51
index.d.ts Show resolved Hide resolved
@bsian03 bsian03 marked this pull request as ready for review August 5, 2020 23:43
@bsian03
Copy link
Collaborator Author

bsian03 commented Aug 5, 2020

Should I reorder JSDoc?

@bsian03 bsian03 mentioned this pull request Aug 5, 2020
@bsian03 bsian03 mentioned this pull request Aug 7, 2020
@bsian03 bsian03 marked this pull request as draft August 14, 2020 00:28
@bsian03
Copy link
Collaborator Author

bsian03 commented Aug 14, 2020

Turns out some of the events typings are incorrect, I'm going through them now

@Dragory
Copy link
Contributor

Dragory commented Aug 16, 2020

The following properties are missing from index.d.ts for Message, could be included in this PR:

  • application
  • messageReference
  • activity
  • flags

@Runi-c
Copy link
Contributor

Runi-c commented Aug 19, 2020

This could go in this PR too:
The documentation on the event webhooksUpdate is wrong, channelID and guildID should be given as properties of data, not as separate parameters.

~Shard.js:1625

@DonovanDMC
Copy link
Contributor

DonovanDMC commented Sep 9, 2020

An update for webhooks returning Message<GuildTextableChannel> can be shoved in, considering webhooks only exist in guilds

@bsian03
Copy link
Collaborator Author

bsian03 commented Sep 9, 2020

That's already been done

@DonovanDMC
Copy link
Contributor

DonovanDMC commented Oct 4, 2020

need OldGuildChannel.position to be changed to number from string (I don't know how to suggest changes on pr's, or if I even can)

@jtsshieh
Copy link
Contributor

jtsshieh commented Oct 4, 2020

@DonovanDMC pr on bsian's fork for free pr :)

@DonovanDMC
Copy link
Contributor

DonovanDMC commented Oct 4, 2020

true true (done that 👍)

@bsian03
Copy link
Collaborator Author

bsian03 commented Oct 4, 2020

@DonovanDMC btw it's File changes (whatever the last tab is called), go to index.d.t.s and find OldGuildChannel, then click on the blue "+" and click on that small file icon - it should load the text input with a codeblock prefixed suggestion

DonovanDMC and others added 5 commits October 4, 2020 08:28
* change OldGuildChannel.position from string to number

* fix typo in rawREST event
* add `team` to OAuthApplicationInfo

* break out partial user references for consistency

* move PartialUser to correct category

* Alphabetical order

Co-authored-by: bsian03 <chharry321@gmail.com>
Copy link
Owner

@abalabahaha abalabahaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This better work

@abalabahaha abalabahaha merged commit 814f92b into abalabahaha:dev Oct 23, 2020
bsian03 added a commit to bsian03/eris that referenced this pull request Nov 18, 2020
Co-authored-by: jtsshieh <27078349+jtsshieh@users.noreply.github.com>
Co-authored-by: Donovan Daniels <dwddaniels262@gmail.com>
Co-authored-by: Geo <georgej1088@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants