Add expression node in TSAsExpression (#1675)

This lets the comment traversal code discover it
master
Christopher Chedeau 2017-05-23 12:33:18 -07:00 committed by GitHub
parent 2c5dd4cc04
commit e37ea2c1f6
4 changed files with 20 additions and 1 deletions

View File

@ -123,7 +123,10 @@ module.exports = function(fork) {
.field("typeAnnotation", def("TypeAnnotation"))
.bases("TSSignature");
def("TSAsExpression").bases("Expression");
def("TSAsExpression")
.build("expression")
.field("expression", def("Node"))
.bases("Expression");
def("TSNamespaceExportDeclaration")
.bases("Declaration")

View File

@ -0,0 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`types.ts 1`] = `
(() => {
// swallow error and fallback to using directory as path
}) as string[];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(() => {
// swallow error and fallback to using directory as path
}) as string[];
`;

View File

@ -0,0 +1 @@
run_spec(__dirname, { parser: "typescript" });

View File

@ -0,0 +1,3 @@
(() => {
// swallow error and fallback to using directory as path
}) as string[];