type-fest icon indicating copy to clipboard operation
type-fest copied to clipboard

Add OneOrMore and NOrMore types

Open darcyparker opened this issue 3 years ago • 4 comments

Depends on https://github.com/sindresorhus/type-fest/issues/284 being fixed.

This is still a draft. You can see I inlined @jonahsnider's improved FixedLengthArray. (It does not work with existing FixedLengthArray)

darcyparker avatar Oct 12 '21 21:10 darcyparker

FYI: I updated this pull request based on feedback (and after being MIA for a bit). I still need to add use cases and a usage example. I will do this after https://github.com/sindresorhus/type-fest/pull/294 is finalized/merged. Because this draft should be updated to use the updated FixedLengthArray (or a new flavour of it is merged to main).

darcyparker avatar Jan 10 '22 14:01 darcyparker

Seeing as this is blocked by https://github.com/sindresorhus/type-fest/issues/284 and that issue is not going anywhere, what should we do about this pull request?

sindresorhus avatar Jun 30 '22 15:06 sindresorhus

A solution is now feasible with ReadonlyTuple which was implemented https://github.com/sindresorhus/type-fest/pull/383 It is not blocked by #284.

I need to come back to this. I am sorry I have let this sit. I am fine if you kill this PR until I am able to get back to it.

darcyparker avatar Jun 30 '22 18:06 darcyparker

Ah ok. That's good news. I can keep the PR open for a couple of months more.

sindresorhus avatar Jun 30 '22 20:06 sindresorhus

Closing for lack of activity.

Moved this into two issues:

  • https://github.com/sindresorhus/type-fest/issues/477
  • https://github.com/sindresorhus/type-fest/issues/476

sindresorhus avatar Sep 29 '22 06:09 sindresorhus