Skip to content
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(monorepo): editor-core-types #2315

Merged
merged 3 commits into from
Aug 18, 2020

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Aug 18, 2020

With #2312 and #2313 - moving in reason-tree-sitter and editor-input - we can now move editor-core-types into Onivim proper.

The reason behind this is to update some of the common types - like Index.t and Range.t - they are not quite setup in a way where we can fully benefit from the type-system. In particular, we don't have typing around byte position vs UTF-8 character position vs screen column - they are just all ints or Index.ts. We should be able to leverage the type-system for this, and have auxiliary types, like ByteRange.t, so that we can be explicit in our APIs to document whether a function expects a byte index, character index, etc, and have it enforced by the compiler.

@bryphe bryphe merged commit 43b3aa3 into master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant