Support the Keyword type (#2056)
This is an issue in https://github.com/eslint/typescript-eslint-parser/issues/315 Fixes #2049
This commit is contained in:
1 parent
e9045e4bcf
commit
883e637fa9
3 files changed
+14
No files matched your search
@@ -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 />
|
||||
Reference in new issue
Block a user