Open Meligy opened 1 year ago
It also seems that they changed the signature of a lot of code generation APIs :(
Mainly removing the decorators
parameter from a lot of functions that used to take it as the first parameter.
Probably related to deprecating experimental decorators in favour of EcmaScript decorators.
If the maintainers need help on this, I'm happy to try to add a PR - though I might need help, so it would potentially make more sense to have a call and/or pair programming session first and then split up the work (assuming this actually is so much work that it requires multiple people to work on it).
The same problem TypeError: Cannot create property 'pos' on string ...
still exists after final release, tested with TypeScript 5.0.2.
Since im using Typescript 5.2.2 I need to add that the line type ReduxState = ReturnType<typeof rootReducer>
doesn't produce the usual state, it's not recognising the states on the combineReducers, so when I try to use it in a selector the IDE marks it as an error. My code still compiles and works but the typescript engine on the IDE is not properly inferring types anymore.
I also tried to create a reducer directly on my configureStore and then get the state from store.getState with similar results.
@tamara-ita-scout24 this sounds like a separate issue - can you make a new issue report, ideally with a replication in code sandbox?
@tamara-ita-scout24 this sounds like a separate issue - can you make a new issue report, ideally with a replication in code sandbox?
The versions on code sandbox are older than the ones im using, I can't get typescript 5.2.2 nor react-redux 8.1.2.
Seems to me that it could take some time for all pages to update the newer versions? For now I just reverted typescript to v4 and everything works.
My package.json is this, if you'd like to know
"dependencies": { "@js-boot/logger": "^3.6.0", "@paralleldrive/react-feature-toggles": "^2.3.1", "@reduxjs/toolkit": "^1.9.5", "babel-loader": "^9.1.3", "browser-process": "^0.0.1", "core-js": "^3.32.1", "cuid": "^3.0.0", "es6-promise": "4.2.8", "eslint-plugin-prettier": "^5.0.0", "history": "5.3.0", "isomorphic-fetch": "2.2.1", "prop-types": "^15.8.1", "query-string": "6.13.8", "react": "^18.2.0", "react-app-polyfill": "^3.0.0", "react-dom": "^18.1.0", "react-media": "^1.10.0", "react-redux": "^8.1.2", "react-router-dom": "^6.11.2", "url-search-params-polyfill": "^8.2.4", "web-vitals": "^3.4.0", "whatwg-fetch": "^3.6.2" }, "devDependencies": { "@js-boot/playwright": "^3.6.0", "@js-boot/react": "^3.7.0", "@svgr/webpack": "^8.1.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^12.0.17", "@types/jest": "^26.0.20", "@types/node": "^20.5.7", "@types/react": "^18.2.8", "@types/react-dom": "^18.2.5", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^6.5.0", "@typescript-eslint/parser": "^6.5.0", "cross-env": "^7.0.3", "dotenv": "^16.1.4", "eslint": "^8.48.0", "husky": "^4.2.5", "jest-fetch-mock": "^3.0.3", "jest-junit": "^12.0.0", "jest-watch-typeahead": "^0.6.5", "less": "^3.11.3", "less-watch-compiler": "^1.14.6", "mini-css-extract-plugin": "^2.7.6", "minimist": "^1.2.6", "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "serve": "^14.2.1", "typescript": "^4" },
And everything works just fine unless I update typescript to V5
TypeScript 5.0 beta is out, so I thought I'd try to see if my project would work on it.
And got this error from the feedback step:
Where
SOME_CLASS
is just a model class with nothing special about it. It's not even the first class in the Swagger file.And interestingly it does not have any property named
pos
or even starts with it or includes it.