@nestia/core 8.0.8 → 9.0.0-dev.20251107

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.
Files changed (75) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +93 -93
  3. package/package.json +7 -8
  4. package/src/adaptors/WebSocketAdaptor.ts +429 -429
  5. package/src/decorators/DynamicModule.ts +44 -44
  6. package/src/decorators/EncryptedBody.ts +97 -97
  7. package/src/decorators/EncryptedController.ts +40 -40
  8. package/src/decorators/EncryptedModule.ts +98 -98
  9. package/src/decorators/EncryptedRoute.ts +213 -213
  10. package/src/decorators/HumanRoute.ts +22 -22
  11. package/src/decorators/NoTransformConfigurationError.ts +34 -34
  12. package/src/decorators/PlainBody.ts +76 -76
  13. package/src/decorators/SwaggerCustomizer.ts +97 -97
  14. package/src/decorators/SwaggerExample.ts +100 -100
  15. package/src/decorators/TypedBody.ts +57 -57
  16. package/src/decorators/TypedException.ts +147 -147
  17. package/src/decorators/TypedFormData.ts +195 -195
  18. package/src/decorators/TypedHeaders.ts +66 -66
  19. package/src/decorators/TypedParam.ts +77 -77
  20. package/src/decorators/TypedQuery.ts +234 -234
  21. package/src/decorators/TypedRoute.ts +196 -196
  22. package/src/decorators/WebSocketRoute.ts +242 -242
  23. package/src/decorators/internal/EncryptedConstant.ts +2 -2
  24. package/src/decorators/internal/IWebSocketRouteReflect.ts +23 -23
  25. package/src/decorators/internal/NoTransformConfigureError.ts +2 -2
  26. package/src/decorators/internal/get_path_and_querify.ts +94 -94
  27. package/src/decorators/internal/get_path_and_stringify.ts +110 -110
  28. package/src/decorators/internal/get_text_body.ts +16 -16
  29. package/src/decorators/internal/headers_to_object.ts +11 -11
  30. package/src/decorators/internal/is_request_body_undefined.ts +12 -12
  31. package/src/decorators/internal/load_controller.ts +45 -45
  32. package/src/decorators/internal/route_error.ts +43 -43
  33. package/src/decorators/internal/validate_request_body.ts +64 -64
  34. package/src/decorators/internal/validate_request_form_data.ts +67 -67
  35. package/src/decorators/internal/validate_request_headers.ts +76 -76
  36. package/src/decorators/internal/validate_request_query.ts +64 -64
  37. package/src/index.ts +5 -5
  38. package/src/module.ts +22 -22
  39. package/src/options/INestiaTransformOptions.ts +38 -38
  40. package/src/options/INestiaTransformProject.ts +8 -8
  41. package/src/options/IRequestBodyValidator.ts +20 -20
  42. package/src/options/IRequestFormDataProps.ts +27 -27
  43. package/src/options/IRequestHeadersValidator.ts +22 -22
  44. package/src/options/IRequestQueryValidator.ts +20 -20
  45. package/src/options/IResponseBodyQuerifier.ts +25 -25
  46. package/src/options/IResponseBodyStringifier.ts +30 -30
  47. package/src/programmers/PlainBodyProgrammer.ts +70 -70
  48. package/src/programmers/TypedBodyProgrammer.ts +142 -142
  49. package/src/programmers/TypedFormDataBodyProgrammer.ts +118 -118
  50. package/src/programmers/TypedHeadersProgrammer.ts +63 -63
  51. package/src/programmers/TypedParamProgrammer.ts +33 -33
  52. package/src/programmers/TypedQueryBodyProgrammer.ts +112 -112
  53. package/src/programmers/TypedQueryProgrammer.ts +114 -114
  54. package/src/programmers/TypedQueryRouteProgrammer.ts +105 -105
  55. package/src/programmers/TypedRouteProgrammer.ts +94 -94
  56. package/src/programmers/http/HttpAssertQuerifyProgrammer.ts +72 -72
  57. package/src/programmers/http/HttpIsQuerifyProgrammer.ts +75 -75
  58. package/src/programmers/http/HttpQuerifyProgrammer.ts +108 -108
  59. package/src/programmers/http/HttpValidateQuerifyProgrammer.ts +76 -76
  60. package/src/programmers/internal/CoreMetadataUtil.ts +21 -21
  61. package/src/transform.ts +35 -35
  62. package/src/transformers/FileTransformer.ts +110 -110
  63. package/src/transformers/MethodTransformer.ts +103 -103
  64. package/src/transformers/NodeTransformer.ts +23 -23
  65. package/src/transformers/ParameterDecoratorTransformer.ts +143 -143
  66. package/src/transformers/ParameterTransformer.ts +57 -57
  67. package/src/transformers/TypedRouteTransformer.ts +85 -85
  68. package/src/transformers/WebSocketRouteTransformer.ts +120 -120
  69. package/src/typings/Creator.ts +3 -3
  70. package/src/typings/get-function-location.d.ts +7 -7
  71. package/src/utils/ArrayUtil.ts +7 -7
  72. package/src/utils/ExceptionManager.ts +115 -115
  73. package/src/utils/Singleton.ts +16 -16
  74. package/src/utils/SourceFinder.ts +54 -54
  75. package/src/utils/VersioningStrategy.ts +27 -27
@@ -1,213 +1,213 @@
1
- import { AesPkcs5 } from "@nestia/fetcher/lib/AesPkcs5";
2
- import { IEncryptionPassword } from "@nestia/fetcher/lib/IEncryptionPassword";
3
- import {
4
- CallHandler,
5
- Delete,
6
- ExecutionContext,
7
- Get,
8
- NestInterceptor,
9
- Patch,
10
- Post,
11
- Put,
12
- UseInterceptors,
13
- applyDecorators,
14
- } from "@nestjs/common";
15
- import { HttpArgumentsHost } from "@nestjs/common/interfaces";
16
- import express from "express";
17
- import { catchError, map } from "rxjs/operators";
18
- import typia from "typia";
19
-
20
- import { IResponseBodyStringifier } from "../options/IResponseBodyStringifier";
21
- import { Singleton } from "../utils/Singleton";
22
- import { TypedRoute } from "./TypedRoute";
23
- import { ENCRYPTION_METADATA_KEY } from "./internal/EncryptedConstant";
24
- import { get_path_and_stringify } from "./internal/get_path_and_stringify";
25
- import { headers_to_object } from "./internal/headers_to_object";
26
- import { route_error } from "./internal/route_error";
27
-
28
- /**
29
- * Encrypted router decorator functions.
30
- *
31
- * `EncryptedRoute` is a module containing router decorator functions which
32
- * encrypts response body data through AES-128/256 encryption. Furthermore, they
33
- * can boost up JSON string conversion speed about 50x times faster than
34
- * `class-transformer`, even type safe through
35
- * [typia](https://github.com/samchon/typia).
36
- *
37
- * For reference, if you try to invalid data that is not following the promised
38
- * type `T`, 500 internal server error would be thrown. Also, as
39
- * `EncryptedRoute` composes JSON string through `typia.assertStringify<T>()`
40
- * function, it is not possible to modify response data through interceptors.
41
- *
42
- * - AES-128/256
43
- * - CBC mode
44
- * - PKCS #5 Padding
45
- * - Base64 Encoding
46
- *
47
- * @author Jeongho Nam - https://github.com/samchon
48
- */
49
- export namespace EncryptedRoute {
50
- /**
51
- * Encrypted router decorator function for the GET method.
52
- *
53
- * @param paths Path(s) of the HTTP request
54
- * @returns Method decorator
55
- */
56
- export const Get = Generator("Get");
57
-
58
- /**
59
- * Encrypted router decorator function for the GET method.
60
- *
61
- * @param paths Path(s) of the HTTP request
62
- * @returns Method decorator
63
- */
64
- export const Post = Generator("Post");
65
-
66
- /**
67
- * Encrypted router decorator function for the PATCH method.
68
- *
69
- * @param path Path of the HTTP request
70
- * @returns Method decorator
71
- */
72
- export const Patch = Generator("Patch");
73
-
74
- /**
75
- * Encrypted router decorator function for the PUT method.
76
- *
77
- * @param path Path of the HTTP request
78
- * @returns Method decorator
79
- */
80
- export const Put = Generator("Put");
81
-
82
- /**
83
- * Encrypted router decorator function for the DELETE method.
84
- *
85
- * @param path Path of the HTTP request
86
- * @returns Method decorator
87
- */
88
- export const Delete = Generator("Delete");
89
-
90
- /**
91
- * Set the logger function for the response validation failure.
92
- *
93
- * If you've configured the transformation option to `validate.log` in the
94
- * `tsconfig.json` file, then the error log information of the response
95
- * validation failure would be logged through this function instead of
96
- * throwing the 400 bad request error.
97
- *
98
- * By the way, be careful. If you've configured the response transformation
99
- * option to be `validate.log`, client may get wrong response data. Therefore,
100
- * this way is not recommended in the common backend server case.
101
- *
102
- * @default console.log
103
- * @param func Logger function
104
- */
105
- export function setValidateErrorLogger(
106
- func: (log: IValidateErrorLog) => void,
107
- ): void {
108
- TypedRoute.setValidateErrorLogger(func);
109
- }
110
-
111
- export import IValidateErrorLog = TypedRoute.IValidateErrorLog;
112
-
113
- /** @internal */
114
- function Generator(method: "Get" | "Post" | "Put" | "Patch" | "Delete") {
115
- function route(path?: string | string[]): MethodDecorator;
116
- function route<T>(
117
- stringify?: IResponseBodyStringifier<T> | null,
118
- ): MethodDecorator;
119
- function route<T>(
120
- path: string | string[],
121
- stringify?: IResponseBodyStringifier<T> | null,
122
- ): MethodDecorator;
123
-
124
- function route(...args: any[]): MethodDecorator {
125
- const [path, stringify] = get_path_and_stringify(
126
- () => TypedRoute.__logger,
127
- )(`EncryptedRoute.${method}`)(...args);
128
- return applyDecorators(
129
- ROUTERS[method](path),
130
- UseInterceptors(new EncryptedRouteInterceptor(method, stringify)),
131
- );
132
- }
133
- return route;
134
- }
135
- }
136
-
137
- for (const method of [
138
- typia.json.isStringify,
139
- typia.json.assertStringify,
140
- typia.json.validateStringify,
141
- typia.json.stringify,
142
- ])
143
- for (const [key, value] of Object.entries(method))
144
- for (const deco of [
145
- EncryptedRoute.Get,
146
- EncryptedRoute.Delete,
147
- EncryptedRoute.Post,
148
- EncryptedRoute.Put,
149
- EncryptedRoute.Patch,
150
- ])
151
- (deco as any)[key] = value;
152
-
153
- /** @internal */
154
- class EncryptedRouteInterceptor implements NestInterceptor {
155
- public constructor(
156
- private readonly method: string,
157
- private readonly stringify: (
158
- input: any,
159
- method: string,
160
- path: string,
161
- ) => string,
162
- ) {}
163
-
164
- public intercept(context: ExecutionContext, next: CallHandler) {
165
- const http: HttpArgumentsHost = context.switchToHttp();
166
- return next.handle().pipe(
167
- map((value) => {
168
- const param:
169
- | IEncryptionPassword
170
- | IEncryptionPassword.Closure
171
- | undefined = Reflect.getMetadata(
172
- ENCRYPTION_METADATA_KEY,
173
- context.getClass(),
174
- );
175
- if (!param)
176
- return Error(
177
- `Error on EncryptedRoute.${this.method}(): no password found.`,
178
- );
179
-
180
- const request: express.Request = http.getRequest();
181
- const headers: Singleton<Record<string, string>> = new Singleton(() =>
182
- headers_to_object(request.headers),
183
- );
184
- const body: string | undefined = this.stringify(
185
- value,
186
- request.method,
187
- request.url,
188
- );
189
- const password: IEncryptionPassword =
190
- typeof param === "function"
191
- ? param({
192
- headers: headers.get(),
193
- body,
194
- direction: "encode",
195
- })
196
- : param;
197
-
198
- if (body === undefined) return body;
199
- return AesPkcs5.encrypt(body, password.key, password.iv);
200
- }),
201
- catchError((err) => route_error(http.getRequest(), err)),
202
- );
203
- }
204
- }
205
-
206
- /** @internal */
207
- const ROUTERS = {
208
- Get,
209
- Post,
210
- Put,
211
- Patch,
212
- Delete,
213
- };
1
+ import { AesPkcs5 } from "@nestia/fetcher/lib/AesPkcs5";
2
+ import { IEncryptionPassword } from "@nestia/fetcher/lib/IEncryptionPassword";
3
+ import {
4
+ CallHandler,
5
+ Delete,
6
+ ExecutionContext,
7
+ Get,
8
+ NestInterceptor,
9
+ Patch,
10
+ Post,
11
+ Put,
12
+ UseInterceptors,
13
+ applyDecorators,
14
+ } from "@nestjs/common";
15
+ import { HttpArgumentsHost } from "@nestjs/common/interfaces";
16
+ import express from "express";
17
+ import { catchError, map } from "rxjs/operators";
18
+ import typia from "typia";
19
+
20
+ import { IResponseBodyStringifier } from "../options/IResponseBodyStringifier";
21
+ import { Singleton } from "../utils/Singleton";
22
+ import { TypedRoute } from "./TypedRoute";
23
+ import { ENCRYPTION_METADATA_KEY } from "./internal/EncryptedConstant";
24
+ import { get_path_and_stringify } from "./internal/get_path_and_stringify";
25
+ import { headers_to_object } from "./internal/headers_to_object";
26
+ import { route_error } from "./internal/route_error";
27
+
28
+ /**
29
+ * Encrypted router decorator functions.
30
+ *
31
+ * `EncryptedRoute` is a module containing router decorator functions which
32
+ * encrypts response body data through AES-128/256 encryption. Furthermore, they
33
+ * can boost up JSON string conversion speed about 50x times faster than
34
+ * `class-transformer`, even type safe through
35
+ * [typia](https://github.com/samchon/typia).
36
+ *
37
+ * For reference, if you try to invalid data that is not following the promised
38
+ * type `T`, 500 internal server error would be thrown. Also, as
39
+ * `EncryptedRoute` composes JSON string through `typia.assertStringify<T>()`
40
+ * function, it is not possible to modify response data through interceptors.
41
+ *
42
+ * - AES-128/256
43
+ * - CBC mode
44
+ * - PKCS #5 Padding
45
+ * - Base64 Encoding
46
+ *
47
+ * @author Jeongho Nam - https://github.com/samchon
48
+ */
49
+ export namespace EncryptedRoute {
50
+ /**
51
+ * Encrypted router decorator function for the GET method.
52
+ *
53
+ * @param paths Path(s) of the HTTP request
54
+ * @returns Method decorator
55
+ */
56
+ export const Get = Generator("Get");
57
+
58
+ /**
59
+ * Encrypted router decorator function for the GET method.
60
+ *
61
+ * @param paths Path(s) of the HTTP request
62
+ * @returns Method decorator
63
+ */
64
+ export const Post = Generator("Post");
65
+
66
+ /**
67
+ * Encrypted router decorator function for the PATCH method.
68
+ *
69
+ * @param path Path of the HTTP request
70
+ * @returns Method decorator
71
+ */
72
+ export const Patch = Generator("Patch");
73
+
74
+ /**
75
+ * Encrypted router decorator function for the PUT method.
76
+ *
77
+ * @param path Path of the HTTP request
78
+ * @returns Method decorator
79
+ */
80
+ export const Put = Generator("Put");
81
+
82
+ /**
83
+ * Encrypted router decorator function for the DELETE method.
84
+ *
85
+ * @param path Path of the HTTP request
86
+ * @returns Method decorator
87
+ */
88
+ export const Delete = Generator("Delete");
89
+
90
+ /**
91
+ * Set the logger function for the response validation failure.
92
+ *
93
+ * If you've configured the transformation option to `validate.log` in the
94
+ * `tsconfig.json` file, then the error log information of the response
95
+ * validation failure would be logged through this function instead of
96
+ * throwing the 400 bad request error.
97
+ *
98
+ * By the way, be careful. If you've configured the response transformation
99
+ * option to be `validate.log`, client may get wrong response data. Therefore,
100
+ * this way is not recommended in the common backend server case.
101
+ *
102
+ * @default console.log
103
+ * @param func Logger function
104
+ */
105
+ export function setValidateErrorLogger(
106
+ func: (log: IValidateErrorLog) => void,
107
+ ): void {
108
+ TypedRoute.setValidateErrorLogger(func);
109
+ }
110
+
111
+ export import IValidateErrorLog = TypedRoute.IValidateErrorLog;
112
+
113
+ /** @internal */
114
+ function Generator(method: "Get" | "Post" | "Put" | "Patch" | "Delete") {
115
+ function route(path?: string | string[]): MethodDecorator;
116
+ function route<T>(
117
+ stringify?: IResponseBodyStringifier<T> | null,
118
+ ): MethodDecorator;
119
+ function route<T>(
120
+ path: string | string[],
121
+ stringify?: IResponseBodyStringifier<T> | null,
122
+ ): MethodDecorator;
123
+
124
+ function route(...args: any[]): MethodDecorator {
125
+ const [path, stringify] = get_path_and_stringify(
126
+ () => TypedRoute.__logger,
127
+ )(`EncryptedRoute.${method}`)(...args);
128
+ return applyDecorators(
129
+ ROUTERS[method](path),
130
+ UseInterceptors(new EncryptedRouteInterceptor(method, stringify)),
131
+ );
132
+ }
133
+ return route;
134
+ }
135
+ }
136
+
137
+ for (const method of [
138
+ typia.json.isStringify,
139
+ typia.json.assertStringify,
140
+ typia.json.validateStringify,
141
+ typia.json.stringify,
142
+ ])
143
+ for (const [key, value] of Object.entries(method))
144
+ for (const deco of [
145
+ EncryptedRoute.Get,
146
+ EncryptedRoute.Delete,
147
+ EncryptedRoute.Post,
148
+ EncryptedRoute.Put,
149
+ EncryptedRoute.Patch,
150
+ ])
151
+ (deco as any)[key] = value;
152
+
153
+ /** @internal */
154
+ class EncryptedRouteInterceptor implements NestInterceptor {
155
+ public constructor(
156
+ private readonly method: string,
157
+ private readonly stringify: (
158
+ input: any,
159
+ method: string,
160
+ path: string,
161
+ ) => string,
162
+ ) {}
163
+
164
+ public intercept(context: ExecutionContext, next: CallHandler) {
165
+ const http: HttpArgumentsHost = context.switchToHttp();
166
+ return next.handle().pipe(
167
+ map((value) => {
168
+ const param:
169
+ | IEncryptionPassword
170
+ | IEncryptionPassword.Closure
171
+ | undefined = Reflect.getMetadata(
172
+ ENCRYPTION_METADATA_KEY,
173
+ context.getClass(),
174
+ );
175
+ if (!param)
176
+ return Error(
177
+ `Error on EncryptedRoute.${this.method}(): no password found.`,
178
+ );
179
+
180
+ const request: express.Request = http.getRequest();
181
+ const headers: Singleton<Record<string, string>> = new Singleton(() =>
182
+ headers_to_object(request.headers),
183
+ );
184
+ const body: string | undefined = this.stringify(
185
+ value,
186
+ request.method,
187
+ request.url,
188
+ );
189
+ const password: IEncryptionPassword =
190
+ typeof param === "function"
191
+ ? param({
192
+ headers: headers.get(),
193
+ body,
194
+ direction: "encode",
195
+ })
196
+ : param;
197
+
198
+ if (body === undefined) return body;
199
+ return AesPkcs5.encrypt(body, password.key, password.iv);
200
+ }),
201
+ catchError((err) => route_error(http.getRequest(), err)),
202
+ );
203
+ }
204
+ }
205
+
206
+ /** @internal */
207
+ const ROUTERS = {
208
+ Get,
209
+ Post,
210
+ Put,
211
+ Patch,
212
+ Delete,
213
+ };
@@ -1,22 +1,22 @@
1
- import { SwaggerCustomizer } from "./SwaggerCustomizer";
2
-
3
- /**
4
- * Human only API marking.
5
- *
6
- * This decorator marks the API for human only, so that LLM function calling
7
- * schema composer (of [`@samchon/openapi`](https://github.com/samchon/openapi))
8
- * excludes the API.
9
- *
10
- * In other words, if you adjust the `@HumanRoute()` decorator to the API, the
11
- * API never participates in the LLM function calling. When calling the
12
- * {@link HttpLlm.application} function, matched {@link IHttpLlmFunction} data
13
- * never be composed.
14
- *
15
- * @author Jeongho Nam - https://github.com/samchon
16
- * @returns Method decorator
17
- */
18
- export function HumanRoute(): MethodDecorator {
19
- return SwaggerCustomizer((props) => {
20
- props.route["x-samchon-human"] = true;
21
- });
22
- }
1
+ import { SwaggerCustomizer } from "./SwaggerCustomizer";
2
+
3
+ /**
4
+ * Human only API marking.
5
+ *
6
+ * This decorator marks the API for human only, so that LLM function calling
7
+ * schema composer (of [`@samchon/openapi`](https://github.com/samchon/openapi))
8
+ * excludes the API.
9
+ *
10
+ * In other words, if you adjust the `@HumanRoute()` decorator to the API, the
11
+ * API never participates in the LLM function calling. When calling the
12
+ * {@link HttpLlm.application} function, matched {@link IHttpLlmFunction} data
13
+ * never be composed.
14
+ *
15
+ * @author Jeongho Nam - https://github.com/samchon
16
+ * @returns Method decorator
17
+ */
18
+ export function HumanRoute(): MethodDecorator {
19
+ return SwaggerCustomizer((props) => {
20
+ props.route["x-samchon-human"] = true;
21
+ });
22
+ }
@@ -1,34 +1,34 @@
1
- export function NoTransformConfigurationError(method: string) {
2
- if (NoTransformConfigurationError.throws === true)
3
- throw new Error(
4
- [
5
- `Error on nestia.core.${method}(): no transform has been configured.`,
6
- `Run "npx typia setup" command, or check if you're using non-standard TypeScript compiler like Babel or SWC.`,
7
- `Otherwise you're running "npx nestia sdk/swagger" or similar, run "npx tsc" command to find the reason why.`,
8
- ].join(" "),
9
- );
10
- return undefined as never;
11
- }
12
- export namespace NoTransformConfigurationError {
13
- /**
14
- * Whether to throw an error or not.
15
- *
16
- * If you set this value to `false`, {@link NoTransformConfigurationError} will
17
- * not throw an error.
18
- *
19
- * Even if you've not configured the plugin transformer of `tsconfig.json`
20
- * file, the error will not be thrown and the program will be continued.
21
- * Instead, every validations and assertions will be skipped and the value
22
- * will be returned as it is. Furthermore, unexpected behaviors may occur.
23
- *
24
- * Therefore, it is not recommended to set this value to `false` in production
25
- * environment. Configure this value to be `false` only when you're debugging
26
- * or testing.
27
- *
28
- * By the way, if you hope the `false` value to be set, you have to do it
29
- * before the first. If you configure the `false` value after the
30
- * `@nestia/core` decorator functions are composed, the value will not be
31
- * applied and the error will be thrown.
32
- */
33
- export let throws = true;
34
- }
1
+ export function NoTransformConfigurationError(method: string) {
2
+ if (NoTransformConfigurationError.throws === true)
3
+ throw new Error(
4
+ [
5
+ `Error on nestia.core.${method}(): no transform has been configured.`,
6
+ `Run "npx typia setup" command, or check if you're using non-standard TypeScript compiler like Babel or SWC.`,
7
+ `Otherwise you're running "npx nestia sdk/swagger" or similar, run "npx tsc" command to find the reason why.`,
8
+ ].join(" "),
9
+ );
10
+ return undefined as never;
11
+ }
12
+ export namespace NoTransformConfigurationError {
13
+ /**
14
+ * Whether to throw an error or not.
15
+ *
16
+ * If you set this value to `false`, {@link NoTransformConfigurationError} will
17
+ * not throw an error.
18
+ *
19
+ * Even if you've not configured the plugin transformer of `tsconfig.json`
20
+ * file, the error will not be thrown and the program will be continued.
21
+ * Instead, every validations and assertions will be skipped and the value
22
+ * will be returned as it is. Furthermore, unexpected behaviors may occur.
23
+ *
24
+ * Therefore, it is not recommended to set this value to `false` in production
25
+ * environment. Configure this value to be `false` only when you're debugging
26
+ * or testing.
27
+ *
28
+ * By the way, if you hope the `false` value to be set, you have to do it
29
+ * before the first. If you configure the `false` value after the
30
+ * `@nestia/core` decorator functions are composed, the value will not be
31
+ * applied and the error will be thrown.
32
+ */
33
+ export let throws = true;
34
+ }