From d8a64dec6c24e39780cd02a42b48de06a59c7a01 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Wed, 22 Mar 2017 11:51:36 -0500 Subject: [PATCH] Remove a few node types (#1075) * Remove NumericLiteralTypeAnnotation * Remove ExistentialTypeParam --- src/printer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/printer.js b/src/printer.js index 4d0e92f69..86987dc30 100644 --- a/src/printer.js +++ b/src/printer.js @@ -132,10 +132,10 @@ function genericPrintNoParens(path, options, print) { return n; } - // TODO: For some reason NumericLiteralTypeAnnotation is not - // printable so this throws, but I think that's a bug in ast-types. + // TODO: Investigate types that return not printable. // This assert isn't very useful though. // namedTypes.Printable.assert(n); + var parts = []; switch (n.type) { case "File": @@ -1496,7 +1496,6 @@ function genericPrintNoParens(path, options, print) { ]) ); - case "ExistentialTypeParam": case "ExistsTypeAnnotation": return "*"; case "EmptyTypeAnnotation": @@ -1509,7 +1508,6 @@ function genericPrintNoParens(path, options, print) { return concat([path.call(print, "elementType"), "[]"]); case "BooleanTypeAnnotation": return "boolean"; - case "NumericLiteralTypeAnnotation": case "BooleanLiteralTypeAnnotation": return "" + n.value; case "DeclareClass":