Skip to content

Commit 2ce4486

Browse files
committed
fix: back to handwritten TS types, the generated one is shitty as hell
1 parent f525977 commit 2ce4486

File tree

3 files changed

+106
-438
lines changed

3 files changed

+106
-438
lines changed

gen/schema.json

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@
528528
"properties": {
529529
"$": {
530530
"type": "string",
531-
"const": "uint",
532-
"description": "Type discriminator for uint argument"
531+
"const": "uint"
533532
},
534533
"len": {
535534
"type": "number",
@@ -548,8 +547,7 @@
548547
"properties": {
549548
"$": {
550549
"type": "string",
551-
"const": "int",
552-
"description": "Type discriminator for int argument"
550+
"const": "int"
553551
},
554552
"len": {
555553
"type": "number",
@@ -568,8 +566,7 @@
568566
"properties": {
569567
"$": {
570568
"type": "string",
571-
"const": "refs",
572-
"description": "Type discriminator for refs argument"
569+
"const": "refs"
573570
},
574571
"count": {
575572
"type": "number",
@@ -584,8 +581,7 @@
584581
"properties": {
585582
"$": {
586583
"type": "string",
587-
"const": "delta",
588-
"description": "Type discriminator for delta argument"
584+
"const": "delta"
589585
},
590586
"delta": {
591587
"type": "number",
@@ -604,8 +600,7 @@
604600
"properties": {
605601
"$": {
606602
"type": "string",
607-
"const": "stack",
608-
"description": "Type discriminator for stack argument"
603+
"const": "stack"
609604
},
610605
"len": {
611606
"type": "number",
@@ -624,8 +619,7 @@
624619
"properties": {
625620
"$": {
626621
"type": "string",
627-
"const": "control",
628-
"description": "Type discriminator for control argument"
622+
"const": "control"
629623
},
630624
"range": {
631625
"$ref": "#/definitions/ArgRange",
@@ -640,8 +634,7 @@
640634
"properties": {
641635
"$": {
642636
"type": "string",
643-
"const": "plduzArg",
644-
"description": "Type discriminator for plduz argument"
637+
"const": "plduzArg"
645638
},
646639
"range": {
647640
"$ref": "#/definitions/ArgRange",
@@ -656,8 +649,7 @@
656649
"properties": {
657650
"$": {
658651
"type": "string",
659-
"const": "tinyInt",
660-
"description": "Type discriminator for tinyInt argument"
652+
"const": "tinyInt"
661653
},
662654
"range": {
663655
"$ref": "#/definitions/ArgRange",
@@ -672,8 +664,7 @@
672664
"properties": {
673665
"$": {
674666
"type": "string",
675-
"const": "largeInt",
676-
"description": "Type discriminator for largeInt argument"
667+
"const": "largeInt"
677668
},
678669
"range": {
679670
"$ref": "#/definitions/ArgRange",
@@ -688,8 +679,7 @@
688679
"properties": {
689680
"$": {
690681
"type": "string",
691-
"const": "runvmArg",
692-
"description": "Type discriminator for runvm argument"
682+
"const": "runvmArg"
693683
}
694684
},
695685
"required": ["$"],
@@ -700,8 +690,7 @@
700690
"properties": {
701691
"$": {
702692
"type": "string",
703-
"const": "hash",
704-
"description": "Type discriminator for hash argument"
693+
"const": "hash"
705694
}
706695
},
707696
"required": ["$"],
@@ -712,8 +701,7 @@
712701
"properties": {
713702
"$": {
714703
"type": "string",
715-
"const": "minusOne",
716-
"description": "Type discriminator for minusOne argument"
704+
"const": "minusOne"
717705
}
718706
},
719707
"required": ["$"],
@@ -724,8 +712,7 @@
724712
"properties": {
725713
"$": {
726714
"type": "string",
727-
"const": "s1",
728-
"description": "Type discriminator for s1 argument"
715+
"const": "s1"
729716
}
730717
},
731718
"required": ["$"],
@@ -736,8 +723,7 @@
736723
"properties": {
737724
"$": {
738725
"type": "string",
739-
"const": "setcpArg",
740-
"description": "Type discriminator for setcp argument"
726+
"const": "setcpArg"
741727
},
742728
"range": {
743729
"$ref": "#/definitions/ArgRange",
@@ -752,8 +738,7 @@
752738
"properties": {
753739
"$": {
754740
"type": "string",
755-
"const": "slice",
756-
"description": "Type discriminator for slice argument"
741+
"const": "slice"
757742
},
758743
"refs": {
759744
"$ref": "#/definitions/Arg",
@@ -776,8 +761,7 @@
776761
"properties": {
777762
"$": {
778763
"type": "string",
779-
"const": "codeSlice",
780-
"description": "Type discriminator for codeSlice argument"
764+
"const": "codeSlice"
781765
},
782766
"refs": {
783767
"$ref": "#/definitions/Arg",
@@ -796,8 +780,7 @@
796780
"properties": {
797781
"$": {
798782
"type": "string",
799-
"const": "refCodeSlice",
800-
"description": "Type discriminator for refCodeSlice argument"
783+
"const": "refCodeSlice"
801784
}
802785
},
803786
"required": ["$"],
@@ -808,8 +791,7 @@
808791
"properties": {
809792
"$": {
810793
"type": "string",
811-
"const": "inlineCodeSlice",
812-
"description": "Type discriminator for inlineCodeSlice argument"
794+
"const": "inlineCodeSlice"
813795
},
814796
"bits": {
815797
"$ref": "#/definitions/Arg",
@@ -824,8 +806,7 @@
824806
"properties": {
825807
"$": {
826808
"type": "string",
827-
"const": "exoticCell",
828-
"description": "Type discriminator for exoticCell argument"
809+
"const": "exoticCell"
829810
}
830811
},
831812
"required": ["$"],
@@ -836,8 +817,7 @@
836817
"properties": {
837818
"$": {
838819
"type": "string",
839-
"const": "debugstr",
840-
"description": "Type discriminator for debugstr argument"
820+
"const": "debugstr"
841821
}
842822
},
843823
"required": ["$"],
@@ -847,8 +827,7 @@
847827
"type": "object",
848828
"properties": {
849829
"$": {
850-
"type": "string",
851-
"description": "Type discriminator for references"
830+
"type": "string"
852831
},
853832
"count": {
854833
"type": "number",

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"fmt": "prettier --write -l --cache .",
77
"fmt:check": "prettier --check --cache .",
88
"generate": "ts-node src/gen/gen.ts && yarn fmt",
9-
"generate-types": "json2ts gen/schema.json --output src/types/specification-schema.ts",
109
"find-implementations": "ts-node src/gen/implementation-finder.ts",
1110
"validate": "ts-node ./validity/input-instr-signature.ts && ts-node ./validity/examples-validation.ts && ts-node ./validity/other-implementations-validation.ts && ts-node ./validity/tlb-validation.ts && ts-node ./validity/docs-links-validation.ts",
1211
"validate-schema": "ajv validate -s gen/schema.json -d gen/tvm-specification.json",

0 commit comments

Comments
 (0)