kit
kit copied to clipboard
docs: page from $app/state missing type info
Describe the problem
The documentation for page from $app/state currently shows the type of the page state like this:
const page: import('@sveltejs/kit').Page;
Which isn't very useful. If I'm at a computer I can always import page from $app/state and look at its properties with autocomplete, but that's not practical in all cases, such as if I'm browsing the Svelte docs on my phone during lunch / on a bus / whatever.
Describe the proposed solution
It would be nice if the type was shown in more detail, with the actual properties of the object. Of course the properties of page.params and page.data are dependent on your code, but the actual page properties do not change and could be put in the documentation. Especially since this is the section labeled "Reference", where I would expect to find more detailed documentation than just "the type is called Page".
Alternatives considered
I thought the Page type might be documented in https://svelte.dev/docs/kit/types, but it wasn't. AFAICT, the only way to discover all the properties of page is to use an editor's autocomplete.
Importance
nice to have
Additional Information
No response