8000 Support the new TS{Conditional,Infer}Type types. · benjamn/ast-types@da0367b · GitHub
[go: up one dir, main page]

10000 Skip to content

Commit da0367b

Browse files
committed
Support the new TS{Conditional,Infer}Type types.
babel/babel#7404
1 parent 3aa5f8b commit da0367b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

def/typescript.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ module.exports = function (fork) {
110110
.field("types", [def("TSType")]);
111111
});
112112

113+
def("TSConditionalType")
114+
.bases("TSType")
115+
.build("checkType", "extendsType", "trueType", "falseType")
116+
.field("checkType", def("TSType"))
117+
.field("extendsType", def("TSType"))
118+
.field("trueType", def("TSType"))
119+
.field("falseType", def("TSType"));
120+
121+
def("TSInferType")
122+
.bases("TSType")
123+
.build("typeParameter")
124+
.field("typeParameter", def("TSType"));
125+
113126
def("TSParenthesizedType")
114127
.bases("TSType")
115128
.build("typeAnnotation")

0 commit comments

Comments
 (0)
0