type fixes for adapter-node and adapter-static#1578
Merged
benmccann merged 2 commits intosveltejs:masterfrom May 29, 2021
quentin-fox:master
Merged
type fixes for adapter-node and adapter-static#1578benmccann merged 2 commits intosveltejs:masterfrom quentin-fox:master
benmccann merged 2 commits intosveltejs:masterfrom
quentin-fox:master
Conversation
benmccann
reviewed
May 29, 2021
| pages?: string; | ||
| assets?: string; | ||
| fallback?: string; | ||
| fallback?: string | null; |
Member
There was a problem hiding this comment.
I wonder if we should make the default undefined to simplify the types?
Contributor
Author
There was a problem hiding this comment.
From what I can tell that'd be fine, I can't see any places where fallback couldn't be undefined instead of null, and lots of the other adapters don't specify a fallback key in utils.prerender, so that seems pretty safe. Will push that change now!
sidharthv96
added a commit
to sidharthv96/kit
that referenced
this pull request
May 29, 2021
* 'master' of https://github.com/sveltejs/kit: Version Packages (next) (sveltejs#1543) type fixes for adapter-node and adapter-static (sveltejs#1578) Upgrade to Vite 2.3.3 (sveltejs#1580) fix: improve getRawBody parsing & handle error(s) (sveltejs#1528) create-svelte: add svelte-check for TS (sveltejs#1556) pass validated svelte config to adapters (sveltejs#1559) types: group related and reduce potential inconsistencies (sveltejs#1539) Use sveltekit tag on StackOverflow (sveltejs#1558) Fix create-svelte build-template script (sveltejs#1555) Remove err param from Polka .listen() callback (sveltejs#1550) bump: polka and sirv versions (sveltejs#1548) svelte-kit package (sveltejs#1499)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The adapter-node and adapter-static do not actually require any arguments, which is shown in the documentation here: https://github.com/quentin-fox/kit/blob/3f82e80f14b8ebfe0d004c004b5109d70f902a47/documentation/docs/10-adapters.md#L9-L18
The Typescript types for the adapters do not indicate that the options object are optional, even though they are not required.
I also added the null type to the fallback param, since the default value is null.