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
chore: Add deprecation JSDoc for render()'s replaceNode
#3700
Conversation
src/index.d.ts
Outdated
vnode: ComponentChild, | ||
parent: Element | Document | ShadowRoot | DocumentFragment, | ||
): void; | ||
/** @deprecated Will be removed in v11. */ |
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.
Unsure of what we want to suggest in the message. Maybe link to https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c until better docs are written?
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.
That would be good, yep.
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.
Added that in.
/**
* @deprecated Will be removed in v11.
*
* Replacement Preact 10+ implementation can be found here: https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c
*/
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.
Good catch!
I noticed we have not marked
replaceNode
as deprecated despite it already being removed in v11.Unfortunately there seems to be no way to mark a function parameter as deprecated, only the entire function signature, hence why the overload was used.