-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove immutable from 'config' state slice #4776
refactor: remove immutable from 'config' state slice #4776
Conversation
Alright. Have to admit, this was a bit harder than previous refactorings and unfortunately required a lot of changes to be made in different places. It's 99% done, but still requires some polishing and thorough review. But at least all unit test are passing and TypeScript is mostly happy, except for some tricky places, which I still don't know how to handle properly (I'll mention all of them in comments). |
7c9bcd6
to
f35ee6f
Compare
bcbf658
to
01651ab
Compare
01651ab
to
afa5d71
Compare
@@ -655,9 +655,12 @@ const evaluateFolder = ( | |||
collection.get(folderKey)!, | |||
entryMap, | |||
collection, | |||
// TODO can't figure out how to handle this | |||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | |||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to config type media_folder can be undefined
@@ -700,9 +703,12 @@ const evaluateFolder = ( | |||
collection.get(folderKey)!, | |||
entryMap, | |||
collection, | |||
// TODO can't figure out how to handle this | |||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | |||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to config type media_folder can be undefined
if (camel in field) { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// @ts-ignore seems like it's impossible to make TS happy in this case | ||
field[snake] = field[camel]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't come up with proper typing :(
There is no need to check this PR right now. I'm gonna send several more atomic PRs to make merging this one easier. |
Summary
Continue with #3853
Test plan
Run existing tests