| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
How well do the types line up with @types/diff-match-patch to ease migration? |
Sorry, something went wrong.
|
They are mostly a match with the exception of Diff. I decided to match other language conversions here and make Diff a class. It’s neater that way and allows us to call the fields operation and text rather than use them by their indices. What are your thoughts Kyle? |
Sorry, something went wrong.
|
I'm not going to be migrating from the @types so it's not personally a blocker. From my purview, it seems ok to force a migration since the typescript here is still bundled in a big repo (no one can install this directly). However, it's reasonable to reach out to @karak, @pspeter3, and @vsiao to see what they think as prior authors of the old definitions. |
Sorry, something went wrong.
|
I'm more worried about the breaking change to the JavaScript than the TypeScript. Having real guaranteed correct types (because the compiler generates the .d.ts) is worth the migration pain. |
Sorry, something went wrong.
|
Type definition in @types is just a mirror. I agree with the library itself has one and it's officially preferred. |
Sorry, something went wrong.
|
One thing we can do to help ease migration is support both types. Here's a quick prototype of my suggestion. tl;dr.
--- Edit I think it makes more sense to just provide helpers for anyone coming from the JS world. |
Sorry, something went wrong.
…tory method to create Diff from array
|
Hey. Wasn't this issue closed, or unmerged yet? |
Sorry, something went wrong.
|
Still unmerged. Things move slow here. You can tell because it says "Open" and not "Closed" or "Merged" 😉 It'd be nice if this were easier to review, but if it's up-to-date and all the tests pass it could be worth merging for no other reason than to keep it moving. Things I know I would like to see with this:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Ported the Javascript version of diff_match_patch into Typescript.
To run tests: