* Revert "Treat type alias declarationlike function declaration (babel/babel-eslint#584)"

This reverts commit 020d012c554913fea137f4129798ce31a4896dfe.
This commit is contained in:
Henry Zhu 2018-09-27 10:29:29 -04:00
parent 9adb82e68a
commit e56b342e59
2 changed files with 0 additions and 21 deletions

View File

@ -72,15 +72,6 @@ var astTransformVisitor = {
delete node.bound;
}
if (path.isTypeAlias()) {
node.type = "FunctionDeclaration";
node.generator = false;
node.async = false;
node.expression = false;
node.params = [];
node.body = node.right;
}
// flow: prevent "no-undef"
// for "Component" in: "let x: React.Component"
if (path.isQualifiedTypeIdentifier()) {

View File

@ -1091,18 +1091,6 @@ describe("verify", () => {
{ "no-unused-vars": 1, "no-undef": 1 }
);
});
it("cyclic type dependencies should not error #485", () => {
verifyAndAssertMessages(
unpad(`
type Node<T> = { head: T, tail: Node<T> };
type A = B[];
type B = number;
`),
{ "no-use-before-define": 0 },
[]
);
});
});
it("class usage", () => {