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

Fix typings for 'never' server context #134

Open
stazz opened this issue Feb 15, 2024 · 2 comments
Open

Fix typings for 'never' server context #134

stazz opened this issue Feb 15, 2024 · 2 comments
Assignees

Comments

@stazz
Copy link
Member

stazz commented Feb 15, 2024

The file server/src/flow.ts has type GetContext which now turns into never when server context is never. This needs updating.

Alternatively, maybe switch from never server context into something else like undefined? The never type has caused already a bit of a havoc after introducing it, as it doesn't always behave as one would expect (e.g. X extends never ? A : B doesn't work like expected, etc).

@stazz stazz self-assigned this Feb 15, 2024
@stazz
Copy link
Member Author

stazz commented Feb 15, 2024

The createTypicalServerFlow actually might need overloading in any case, since returned callback should not take any arguments.

@stazz
Copy link
Member Author

stazz commented Feb 15, 2024

Might as well also expose the version of createTypicalServerFlow which takes squashed endpoint as argument, so that reconstructing the large RegExp can be avoided e.g. on every lambda startup

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

1 participant