[TS2742] Occurs building a library that depends on @reduxjs/toolkit
#58743
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
🔎 Search Terms
TS2742, redux, rtk
🕗 Version & Regression Information
I refered to this comment from #42873 and I found that this does not work in
typescript@beta
(5.5.0-beta) as well.And if I tryimport * as foo from '../node_modules/@reduxjs/....'
d.ts emission works like a charm.This doesn't work as
d.ts
ends up with emptyexport {};
⏯ Playground Link
https://github.com/ryuujo1573/rtk-ts2742-demo
💻 Code
🙁 Actual behavior
TS2742
🙂 Expected behavior
Resolve type definitions from "@reduxjs/toolkit" (
@reduxjs/toolkit/dist/createSlice.d.ts
) properly, and generate types as expectedAdditional information about the issue
reduxjs/redux-toolkit#3962
and this
reduxjs/redux-toolkit#4066
Tasks
The text was updated successfully, but these errors were encountered: