From 842275cf35756b82883b0f6df22ecb6817afdcac Mon Sep 17 00:00:00 2001 From: Billy Janitsch Date: Wed, 27 Nov 2024 10:28:05 -0500 Subject: [PATCH] Add fixtures --- fixtures/dom-iterable.tsx | 6 ++++++ fixtures/es2024.tsx | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 fixtures/dom-iterable.tsx create mode 100644 fixtures/es2024.tsx diff --git a/fixtures/dom-iterable.tsx b/fixtures/dom-iterable.tsx new file mode 100644 index 0000000..1deeac8 --- /dev/null +++ b/fixtures/dom-iterable.tsx @@ -0,0 +1,6 @@ +const formData = new FormData() +formData.set('name', 'Aliza') + +for (const [key, value] of formData) { + console.log(key, value) +} diff --git a/fixtures/es2024.tsx b/fixtures/es2024.tsx new file mode 100644 index 0000000..3de70cf --- /dev/null +++ b/fixtures/es2024.tsx @@ -0,0 +1,14 @@ +interface Item { + name: string + type: 'fruit' | 'vegetable' +} + +const produce: Item[] = [ + {name: 'apple', type: 'fruit'}, + {name: 'banana', type: 'fruit'}, + {name: 'carrot', type: 'vegetable'}, +] + +const result = Map.groupBy(produce, (item) => item.type) + +console.log(result.get('fruit'))