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

independent page type #4076

Merged
merged 8 commits into from Feb 24, 2022
Merged

independent page type #4076

merged 8 commits into from Feb 24, 2022

Conversation

ignatiusmb
Copy link
Member

Closes #3730

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2022

🦋 Changeset detected

Latest commit: 565f81e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

I guess we'll need to figure out a place to document this. Should it go in https://kit.svelte.dev/docs/modules#$app-stores or do we need to rig up a new section in https://kit.svelte.dev/docs/types?

Also, do we need the export keywords here? If an unexported interface is importable, should it just be const page etc rather than export const page?

*/
export const page: Readable<{

interface Page<Params extends Record<string, string> = Record<string, string>> {
Copy link
Member

Choose a reason for hiding this comment

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

if this is going to close #3730 then I think this interface would need to be exported?

@ignatiusmb
Copy link
Member Author

We already moved all of them to docs/types, so I guess might as well add a new section for the $app/* modules?

Also, do we need the export keywords here?

We don't, surprisingly. They're still importable, it might be how declare module works, but for the sake of consistency, I'll add the export keywords to them.

@Rich-Harris
Copy link
Member

In #4099, we're moving Navigation (formerly 'Navigating') to the @sveltejs/kit types, and I think it makes sense to do the same thing here, since these are fairly universal concepts even if they're currently only used inside $app/stores. At the very least it makes documenting things somewhat easier

@Rich-Harris Rich-Harris merged commit 11b4d97 into master Feb 24, 2022
@Rich-Harris Rich-Harris deleted the feat-3730/independent-page-type branch February 24, 2022 04:17
This was referenced Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store types
3 participants