Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] initial typescript conversion #60
Conversation
captainsafia
commented
Mar 9, 2019
|
From my understanding, using “{}” to create a dictionary means if inherits the properties of the Object prototype, whereas using Object.create with a null parameter does not inherit any of the properties. I looked up some more stuff about it and learned that maps created this way have faster access times in some cases. Interesting. https://stackoverflow.com/questions/34480709/why-is-object-create-so-much-slower-than-a-constructor By the way, cool work! |
|
There are two places where These days of course this level of backwards compatibility is completely ludicrous. |
|
I just went on paternity leave for the last few months, I'm jumping back into this now. |
|
Looked at the git diff since I last touched this, seems I can safely rebase and go forward as the changes were to a header file and the dart code. |
samelhusseini
commented
Jul 27, 2019
•
|
@rgbkrk Typescript doesn't do anything special here. |
samelhusseini
commented
Jul 27, 2019
•
|
Ah I think I understand the source of confusion here. The JS built file in Neil's zip is outdated. Tr building it and you should get the same result. |
samelhusseini
commented
Jul 27, 2019
|
Also I worked on a conversion not realizing this PR existed, if you'd like to take a look, I'd love to hear your thoughts on: #74 One design decision I want to point out is making Diff a class with text and operation properties. On the one hand that's more consistent with other language conversions and is cleaner to define and access than using a Tuple (Array), but I'm wondering if that's worth it if it makes migration more tedious. |
|
@samelhusseini hey no problem, I've ended up being swamped with other work so I'm glad you've picked this up. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

rgbkrk commentedMar 9, 2019
•
edited
Following on from #58, I've kicked off the conversion of
diff-match-patchstarting with @NeilFraser's starting point as the first commit. I've included the built copy for now, though I may strip that out and rebase it based on feedback.One interesting thing between Neil's built version and my built version:
Not quite sure why typescript goes that route to make an object with a null prototype (that still behaves like an object).
What works
diff_match_patch_uncompressed.jswhich is not generated (by name) hereNext steps
@types/diff-match-patchto ease migration