chore: fix unnecessary 'undefined' types (#2589)

This commit is contained in:
Braden MacDonald
2025-11-12 13:26:01 -05:00
committed by GitHub
parent 2530b01b82
commit 5ec00236cb
8 changed files with 8 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ mockUseLibBlockMetadata.applyMock();
const searchParamsGetMock = jest.fn();
let axiosMock: MockAdapter;
let mockShowToast: (message: string, action?: ToastActionData | undefined) => void;
let mockShowToast: (message: string, action?: ToastActionData) => void;
let queryClient: QueryClient;
jest.mock('../studio-home/hooks', () => ({

View File

@@ -48,7 +48,7 @@ const render = (eventData?: LibraryChangesMessageData) => {
};
let axiosMock: MockAdapter;
let mockShowToast: (message: string, action?: ToastActionData | undefined) => void;
let mockShowToast: (message: string, action?: ToastActionData) => void;
describe('<IframePreviewLibraryXBlockChanges />', () => {
beforeEach(() => {

View File

@@ -68,7 +68,7 @@ const renderWithContainer = (containerId: string, containerType: 'unit' | 'secti
};
let axiosMock: MockAdapter;
let mockShowToast: (message: string, action?: ToastActionData | undefined) => void;
let mockShowToast: (message: string, action?: ToastActionData) => void;
describe('<AddContent />', () => {
beforeEach(() => {

View File

@@ -35,7 +35,7 @@ const renderArgs = {
),
};
let mockShowToast: { (message: string, action?: ToastActionData | undefined): void; mock?: any; };
let mockShowToast: { (message: string, action?: ToastActionData): void; mock?: any; };
describe('<ComponentDeleter />', () => {
beforeEach(() => {

View File

@@ -51,7 +51,7 @@ const renderArgs = {
),
};
let mockShowToast: { (message: string, action?: ToastActionData | undefined): void; mock?: any; };
let mockShowToast: { (message: string, action?: ToastActionData): void; mock?: any; };
[
'unit' as const,

View File

@@ -128,7 +128,7 @@ const render = (
});
};
let axiosMock: MockAdapter;
let mockShowToast: { (message: string, action?: ToastActionData | undefined): void; mock?: any; };
let mockShowToast: { (message: string, action?: ToastActionData): void; mock?: any; };
[
{

View File

@@ -34,7 +34,7 @@ const libraryTitle = mockContentLibrary.libraryData.title;
let axiosMock: MockAdapter;
let queryClient: QueryClient;
let mockShowToast: (message: string, action?: ToastActionData | undefined) => void;
let mockShowToast: (message: string, action?: ToastActionData) => void;
mockClipboardEmpty.applyMock();
mockGetContainerMetadata.applyMock();

View File

@@ -33,7 +33,7 @@ const path = '/library/:libraryId/*';
const libraryTitle = mockContentLibrary.libraryData.title;
let axiosMock: MockAdapter;
let mockShowToast: (message: string, action?: ToastActionData | undefined) => void;
let mockShowToast: (message: string, action?: ToastActionData) => void;
mockClipboardEmpty.applyMock();
mockGetContainerMetadata.applyMock();