Skip to content

Commit 1dd3287

Browse files
committed
Adapt @samchon/[email protected].
Bump up `@samchon/openapi` version, and adapt its function name prohibition rule in the compilation level.
1 parent 2d0ec1c commit 1dd3287

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typia",
3-
"version": "7.4.2",
3+
"version": "7.5.0",
44
"description": "Superfast runtime validators with only one line",
55
"main": "lib/index.js",
66
"typings": "lib/index.d.ts",
@@ -41,7 +41,7 @@
4141
},
4242
"homepage": "https://typia.io",
4343
"dependencies": {
44-
"@samchon/openapi": "^2.2.1",
44+
"@samchon/openapi": "^2.3.0",
4545
"commander": "^10.0.0",
4646
"comment-json": "^4.2.3",
4747
"inquirer": "^8.2.5",
@@ -50,7 +50,7 @@
5050
},
5151
"peerDependencies": {
5252
"typescript": ">=4.8.0 <5.8.0",
53-
"@samchon/openapi": ">=2.2.1 <3.0.0"
53+
"@samchon/openapi": ">=2.3.0 <3.0.0"
5454
},
5555
"devDependencies": {
5656
"@rollup/plugin-commonjs": "^26.0.1",

packages/typescript-json/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-json",
3-
"version": "7.4.2-dev.20241217",
3+
"version": "7.5.0-dev.20241218",
44
"description": "Superfast runtime validators with only one line",
55
"main": "lib/index.js",
66
"typings": "lib/index.d.ts",
@@ -37,11 +37,11 @@
3737
},
3838
"homepage": "https://typia.io",
3939
"dependencies": {
40-
"typia": "7.4.2-dev.20241217"
40+
"typia": "7.5.0-dev.20241218"
4141
},
4242
"peerDependencies": {
4343
"typescript": ">=4.8.0 <5.8.0",
44-
"@samchon/openapi": ">=2.2.1 <3.0.0"
44+
"@samchon/openapi": ">=2.3.0-dev.20241218 <3.0.0"
4545
},
4646
"stackblitz": {
4747
"startCommand": "npm install && npm run test"

src/programmers/llm/LlmApplicationProgrammer.ts

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ export namespace LlmApplicationProgrammer {
9595
output.push(
9696
`${prefix}'s return type must not be union type with undefined.`,
9797
);
98+
if (/^[0-9]/.test(name[0] ?? "") === true)
99+
output.push(`name must not start with a number`);
100+
if (/^[a-zA-Z0-9_-]+$/.test(name) === false)
101+
output.push(`name must be alphanumeric with underscore`);
98102
if (func.parameters.length !== 1)
99103
output.push(`${prefix} must have a single parameter.`);
100104
if (func.parameters.length !== 0) {
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import typia from "typia";
2+
3+
// APPLICATION FUNCTION
4+
typia.llm.application<
5+
{
6+
"0create"(p: {}): void;
7+
},
8+
"chatgpt"
9+
>();
10+
typia.llm.application<
11+
{
12+
"a.b.c"(p: {}): void;
13+
},
14+
"chatgpt"
15+
>();
16+
typia.llm.application<
17+
{
18+
"&x"(p: {}): void;
19+
},
20+
"chatgpt"
21+
>();
22+
23+
// APPLICATION-OF-VALIDATE
24+
typia.llm.applicationOfValidate<
25+
{
26+
"0create"(p: {}): void;
27+
},
28+
"chatgpt"
29+
>();
30+
typia.llm.applicationOfValidate<
31+
{
32+
"a.b.c"(p: {}): void;
33+
},
34+
"chatgpt"
35+
>();
36+
typia.llm.applicationOfValidate<
37+
{
38+
"&x"(p: {}): void;
39+
},
40+
"chatgpt"
41+
>();

0 commit comments

Comments
 (0)