1
1
import ts from "typescript" ;
2
- import { ExpressionFactory } from "typia/lib/factories/ExpressionFactory" ;
3
2
import { LiteralFactory } from "typia/lib/factories/LiteralFactory" ;
4
3
import { IMetadataTypeTag } from "typia/lib/schemas/metadata/IMetadataTypeTag" ;
5
4
@@ -19,28 +18,11 @@ export namespace SdkTypeTagProgrammer {
19
18
library : `typia/lib/tags/${ instance } ` ,
20
19
instance,
21
20
} ) ,
22
- instance === "Example"
23
- ? [ ]
24
- : [
25
- ts . factory . createLiteralTypeNode (
26
- typeof tag . value === "boolean"
27
- ? tag . value
28
- ? ts . factory . createTrue ( )
29
- : ts . factory . createFalse ( )
30
- : typeof tag . value === "bigint"
31
- ? tag . value < BigInt ( 0 )
32
- ? ts . factory . createPrefixUnaryExpression (
33
- ts . SyntaxKind . MinusToken ,
34
- ts . factory . createBigIntLiteral (
35
- ( - tag . value ) . toString ( ) ,
36
- ) ,
37
- )
38
- : ts . factory . createBigIntLiteral ( tag . value . toString ( ) )
39
- : typeof tag . value === "number"
40
- ? ExpressionFactory . number ( tag . value )
41
- : ts . factory . createStringLiteral ( tag . value ) ,
42
- ) ,
43
- ] ,
21
+ [
22
+ ts . factory . createLiteralTypeNode (
23
+ LiteralFactory . write ( tag . value ) as any ,
24
+ ) ,
25
+ ] ,
44
26
) ;
45
27
return ts . factory . createTypeReferenceNode (
46
28
importer . external ( {
0 commit comments