Skip to content

Commit

Permalink
fix rest param type generation (#4361)
Browse files Browse the repository at this point in the history
* fix rest param type generation

* Create happy-eggs-shop.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>
  • Loading branch information
mrkishi and Rich-Harris committed Mar 17, 2022
1 parent 2d6f0d2 commit 85d9231
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/happy-eggs-shop.md
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": patch
---

fix rest param type generation
2 changes: 1 addition & 1 deletion packages/kit/src/core/sync/write_types.js
Expand Up @@ -29,7 +29,7 @@ export function write_types(config, manifest_data) {
/** @type {string[]} */
const params = [];

const pattern = /\[([^\]]+)\]/g;
const pattern = /\[(?:\.{3})?([^\]]+)\]/g;
let match;

while ((match = pattern.exec(key))) {
Expand Down

0 comments on commit 85d9231

Please sign in to comment.