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

Discrepancy between code and documentation (also header) of app.unmount #2922

Closed
amw opened this issue Jan 1, 2021 · 1 comment · Fixed by #2601
Closed

Discrepancy between code and documentation (also header) of app.unmount #2922

amw opened this issue Jan 1, 2021 · 1 comment · Fixed by #2601
Labels
🐞 bug Something isn't working scope: types

Comments

@amw
Copy link

amw commented Jan 1, 2021

Version

3.0.5

Reproduction link

https://v3.vuejs.org/api/application-api.html#unmount

Steps to reproduce

The documentation as well as this header say that app.unmount() takes DOM element/query string as an argument:
https://github.com/vuejs/vue-next/blob/a66e53a24f445b688eef6812ecb872dc53cf2702/packages/runtime-core/src/apiCreateApp.ts#L32
https://v3.vuejs.org/api/application-api.html#unmount

I don't think this makes any sense – the app is mounted on a single element and it knows its container. In fact if you take a look on the body of unmount it does not take any argument:
https://github.com/vuejs/vue-next/blob/a66e53a24f445b688eef6812ecb872dc53cf2702/packages/runtime-core/src/apiCreateApp.ts#L269

What is expected?

The docs should not mention any argument of app.unmount.

What is actually happening?

The documentation is confusing.


Sorry for not providing repro link. I don't know if there's separate issue tracker for documentation, but even it there is I can also see a problem in TypeScript header.

@LinusBorg
Copy link
Member

Thanks for reporting. This indeed seems to be a mistake in the types, and made it's way into the docs from there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: types
Projects
None yet
2 participants