* Revert "Treat type alias declarationlike function declaration (babel/babel-eslint#584)" This reverts commit 020d012c554913fea137f4129798ce31a4896dfe.
This commit is contained in:
parent
9adb82e68a
commit
e56b342e59
@ -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()) {
|
||||
|
||||
@ -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", () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user