-
-
Notifications
You must be signed in to change notification settings - Fork 146
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for advice upgrading post 6.12 #143
Comments
Hey @mesqueeb I think that you should |
Actually I'm seeing that none of the deprecated things have been removed 馃く... |
So this is what changed (on the left <= v6, on the right > v6):
So you should use The reason behind the renaming of the tools is that |
@millsp O.Compact v6.12 is only way to show a merged type way more beautiful as-is without anything the dev might not understand. See difference: O.PatchAllVs. O.Compact pre 6.12So as you can see, this part looks weird and might confuse devs: |
Ok, that's just a display problem. In short, this is for handling circular references. If you explicitly want to display it neatly, you should combine it with const starter = { name: 'Squirtle', types: { water: true } };
const newvals = { name: 'Wartortle', types: { fight: true }, level: 16 };
type t = A.Compute<O.PatchAll<{}, [typeof starter, typeof newvals], 'deep'>>; |
Hey @millsp I have made the edits as per your advice. And it seemed like everything worked for me with beautiful types. However, upon build now I got an error:
This is what my code looks like with your suggestion integrated as return type: Here is the error in my tests: Maybe you consider it unrelated, since the error happens in Do you have any advice for me? Here is the repo and branch: |
idea: provide a version of PatchAll / MergeAll that does not work with circular references? my library doesn't support merging objects with circular references anyway, so I'd greatly appreciate the performance boost from a PatchAll / MergeAll that also doesn't (if there is a performance penalty that is ) : D and it will probably fix this issue as well. |
I cloned your repo and the tests are passing. Maybe you should nuke your |
@millsp I just tried updating all dependencies, but no luck. |
Got a fix on the way! |
You can just use it without |
@mesqueeb did it solve your problem? |
Actually, it could be nice if you can hold on. I'm planning to release a more generic version of |
@millsp I'm sorry I didn't check this thread past two days! all problems are solved since PatchAll, MergeAll both work. I ended up going for |
@millsp PS, I'm happy to test anything else for you, I don't do array or tuple merging in any of my libraries though! |
ts-toolbelt@9 will be out in November, it will have breaking changes on |
As part of the update of `ramda` from 0.28.25 to 0.29.3, only the version of 9.6.0 `ts-toolbelt` is required (`ts-toolbelt` version 6.15.5 was removed from the dependencies). In the version 9.6.0 of `ts-toolbelt` `MergeUp` does not exist, and needs be replaced by `Merge`. References: * millsp/ts-toolbelt@7f38e59 * millsp/ts-toolbelt#143 (comment)
As part of the update of `ramda` from 0.28.25 to 0.29.3, only the version of 9.6.0 `ts-toolbelt` is required (`ts-toolbelt` version 6.15.5 was removed from the dependencies). In the version 9.6.0 of `ts-toolbelt` `MergeUp` does not exist, and needs be replaced by `Merge`. References: * millsp/ts-toolbelt@7f38e59 * millsp/ts-toolbelt#143 (comment)
馃 Question
Describe your question
I'm wondering if it's possible to make the types of O.Compact/O.MergeAll more beautiful in VSCode...
Ever since 6.12 + things kind changed a lot.
6.12
very beautiful:
6.15.5
latest 8.x
O.Compact
was not deprecated in the source code, but is the same as 6.15.5:Instead you suggested me to use
O.MergeAll
instead:I would like your general advice on my library merge-anything which merges objects and did so with beautiful typing support (until 6.12).
I'm not sure if I should force ts-toolbelt 6.12 or not and wanted to ask your general advice.
If I do go for v8.x, should I do this as a "major" update?
If I go with MergeAll, what should I tell my users in the release note about the new returned type of my merge function?
Search tags, topics
#_6.12 #upgrade #compact #mergeall
The text was updated successfully, but these errors were encountered: