File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
tests/fixtures/ts/parameters Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,10 @@ pub fn should_hug_function_parameters<'a>(
356356 BindingPatternKind :: BindingIdentifier ( _) => {
357357 parentheses_not_needed
358358 || only_parameter. pattern . type_annotation . as_ref ( ) . is_some_and ( |ann| {
359- matches ! ( & ann. type_annotation, TSType :: TSTypeLiteral ( literal) )
359+ matches ! (
360+ & ann. type_annotation,
361+ TSType :: TSTypeLiteral ( _) | TSType :: TSMappedType ( _)
362+ )
360363 } )
361364 }
362365 }
Original file line number Diff line number Diff line change 1+ const assertFilteringFor = ( expected : {
2+ [ T in TestFilterTerm ] ?: boolean ;
3+ } ) => { } ;
4+
Original file line number Diff line number Diff line change 1+ -- -
2+ source : crates / oxc_formatter / tests / fixtures / mod .rs
3+ -- -
4+ ==================== Input ====================
5+ const assertFilteringFor = (expected : {
6+ [T in TestFilterTerm]?: boolean;
7+ }) => {};
8+
9+ ==================== Output ====================
10+ const assertFilteringFor = (expected : {
11+ [T in TestFilterTerm]?: boolean;
12+ }) => {};
13+
14+ ===================== End =====================
You can’t perform that action at this time.
0 commit comments