Skip to content

Commit

Permalink
Add tests for babel/babel#12161
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 15, 2020
1 parent c87b672 commit b5308bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/language-js/printer-estree.js
Expand Up @@ -2886,7 +2886,8 @@ function printPathNoParens(path, options, print, args) {

return group(concat(parts));
}
case "TypeCastExpression": {
case "TypeCastExpression":
case "TSTypeCastExpression": {
return concat([
"(",
path.call(print, "expression"),
Expand Down
8 changes: 4 additions & 4 deletions tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap
@@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`issue-8041.ts error test 1`] = `
"Did not expect a type annotation here. (1:2)
> 1 | (a:b)
| ^
exports[`type-annotation.ts error test 1`] = `
"Did not expect a type annotation here. (1:9)
> 1 | func<T>(a: T);
| ^
2 | "
`;
1 change: 0 additions & 1 deletion tests/misc/errors/babel-ts/issue-8041.ts

This file was deleted.

1 change: 1 addition & 0 deletions tests/misc/errors/babel-ts/type-annotation.ts
@@ -0,0 +1 @@
func<T>(a: T);

0 comments on commit b5308bd

Please sign in to comment.