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

Duplicate onDestroy method description #654

Open
loky-lp opened this issue Oct 26, 2024 · 3 comments
Open

Duplicate onDestroy method description #654

loky-lp opened this issue Oct 26, 2024 · 3 comments

Comments

@loky-lp
Copy link

loky-lp commented Oct 26, 2024

As you can see from this screen the "Schedules a callback.." section is written twice, with the first one still having the type definition, but other method in the same page don't.

Screenshot 2024-10-26 alle 16 09 50

I've immediately jumped to fix this but when i was going to create a PR i saw this:

If this is a documentation PR (i.e. changing content within apps/svelte.dev/content/docs), then this is the wrong repository to make those changes. The content in this folder is synced from other repositories. Therefore, these changes should be made in their respective repositories (at https://github.com/sveltejs/svelte or https://github.com/sveltejs/kit, or example).

I can't figure out this sync mechanism, since the source file in the https://github.com/sveltejs/svelte repo has this > EXPORT_SNIPPET: svelte#onDestroy that I don't understand how it's used, since is the only appearance that EXPORT_SNIPPET makes in the entirety of the repo

The source file at https://github.com/sveltejs/svelte:
https://github.com/sveltejs/svelte/blob/7be3afb3a642d1654a4b96ddfa3d6239a8cf1a6b/documentation/docs/06-runtime/03-lifecycle-hooks.md?plain=1#L46

@brunnerh
Copy link
Member

EXPORT_SNIPPET inserts the declaration of that module export (source); that should be the JSDoc and the type signature.
The JSDoc has the same content as the following Markdown text.

Given that EXPORT_SNIPPET appears to be completely unused otherwise, it probably should be removed 🤔

@loky-lp
Copy link
Author

loky-lp commented Oct 27, 2024

Perhaps this issue should be moved to https://github.com/sveltejs/svelte then

@Conduitry
Copy link
Member

There's also sveltejs/svelte#13711 already - we need to decide how we want this to work and which end(s) we want to address this on.

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

No branches or pull requests

3 participants