Skip to content

Commit

Permalink
Type cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Aug 8, 2024
1 parent 794a019 commit 809cf55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
1 change: 0 additions & 1 deletion packages/editor/src/components/approvalDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const numberFormatter = Intl.NumberFormat( 'en', {
style: 'unit',
unit: 'byte',
unitDisplay: 'narrow',
// @ts-ignore -- TODO: Update types somehow.
roundingPriority: 'lessPrecision',
maximumSignificantDigits: 2,
maximumFractionDigits: 2,
Expand Down
8 changes: 1 addition & 7 deletions packages/upload-media/src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,7 @@ export function optimizeExistingItem( {
generatedPosterId,
startTime,
}: OptimizeExistingItemArgs ) {
return async ( {
dispatch,
registry,
}: {
dispatch: ActionCreators;
registry: WPDataRegistry;
} ) => {
return async ( { dispatch, registry }: ThunkArgs ) => {
fileName = fileName || getFileNameFromUrl( url );
const baseName = getFileBasename( fileName );
const newFileName = fileName.replace(
Expand Down
16 changes: 2 additions & 14 deletions packages/upload-media/src/store/private-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,7 @@ export function addItem( {
abortController,
operations,
}: AddItemArgs ) {
return async ( {
dispatch,
registry,
}: {
dispatch: ActionCreators;
registry: WPDataRegistry;
} ) => {
return async ( { dispatch, registry }: ThunkArgs ) => {
const thumbnailGeneration: ThumbnailGeneration = registry
.select( preferencesStore )
.get( PREFERENCES_NAME, 'thumbnailGeneration' );
Expand Down Expand Up @@ -612,13 +606,7 @@ export function finishOperation(
* @param id Item ID.
*/
export function addPosterForItem( id: QueueItemId ) {
return async ( {
select,
dispatch,
}: {
select: Selectors;
dispatch: ActionCreators;
} ) => {
return async ( { select, dispatch }: ThunkArgs ) => {
const item = select.getItem( id ) as QueueItem;

// Bail early if the video already has a poster.
Expand Down

0 comments on commit 809cf55

Please sign in to comment.