-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/samchon/typia into featur…
…e/keyword
- Loading branch information
Showing
12 changed files
with
2,018 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ILlmApplication } from "@samchon/openapi"; | ||
import typia from "typia"; | ||
|
||
interface ICalculator { | ||
/** | ||
* @deprecated | ||
*/ | ||
plus(x: number, y: number): number; | ||
|
||
/** | ||
* @tag arithmetic | ||
* @tag mathmatics | ||
* @tag something for nothing | ||
*/ | ||
minus(x: number, y: number): number; | ||
} | ||
|
||
const app: ILlmApplication = typia.llm.application<ICalculator>(); | ||
console.log(app.functions[1]?.tags); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { TagBase } from "./TagBase"; | ||
|
||
export type Example< | ||
Value extends boolean | bigint | number | string | Array<unknown> | null, | ||
> = TagBase<{ | ||
target: "boolean" | "bigint" | "number" | "string" | "array"; | ||
kind: "example"; | ||
value: Value; | ||
exclusive: true; | ||
schema: Value extends bigint | ||
? { example: Numeric<Value> } | ||
: { example: Value }; | ||
}>; | ||
|
||
type Numeric<T extends bigint> = `${T}` extends `${infer N extends number}` | ||
? N | ||
: never; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TagBase } from "./TagBase"; | ||
|
||
export type Examples< | ||
Dict extends Record< | ||
string, | ||
boolean | bigint | number | string | Array<unknown> | null | ||
>, | ||
> = TagBase<{ | ||
target: "boolean" | "bigint" | "number" | "string" | "array"; | ||
kind: "examples"; | ||
value: Dict; | ||
exclusive: true; | ||
schema: { | ||
examples: Dict; | ||
}; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.