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

AstroCookieSetOptions requires all properties since Astro 4.6 #10797

Closed
1 task
misl-smlz opened this issue Apr 16, 2024 · 1 comment
Closed
1 task

AstroCookieSetOptions requires all properties since Astro 4.6 #10797

misl-smlz opened this issue Apr 16, 2024 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@misl-smlz
Copy link

Astro Info

Astro                    v4.6.1
Node                     v20.3.0
System                   Linux (x64)
Package Manager          pnpm
Output                   server
Adapter                  @astro-aws/adapter
Integrations             @astrojs/vue
                         @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

---
Astro.cookies.set('test-cookie', 'test-value', { path: '/' });
---

<div>test</div>

fails with

Argument of type '{ path: string; }' is not assignable to parameter of type 'AstroCookieSetOptions'.
  Type '{ path: string; }' is missing the following properties from type 'AstroCookieSetOptions': domain, expires, maxAge, httpOnly, and 3 more.ts(2345)

What's the expected result?

No typescript error is expected. This used to work in Astro 4.5

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-yaalmr?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Apr 16, 2024
@ematipico
Copy link
Member

This will be fixed in the next patch release: #10776

@ematipico ematipico closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants