typia 6.9.0 → 6.10.0-dev.20240823

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.
@@ -1,16 +1,22 @@
1
- import type { OpenApi, OpenApiV3 } from "@samchon/openapi";
2
-
3
- export type IJsonApplication<Version extends "3.0" | "3.1" = "3.1"> =
4
- Version extends "3.0" ? IJsonApplication.IV3_0 : IJsonApplication.IV3_1;
5
- export namespace IJsonApplication {
6
- export interface IV3_0 {
7
- version: "3.0";
8
- schemas: OpenApiV3.IJsonSchema[];
9
- components: OpenApiV3.IComponents;
10
- }
11
- export interface IV3_1 {
12
- version: "3.1";
13
- components: OpenApi.IComponents;
14
- schemas: OpenApi.IJsonSchema[];
15
- }
16
- }
1
+ import type { OpenApi, OpenApiV3 } from "@samchon/openapi";
2
+
3
+ export type IJsonApplication<
4
+ Version extends "3.0" | "3.1" = "3.1",
5
+ Types = unknown[],
6
+ > = Version extends "3.0"
7
+ ? IJsonApplication.IV3_0<Types>
8
+ : IJsonApplication.IV3_1<Types>;
9
+ export namespace IJsonApplication {
10
+ export interface IV3_0<Types = unknown[]> {
11
+ version: "3.0";
12
+ schemas: OpenApiV3.IJsonSchema[];
13
+ components: OpenApiV3.IComponents;
14
+ __types?: Types | undefined;
15
+ }
16
+ export interface IV3_1<Types = unknown[]> {
17
+ version: "3.1";
18
+ components: OpenApi.IComponents;
19
+ schemas: OpenApi.IJsonSchema[];
20
+ __types?: Types | undefined;
21
+ }
22
+ }
@@ -1,46 +1,46 @@
1
- export namespace Escaper {
2
- export const variable = (str: string): boolean =>
3
- reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);
4
-
5
- export const reserved = (str: string): boolean => RESERVED.has(str);
6
- }
7
-
8
- const RESERVED: Set<string> = new Set([
9
- "break",
10
- "case",
11
- "catch",
12
- "class",
13
- "const",
14
- "continue",
15
- "debugger",
16
- "default",
17
- "delete",
18
- "do",
19
- "else",
20
- "enum",
21
- "export",
22
- "extends",
23
- "false",
24
- "finally",
25
- "for",
26
- "function",
27
- "if",
28
- "import",
29
- "in",
30
- "instanceof",
31
- "new",
32
- "null",
33
- "package",
34
- "return",
35
- "super",
36
- "switch",
37
- "this",
38
- "throw",
39
- "true",
40
- "try",
41
- "typeof",
42
- "var",
43
- "void",
44
- "while",
45
- "with",
46
- ]);
1
+ export namespace Escaper {
2
+ export const variable = (str: string): boolean =>
3
+ reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);
4
+
5
+ export const reserved = (str: string): boolean => RESERVED.has(str);
6
+ }
7
+
8
+ const RESERVED: Set<string> = new Set([
9
+ "break",
10
+ "case",
11
+ "catch",
12
+ "class",
13
+ "const",
14
+ "continue",
15
+ "debugger",
16
+ "default",
17
+ "delete",
18
+ "do",
19
+ "else",
20
+ "enum",
21
+ "export",
22
+ "extends",
23
+ "false",
24
+ "finally",
25
+ "for",
26
+ "function",
27
+ "if",
28
+ "import",
29
+ "in",
30
+ "instanceof",
31
+ "new",
32
+ "null",
33
+ "package",
34
+ "return",
35
+ "super",
36
+ "switch",
37
+ "this",
38
+ "throw",
39
+ "true",
40
+ "try",
41
+ "typeof",
42
+ "var",
43
+ "void",
44
+ "while",
45
+ "with",
46
+ ]);