Skip to content

Commit

Permalink
Support the new TS{Conditional,Infer}Type types.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Feb 24, 2018
1 parent 3aa5f8b commit da0367b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions def/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ module.exports = function (fork) {
.field("types", [def("TSType")]);
});

def("TSConditionalType")
.bases("TSType")
.build("checkType", "extendsType", "trueType", "falseType")
.field("checkType", def("TSType"))
.field("extendsType", def("TSType"))
.field("trueType", def("TSType"))
.field("falseType", def("TSType"));

def("TSInferType")
.bases("TSType")
.build("typeParameter")
.field("typeParameter", def("TSType"));

def("TSParenthesizedType")
.bases("TSType")
.build("typeAnnotation")
Expand Down

0 comments on commit da0367b

Please sign in to comment.