From fa28c44736f473f6dd35bcd0b85530f646a2fa53 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Wed, 16 Mar 2022 17:35:31 -0300 Subject: [PATCH 1/2] fix rest param type generation --- packages/kit/src/core/sync/write_types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) { From 0964c28905231dc01f757d819cf3879ddac498bd Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 16 Mar 2022 18:33:37 -0400 Subject: [PATCH 2/2] Create happy-eggs-shop.md --- .changeset/happy-eggs-shop.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/happy-eggs-shop.md 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