refactor: type improvements that doesn't modify functionality (#17970)

This commit is contained in:
yusheng chen
2025-04-14 16:06:10 +08:00
committed by GitHub
parent 53efb2bad5
commit 4c99e9dc73
39 changed files with 69 additions and 63 deletions

View File

@@ -1,3 +1,4 @@
import type { ReactNode } from 'react'
import React from 'react'
import { act, render, screen, waitFor } from '@testing-library/react'
import Toast, { ToastProvider, useToastContext } from '.'
@@ -80,7 +81,7 @@ describe('Toast', () => {
const CustomToastContext = React.createContext({ notify: noop, close: undefined })
// Create a wrapper component using the custom context
const Wrapper = ({ children }: any) => (
const Wrapper = ({ children }: { children: ReactNode }) => (
<CustomToastContext.Provider value={{ notify: noop, close: undefined }}>
{children}
</CustomToastContext.Provider>