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

docs: Improve Javascript Anchor Types reference #3344

Conversation

acheroncrypto
Copy link
Collaborator

Problem

JavaScript Anchor Types has the following problems:

  • It's not possible to link an individual type e.g. if someone specifically asks for how to pass enums from TS, we should be able to link that section specifically https://www.anchor-lang.com/docs/javascript-anchor-types#enum
  • All examples include the same boilerplate await program.methods.init(<VAL>).rpc(); when we only care about the <VAL>
  • In "Javascript Type" column, there are TS types such as Array<T>, meaning table column can be renamed from "JavaScript Type" to "TypeScript Type"
  • "Note" column doesn't include any notes other than linking https://github.com/indutny/bn.js, which is not very useful and takes up a large space

Summary of changes

  • Make indiviual types from the page linkable
  • Remove the boilerplate from the examples and only include the example value(s)
  • Add "Type" column
  • Rename "Rust Type" to "Rust"
  • Rename "Javascript Type" to "TypeScript"
  • Remove "Note" column

Copy link

vercel bot commented Nov 2, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added the documentation Improvements or additions to documentation label Nov 2, 2024
@acheroncrypto acheroncrypto merged commit a982942 into coral-xyz:master Nov 2, 2024
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant