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

Enable concise syntax of response.cookie(...flagBag.cookie) #10

Open
dferber90 opened this issue Nov 22, 2021 · 1 comment
Open

Enable concise syntax of response.cookie(...flagBag.cookie) #10

dferber90 opened this issue Nov 22, 2021 · 1 comment

Comments

@dferber90
Copy link
Contributor

dferber90 commented Nov 22, 2021

This originally existed on an unreleased branch in 77bfb6f but had to be removed as a TypeScript warning appeared on the calling side of response.cookie(...flagBag.cookie):

A spread argument must either have a tuple type or be passed to a rest parameter.

The code works, but I could not figure out the correct type.

Reintroducing this would allow developers to use response.cookie(...flagBag.cookie) instead of response.cookie(...flagBag.cookie.args).

@dferber90 dferber90 changed the title Reenable concise syntax of response.cookie(...flagBag.cookie) Enable concise syntax of response.cookie(...flagBag.cookie) Nov 22, 2021
@dferber90
Copy link
Contributor Author

flagBag.setCookie(response) would be a nicer way of handling this. Then we can drop flagBag.cookie.args.

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