diff --git a/src/typescript-ast-nodes.js b/src/typescript-ast-nodes.js index 55eeca52f..4763e70d3 100644 --- a/src/typescript-ast-nodes.js +++ b/src/typescript-ast-nodes.js @@ -179,7 +179,7 @@ module.exports = function(fork) { def("TSAbstractClassProperty").build("key", "value").bases("Node"); - def("TSAbstractClassDeclaration").build().bases("Node"); + def("TSAbstractClassDeclaration").build().bases("ClassDeclaration"); def("TSInterfaceHeritage") .build("id", "typeParameters") diff --git a/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap index 128bce0f8..537599567 100644 --- a/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript_comments/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,26 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`abstract_class.ts 1`] = ` +abstract class AbstractRule { + /** + * @deprecated + * Failures will be filtered based on \`tslint:disable\` comments by tslint. + * This method now does nothing. + */ + filterFailures() {} +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +abstract class AbstractRule { + /** + * @deprecated + * Failures will be filtered based on \`tslint:disable\` comments by tslint. + * This method now does nothing. + */ + filterFailures() {} +} + +`; + exports[`types.ts 1`] = ` (() => { // swallow error and fallback to using directory as path diff --git a/tests/typescript_comments/abstract_class.ts b/tests/typescript_comments/abstract_class.ts new file mode 100644 index 000000000..af53c46b2 --- /dev/null +++ b/tests/typescript_comments/abstract_class.ts @@ -0,0 +1,8 @@ +abstract class AbstractRule { + /** + * @deprecated + * Failures will be filtered based on `tslint:disable` comments by tslint. + * This method now does nothing. + */ + filterFailures() {} +}