Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ast-types 0.8.18 #304

Merged
merged 1 commit into from
Aug 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions lib/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,28 @@ function genericPrintNoParens(path, options, print) {
fromString(", ").join(path.map(print, "params")),
">"
]);
case "TypeParameter":
switch (n.variance) {
case 'plus':
parts.push('+');
break;
case 'minus':
parts.push('-');
break;
default:
}

parts.push(path.call(print, 'name'));

if (n.bound) {
parts.push(path.call(print, 'bound'));
}

if (n['default']) {
parts.push('=', path.call(print, 'default'));
}

return concat(parts);

case "TypeofTypeAnnotation":
return concat([
Expand All @@ -1437,6 +1459,9 @@ function genericPrintNoParens(path, options, print) {
case "VoidTypeAnnotation":
return fromString("void", options);

case "NullTypeAnnotation":
return fromString("null", options);

// Unhandled types below. If encountered, nodes of these types should
// be either left alone or desugared into AST types that are fully
// supported by the pretty-printer.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"fs": false
},
"dependencies": {
"ast-types": "0.8.17",
"ast-types": "0.8.18",
"esprima": "~2.7.1",
"private": "~0.1.5",
"source-map": "~0.5.0"
Expand Down