Skip to content

Commit

Permalink
Drop Flow support
Browse files Browse the repository at this point in the history
The bug fix in this major version update is not obviously compatible with Flow, because Flow and TypeScript has different ways of treating classes. [Flow nominally types classes][0], which allows an empty class to constrain `NonEmptyArray`, whereas [TypeScript classes are compared structurally][1]. Supporting both represents a big tooling headache. Internal projects that use this library are all moving toward TypeScript; legacy projects using Flow should just remain on the v2 version, since using it with the Flow types should present no issue. If it turns out there is a need to support Flow and apply whatever updates v3 and beyond might get, the topic could be revisited.

[0]: https://flow.org/en/docs/lang/nominal-structural/#toc-classes-are-nominally-typed
[1]: https://www.typescriptlang.org/docs/handbook/2/classes.html#relationships-between-classes
  • Loading branch information
stackptr committed Jan 17, 2024
1 parent 4dcf256 commit ed7cb1b
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 5,635 deletions.
11 changes: 0 additions & 11 deletions .flowconfig

This file was deleted.

52 changes: 0 additions & 52 deletions dist/index.js.flow

This file was deleted.

Loading

0 comments on commit ed7cb1b

Please sign in to comment.