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

Export correct types #56

Merged
merged 3 commits into from
Apr 23, 2021
Merged

Export correct types #56

merged 3 commits into from
Apr 23, 2021

Conversation

chriskrycho
Copy link
Collaborator

@chriskrycho chriskrycho commented Apr 23, 2021

The previous iteration, because it did not test the exported types in any way, had two misses, one serious and one less so:

  • the less serious miss was that the object types were incorrectly set up for the tests, and could be simplified as well
  • the more serious miss was that the exported type for TrackedArray was missing all of the Array methods, so downstream consumers could not use it as an array!

Resolves #41

Additionally, in support of those changes, update the lint config and fix lint issues:

  • make eslint a direct dependency
  • configure @typescript-eslint rules to work for the library as it is currently, with an eye to improving safety in the future
  • fix a bunch of actual things we can safely improve now

The previous iteration, because it did not test the exported types in any way,
had two misses, one serious and one less so:

- the less serious miss was that the object types were incorrectly set up for
  the tests, and could be simplified as well
- the more serious miss was that the exported type for `TrackedArray` was
  missing all of the `Array` methods, so downstream consumers could not use it
  as an array!
- make eslint a direct dependency
- configure `@typescript-eslint` rules to work for the library as it is
  currently, with an eye to improving safety in the future
- fix a bunch of actual things we can safely improve *now*
@chriskrycho chriskrycho merged commit 8288496 into master Apr 23, 2021
@chriskrycho chriskrycho deleted the types-fixes branch April 23, 2021 17:46
@chriskrycho chriskrycho added the enhancement New feature or request label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TrackedArray missing types
1 participant