@nestia/e2e 7.4.0 → 8.0.0-dev.20250829-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,93 +1,93 @@
1
- # Nestia
2
- ![Nestia Logo](https://nestia.io/logo.png)
3
-
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
- [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
- [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
- [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
- [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://nestia.io/docs/)
9
- [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/nestia)
10
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
-
12
- Nestia is a set of helper libraries for NestJS, supporting below features:
13
-
14
- - `@nestia/core`:
15
- - Super-fast/easy decorators
16
- - Advanced WebSocket routes
17
- - `@nestia/sdk`:
18
- - Swagger generator, more evolved than ever
19
- - SDK library generator for clients
20
- - Mockup Simulator for client applications
21
- - Automatic E2E test functions generator
22
- - `@nestia/e2e`: Test program utilizing e2e test functions
23
- - `@nestia/benchmark`: Benchmark program using e2e test functions
24
- - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
25
- - [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
- - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
- - `nestia`: Just CLI (command line interface) tool
28
-
29
- > [!NOTE]
30
- >
31
- > - **Only one line** required, with pure TypeScript type
32
- > - Enhance performance **30x** up
33
- > - Runtime validator is **20,000x faster** than `class-validator`
34
- > - JSON serialization is **200x faster** than `class-transformer`
35
- > - Software Development Kit
36
- > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
- > - Mockup simulator means embedded backend simulator in the SDK
38
- > - similar with [msw](https://mswjs.io/), but fully automated
39
-
40
- ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
-
42
- > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
-
44
-
45
-
46
-
47
- ## Sponsors and Backers
48
- Thanks for your support.
49
-
50
- Your donation would encourage `nestia` development.
51
-
52
- [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
-
54
-
55
-
56
-
57
- ## Guide Documents
58
- Check out the document in the [website](https://nestia.io/docs/):
59
-
60
- ### 🏠 Home
61
- - [Introduction](https://nestia.io/docs/)
62
- - [Setup](https://nestia.io/docs/setup/)
63
- - [Pure TypeScript](https://nestia.io/docs/pure)
64
-
65
- ### 📖 Features
66
- - Core Library
67
- - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
- - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
- - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
- - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
- - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
- - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
- - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
- - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
- - Software Development Kit
76
- - [SDK Builder](https://nestia.io/docs/sdk/)
77
- - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
- - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
- - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
- - Swagger Document
81
- - [Swagger Builder](https://nestia.io/docs/swagger/)
82
- - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
- - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
- - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
- - E2E Testing
86
- - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
- - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
- - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
-
90
- ### 🔗 Appendix
91
- - [API Documents](https://nestia.io/api)
92
- - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
- - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
1
+ # Nestia
2
+ ![Nestia Logo](https://nestia.io/logo.png)
3
+
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
+ [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
+ [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://nestia.io/docs/)
9
+ [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/nestia)
10
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
+
12
+ Nestia is a set of helper libraries for NestJS, supporting below features:
13
+
14
+ - `@nestia/core`:
15
+ - Super-fast/easy decorators
16
+ - Advanced WebSocket routes
17
+ - `@nestia/sdk`:
18
+ - Swagger generator, more evolved than ever
19
+ - SDK library generator for clients
20
+ - Mockup Simulator for client applications
21
+ - Automatic E2E test functions generator
22
+ - `@nestia/e2e`: Test program utilizing e2e test functions
23
+ - `@nestia/benchmark`: Benchmark program using e2e test functions
24
+ - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
25
+ - [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
+ - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
+ - `nestia`: Just CLI (command line interface) tool
28
+
29
+ > [!NOTE]
30
+ >
31
+ > - **Only one line** required, with pure TypeScript type
32
+ > - Enhance performance **30x** up
33
+ > - Runtime validator is **20,000x faster** than `class-validator`
34
+ > - JSON serialization is **200x faster** than `class-transformer`
35
+ > - Software Development Kit
36
+ > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
+ > - Mockup simulator means embedded backend simulator in the SDK
38
+ > - similar with [msw](https://mswjs.io/), but fully automated
39
+
40
+ ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
+
42
+ > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
+
44
+
45
+
46
+
47
+ ## Sponsors and Backers
48
+ Thanks for your support.
49
+
50
+ Your donation would encourage `nestia` development.
51
+
52
+ [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
+
54
+
55
+
56
+
57
+ ## Guide Documents
58
+ Check out the document in the [website](https://nestia.io/docs/):
59
+
60
+ ### 🏠 Home
61
+ - [Introduction](https://nestia.io/docs/)
62
+ - [Setup](https://nestia.io/docs/setup/)
63
+ - [Pure TypeScript](https://nestia.io/docs/pure)
64
+
65
+ ### 📖 Features
66
+ - Core Library
67
+ - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
+ - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
+ - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
+ - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
+ - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
+ - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
+ - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
+ - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
+ - Software Development Kit
76
+ - [SDK Builder](https://nestia.io/docs/sdk/)
77
+ - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
+ - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
+ - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
+ - Swagger Document
81
+ - [Swagger Builder](https://nestia.io/docs/swagger/)
82
+ - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
+ - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
+ - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
+ - E2E Testing
86
+ - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
+ - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
+ - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
+
90
+ ### 🔗 Appendix
91
+ - [API Documents](https://nestia.io/api)
92
+ - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * This namespace contains utility functions for array operations including
5
5
  * asynchronous processing, filtering, mapping, and repetition tasks implemented
6
- * in functional programming style. All functions are implemented using currying
7
- * to enhance reusability and composability.
6
+ * in functional programming style. Functions use direct parameter passing for
7
+ * simplicity while maintaining functional programming principles.
8
8
  *
9
9
  * @author Jeongho Nam - https://github.com/samchon
10
10
  * @example
11
11
  * ```typescript
12
12
  * // Asynchronous filtering example
13
13
  * const numbers = [1, 2, 3, 4, 5];
14
- * const evenNumbers = await ArrayUtil.asyncFilter(numbers)(
14
+ * const evenNumbers = await ArrayUtil.asyncFilter(numbers,
15
15
  * async (num) => num % 2 === 0
16
16
  * );
17
17
  * console.log(evenNumbers); // [2, 4]
@@ -22,9 +22,9 @@ export declare namespace ArrayUtil {
22
22
  * Filters an array by applying an asynchronous predicate function to each
23
23
  * element.
24
24
  *
25
- * This function is implemented in curried form, first taking an array and
26
- * then a predicate function. Elements are processed sequentially, ensuring
27
- * order is maintained.
25
+ * Elements are processed sequentially, ensuring order is maintained. The
26
+ * predicate function receives the element, index, and the full array as
27
+ * parameters.
28
28
  *
29
29
  * @example
30
30
  * ```typescript
@@ -34,7 +34,7 @@ export declare namespace ArrayUtil {
34
34
  * { id: 3, name: 'Charlie', active: true }
35
35
  * ];
36
36
  *
37
- * const activeUsers = await ArrayUtil.asyncFilter(users)(
37
+ * const activeUsers = await ArrayUtil.asyncFilter(users,
38
38
  * async (user) => {
39
39
  * // Async validation logic (e.g., API call)
40
40
  * await new Promise(resolve => setTimeout(resolve, 100));
@@ -46,10 +46,10 @@ export declare namespace ArrayUtil {
46
46
  *
47
47
  * @template Input - The type of elements in the input array
48
48
  * @param elements - The readonly array to filter
49
- * @returns A function that takes a predicate and returns a Promise resolving
50
- * to the filtered array
49
+ * @param pred - The asynchronous predicate function to test each element
50
+ * @returns A Promise resolving to the filtered array
51
51
  */
52
- const asyncFilter: <Input>(elements: readonly Input[]) => (pred: (elem: Input, index: number, array: readonly Input[]) => Promise<boolean>) => Promise<Input[]>;
52
+ const asyncFilter: <Input>(elements: readonly Input[], pred: (elem: Input, index: number, array: readonly Input[]) => Promise<boolean>) => Promise<Input[]>;
53
53
  /**
54
54
  * Executes an asynchronous function for each element in an array
55
55
  * sequentially.
@@ -63,7 +63,7 @@ export declare namespace ArrayUtil {
63
63
  * ```typescript
64
64
  * const urls = ['url1', 'url2', 'url3'];
65
65
  *
66
- * await ArrayUtil.asyncForEach(urls)(async (url, index) => {
66
+ * await ArrayUtil.asyncForEach(urls, async (url, index) => {
67
67
  * console.log(`Processing ${index}: ${url}`);
68
68
  * const data = await fetch(url);
69
69
  * await processData(data);
@@ -74,16 +74,18 @@ export declare namespace ArrayUtil {
74
74
  *
75
75
  * @template Input - The type of elements in the input array
76
76
  * @param elements - The readonly array to process
77
- * @returns A function that takes an async closure and returns a Promise<void>
77
+ * @param closure - The asynchronous function to execute for each element
78
+ * @returns A Promise<void> that resolves when all operations complete
78
79
  */
79
- const asyncForEach: <Input>(elements: readonly Input[]) => (closure: (elem: Input, index: number, array: readonly Input[]) => Promise<any>) => Promise<void>;
80
+ const asyncForEach: <Input>(elements: readonly Input[], closure: (elem: Input, index: number, array: readonly Input[]) => Promise<any>) => Promise<void>;
80
81
  /**
81
82
  * Transforms each element of an array using an asynchronous function to
82
83
  * create a new array.
83
84
  *
84
85
  * Similar to JavaScript's native map but processes asynchronous functions
85
86
  * sequentially. Each element's transformation is completed before proceeding
86
- * to the next element, ensuring order is maintained.
87
+ * to the next element, ensuring order is maintained. This function still
88
+ * maintains the currying pattern for composition.
87
89
  *
88
90
  * @example
89
91
  * ```typescript
@@ -100,12 +102,11 @@ export declare namespace ArrayUtil {
100
102
  * ```
101
103
  *
102
104
  * @template Input - The type of elements in the input array
103
- * @template Output - The type of elements in the output array
104
105
  * @param elements - The readonly array to transform
105
106
  * @returns A function that takes a transformation function and returns a
106
107
  * Promise resolving to the transformed array
107
108
  */
108
- const asyncMap: <Input>(elements: readonly Input[]) => <Output>(closure: (elem: Input, index: number, array: readonly Input[]) => Promise<Output>) => Promise<Output[]>;
109
+ const asyncMap: <Input, Output>(elements: readonly Input[], closure: (elem: Input, index: number, array: readonly Input[]) => Promise<Output>) => Promise<Output[]>;
109
110
  /**
110
111
  * Executes an asynchronous function a specified number of times sequentially.
111
112
  *
@@ -116,7 +117,7 @@ export declare namespace ArrayUtil {
116
117
  * @example
117
118
  * ```typescript
118
119
  * // Generate random data 5 times
119
- * const randomData = await ArrayUtil.asyncRepeat(5)(async (index) => {
120
+ * const randomData = await ArrayUtil.asyncRepeat(5, async (index) => {
120
121
  * await new Promise(resolve => setTimeout(resolve, 100)); // Wait 0.1 seconds
121
122
  * return {
122
123
  * id: index,
@@ -127,17 +128,17 @@ export declare namespace ArrayUtil {
127
128
  * console.log('Generated data:', randomData);
128
129
  * ```;
129
130
  *
131
+ * @template T - The type of the result from each execution
130
132
  * @param count - The number of times to repeat (non-negative integer)
131
- * @returns A function that takes an async closure and returns a Promise
132
- * resolving to an array of results
133
+ * @param closure - The asynchronous function to execute repeatedly
134
+ * @returns A Promise resolving to an array of results
133
135
  */
134
- const asyncRepeat: (count: number) => <T>(closure: (index: number) => Promise<T>) => Promise<T[]>;
136
+ const asyncRepeat: <T>(count: number, closure: (index: number) => Promise<T>) => Promise<T[]>;
135
137
  /**
136
138
  * Checks if at least one element in the array satisfies the given condition.
137
139
  *
138
- * Similar to JavaScript's native some() method but implemented in curried
139
- * form for better compatibility with functional programming style. Returns
140
- * true immediately when the first element satisfying the condition is found.
140
+ * Similar to JavaScript's native some() method. Returns true immediately when
141
+ * the first element satisfying the condition is found.
141
142
  *
142
143
  * @example
143
144
  * ```typescript
@@ -148,21 +149,22 @@ export declare namespace ArrayUtil {
148
149
  * { name: 'Orange', price: 80, inStock: true }
149
150
  * ];
150
151
  *
151
- * const hasEvenNumber = ArrayUtil.has(numbers)(num => num % 2 === 0);
152
+ * const hasEvenNumber = ArrayUtil.has(numbers, num => num % 2 === 0);
152
153
  * console.log(hasEvenNumber); // true (8 exists)
153
154
  *
154
- * const hasExpensiveItem = ArrayUtil.has(products)(product => product.price > 90);
155
+ * const hasExpensiveItem = ArrayUtil.has(products, product => product.price > 90);
155
156
  * console.log(hasExpensiveItem); // true (Apple costs 100)
156
157
  *
157
- * const hasOutOfStock = ArrayUtil.has(products)(product => !product.inStock);
158
+ * const hasOutOfStock = ArrayUtil.has(products, product => !product.inStock);
158
159
  * console.log(hasOutOfStock); // true (Banana is out of stock)
159
160
  * ```;
160
161
  *
161
162
  * @template T - The type of elements in the array
162
163
  * @param elements - The readonly array to check
163
- * @returns A function that takes a predicate and returns a boolean
164
+ * @param pred - The predicate function to test elements
165
+ * @returns Boolean indicating if any element satisfies the condition
164
166
  */
165
- const has: <T>(elements: readonly T[]) => (pred: (elem: T) => boolean) => boolean;
167
+ const has: <T>(elements: readonly T[], pred: (elem: T) => boolean) => boolean;
166
168
  /**
167
169
  * Executes a function a specified number of times and collects the results
168
170
  * into an array.
@@ -173,11 +175,11 @@ export declare namespace ArrayUtil {
173
175
  * @example
174
176
  * ```typescript
175
177
  * // Generate an array of squares from 1 to 5
176
- * const squares = ArrayUtil.repeat(5)(index => (index + 1) ** 2);
178
+ * const squares = ArrayUtil.repeat(5, index => (index + 1) ** 2);
177
179
  * console.log(squares); // [1, 4, 9, 16, 25]
178
180
  *
179
181
  * // Generate an array of default user objects
180
- * const users = ArrayUtil.repeat(3)(index => ({
182
+ * const users = ArrayUtil.repeat(3, index => ({
181
183
  * id: index + 1,
182
184
  * name: `User${index + 1}`,
183
185
  * email: `user${index + 1}@example.com`
@@ -190,10 +192,12 @@ export declare namespace ArrayUtil {
190
192
  * // ]
191
193
  * ```
192
194
  *
195
+ * @template T - The type of the result from each execution
193
196
  * @param count - The number of times to repeat (non-negative integer)
194
- * @returns A function that takes a closure and returns an array of results
197
+ * @param closure - The function to execute repeatedly
198
+ * @returns An array of results
195
199
  */
196
- const repeat: (count: number) => <T>(closure: (index: number) => T) => T[];
200
+ const repeat: <T>(count: number, closure: (index: number) => T) => T[];
197
201
  /**
198
202
  * Generates all possible subsets of a given array.
199
203
  *