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

types: allow void return in LoadOutput #1617

Merged
merged 3 commits into from
May 31, 2021
Merged

types: allow void return in LoadOutput #1617

merged 3 commits into from
May 31, 2021

Conversation

ignatiusmb
Copy link
Member

Fixes #1606, and cleans up some more types

@dummdidumm dummdidumm merged commit fc19b63 into sveltejs:master May 31, 2021
@dummdidumm
Copy link
Member

Thanks!

@janosh
Copy link
Contributor

janosh commented Nov 2, 2021

Shouldn't the void | in

MaybePromise<void | LoadOutput<
	InferValue<Output, 'props', Record<string, any>>,
	InferValue<Output, 'context', Record<string, any>>
>>;

be part of LoadOutput? Otherwise a Load function like

async function load(input: LoadInput): Promise<LoadOutput> {
  // ...
}

will still raise a type error when not returning.

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

Successfully merging this pull request may close these issues.

LoadOutput types incorrect
3 participants