diff --git a/.changeset/happy-eggs-shop.md b/.changeset/happy-eggs-shop.md new file mode 100644 index 000000000000..0e13c7b40732 --- /dev/null +++ b/.changeset/happy-eggs-shop.md @@ -0,0 +1,5 @@ +--- +"@sveltejs/kit": patch +--- + +fix rest param type generation diff --git a/packages/kit/src/core/sync/write_types.js b/packages/kit/src/core/sync/write_types.js index fe0f2dabf8d4..881ec07c4b9b 100644 --- a/packages/kit/src/core/sync/write_types.js +++ b/packages/kit/src/core/sync/write_types.js @@ -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))) {