File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
packages/react/src/transformationParsers Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ export const parseEffects = (parseRemoveBackground: typeof ParseRemoveBackground
88 case 'sepia' :
99 return `e_sepia${ effect . level ? `:${ effect . level } ` : '' } ` ;
1010 case 'backgroundRemoval' :
11- // FIXME
12- return parseRemoveBackground ( effect . mode ?? true ) as any ;
11+ return parseRemoveBackground ( effect . mode ?? true ) ;
1312 case 'fade' :
1413 return `e_fade:${ effect . duration } ` ;
1514 case 'gamma' :
Original file line number Diff line number Diff line change 11import { RemoveBackground } from '../transformationTypes/removeBackground' ;
22
3- export const parseRemoveBackground = ( removeBackground : RemoveBackground ) => {
3+ export const parseRemoveBackground = < Value extends RemoveBackground > ( removeBackground : Value ) : Value extends false ? '' : `e_${ string } ` => {
44 if ( ! removeBackground ) {
5- return '' ;
5+ return '' as Value extends false ? '' : `e_${ string } ` ;
66 }
77
88 return removeBackground === 'fineEdges' ? 'e_background_removal:fineedges_y' : 'e_background_removal' ;
You can’t perform that action at this time.
0 commit comments