Inline class expressions for bracket-less arrow functions (#1023)
I could go either way but it doesn't seem a big deal to inline them. I don't expect it to be very common anyway Fixes #990master
parent
328a5be284
commit
dc52a71923
|
@ -338,7 +338,8 @@ function genericPrintNoParens(path, options, print) {
|
|||
n.body.type === "JSXElement" ||
|
||||
n.body.type === "BlockStatement" ||
|
||||
n.body.type === "TaggedTemplateExpression" ||
|
||||
n.body.type === "TemplateElement"
|
||||
n.body.type === "TemplateElement" ||
|
||||
n.body.type === "ClassExpression"
|
||||
) {
|
||||
return group(collapsed);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,17 @@ function render() {
|
|||
/>
|
||||
</View>
|
||||
);
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
|
||||
jest.mock(
|
||||
'../SearchSource',
|
||||
() => class {
|
||||
findMatchingTests(pattern) {
|
||||
return {paths: []};
|
||||
}
|
||||
},
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Seq(typeDef.interface.groups).forEach(group =>
|
||||
Seq(group.members).forEach((member, memberName) =>
|
||||
markdownDoc(member.doc, {
|
||||
|
@ -209,6 +219,15 @@ function render() {
|
|||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
jest.mock(
|
||||
\\"../SearchSource\\",
|
||||
() => class {
|
||||
findMatchingTests(pattern) {
|
||||
return { paths: [] };
|
||||
}
|
||||
}
|
||||
);
|
||||
"
|
||||
`;
|
||||
|
||||
|
|
|
@ -64,4 +64,13 @@ function render() {
|
|||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
jest.mock(
|
||||
'../SearchSource',
|
||||
() => class {
|
||||
findMatchingTests(pattern) {
|
||||
return {paths: []};
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue