-
Notifications
You must be signed in to change notification settings - Fork 299
enhancements(API reference): Indicate deprecated func clearly in the menu #3127
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
**This function may return a price from arbitrarily far in the past.** It is the | ||
caller's responsibility to check the returned \`publishTime\` to ensure that the | ||
update is recent enough for their use case. If you need the latest price, update the price using [\`updatePriceFeeds()\`](updatePriceFeeds) and then call [\`getPrice()\`](getPrice). | ||
update is recent enough for their use case. If you need the latest price, update the price using [\`updatePriceFeeds()\`](updatePriceFeeds) and then call [\`getPriceNoOlderThan()\`](getPriceNoOlderThan). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling the correct method.
Use this function if you want to use a Pyth price for a fixed time and not the most | ||
recent price; otherwise, consider using [updatePriceFeeds](update-price-feeds) | ||
followed by [getPrice](get-price) or one of its variants. | ||
followed by [getPriceNoOlderThan](get-price-no-older-than) or one of its variants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling the correct method.
name, | ||
href: `/price-feeds/${chain}/${name}`, | ||
Object.entries(methods).map(([methodKey, methodValue]) => ({ | ||
name: (methodValue as { name: string }).name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to show the exact method name in the menu as when you open a method (which includes deprecated) so modifying the name
parameter.
I have attached the screenshot in the PR description to show how the menu will look with this changeset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary
The menu does not show if the method is deprecated, indicating it clearly so users allows at a glance. This will enhance the developer experience.
Rationale
How has this been tested?