Closed as not planned
Closed as not planned
Description
🔎 Search Terms
- typescript type extends of third party
- d.ts not working
🕗 Version & Regression Information
There was no such issue in 4.8.4, but it was found that the extension of d.ts became invalid from 4.9.1-rc onwards, and this issue persists in subsequent versions.
⏯ Playground Link
No response
💻 Code
// page.tsx
import {useSelector} from 'react-redux
export const Page = ()=>{
const name = useSelector(state=>state.name)
return <div>test, { name }</div>
}
// index.d.ts
import 'react-redux'
declare module 'react-redux' {
export function useSelector<any, any>(selector: (state: any) => any, equalityFn?: EqualityFn<any> | undefined): any
}
🙁 Actual behavior
The type definition used by useSelector is still from react-redux internally.

🙂 Expected behavior
useSelector uses the types defined in my d.ts file. Just like it performed in 4.8.4
Additional information about the issue
No response