Update to Prettier 2.3 (#13288)
This commit is contained in:
@@ -1350,9 +1350,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
return this.finishNode(node, "FunctionTypeParam");
|
||||
}
|
||||
|
||||
flowParseFunctionTypeParams(
|
||||
params: N.FlowFunctionTypeParam[] = [],
|
||||
): {
|
||||
flowParseFunctionTypeParams(params: N.FlowFunctionTypeParam[] = []): {
|
||||
params: N.FlowFunctionTypeParam[],
|
||||
rest: ?N.FlowFunctionTypeParam,
|
||||
_this: ?N.FlowFunctionTypeParam,
|
||||
@@ -3131,7 +3129,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
node.callee = base;
|
||||
|
||||
const result = this.tryParse(() => {
|
||||
node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
|
||||
node.typeArguments =
|
||||
this.flowParseTypeParameterInstantiationCallOrNew();
|
||||
this.expect(tt.parenL);
|
||||
node.arguments = this.parseCallExpressionArguments(tt.parenR, false);
|
||||
if (subscriptState.optionalChainMember) node.optional = false;
|
||||
|
||||
@@ -537,13 +537,11 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
this.expect(tt.parenL);
|
||||
signature.parameters = this.tsParseBindingListForSignature();
|
||||
if (returnTokenRequired) {
|
||||
signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(
|
||||
returnToken,
|
||||
);
|
||||
signature.typeAnnotation =
|
||||
this.tsParseTypeOrTypePredicateAnnotation(returnToken);
|
||||
} else if (this.match(returnToken)) {
|
||||
signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(
|
||||
returnToken,
|
||||
);
|
||||
signature.typeAnnotation =
|
||||
this.tsParseTypeOrTypePredicateAnnotation(returnToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user