Support the Keyword type (#2056)
This is an issue in https://github.com/eslint/typescript-eslint-parser/issues/315 Fixes #2049master
parent
e9045e4bcf
commit
883e637fa9
|
@ -1625,6 +1625,9 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
requiresHardline ? hardline : ""
|
||||
]);
|
||||
}
|
||||
case "Keyword": {
|
||||
return n.name;
|
||||
}
|
||||
case "TypeAnnotatedIdentifier":
|
||||
return concat([
|
||||
path.call(print, "annotation"),
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`keyword.tsx 1`] = `
|
||||
<try />;
|
||||
<object />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<try />;
|
||||
<object />;
|
||||
|
||||
`;
|
||||
|
||||
exports[`not-react.ts 1`] = `
|
||||
/// <reference types="node" />
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<try />;
|
||||
<object />
|
Loading…
Reference in New Issue