Skip to content

Conversation

@graham-fisher-ii
Copy link
Contributor

WIP

This PR adds support to the record combinator for "partially enumerable" records, in which the domain is the disjoint union of some enumerable type and some non-enumerable type, such that the domain has an enumerable portion and a non-enumerable portion. In particular, the record combinator enforces that the entire enumerable portion of the domain is present (with values in the codomain), and that any present keys of the non-enumerable portion have values in the codomain, emulating the type-checking behavior of TypeScript.

Other changes:

  • renamed getDomainKeys to enumerate
  • added several enumerate tests
  • implemented the partially enumerable record as an intersection of an enumerableRecord and a nonEnumerableRecord
  • supported enumeration of the intersection combinator within enumerate
  • extracted the default record.name into function for use in several places

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