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

chore: Add deprecation JSDoc for render()'s replaceNode #3700

Merged
merged 3 commits into from Aug 31, 2022

Conversation

rschristian
Copy link
Member

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.

src/index.d.ts Outdated
vnode: ComponentChild,
parent: Element | Document | ShadowRoot | DocumentFragment,
): void;
/** @deprecated Will be removed in v11. */
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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
 */

@coveralls
Copy link

coveralls commented Aug 30, 2022

Coverage Status

Coverage remained the same at 99.522% when pulling 3fc8b5e on chore/deprecate-replace-node into 35e7d8e on master.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Good catch!

@marvinhagemeister marvinhagemeister merged commit e70238f into master Aug 31, 2022
@marvinhagemeister marvinhagemeister deleted the chore/deprecate-replace-node branch August 31, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants