@CheckReturnValue private FlowScope restrictParameter( Node parameter, JSType type, FlowScope blindScope, Function<TypeRestriction, JSType> restriction, boolean outcome) { // restricting type = restriction.apply(new TypeRestriction(type, outcome)); // changing the scope if (type != null) { return declareNameInScope(blindScope, parameter, type); } else { return blindScope; } }
private FlowScope restrictParameter(Node parameter, JSType type, FlowScope blindScope, Function<TypeRestriction, JSType> restriction, boolean outcome) { // restricting type = restriction.apply(new TypeRestriction(type, outcome)); // changing the scope if (type != null) { FlowScope informed = blindScope.createChildFlowScope(); declareNameInScope(informed, parameter, type); return informed; } else { return blindScope; } }