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

Suggestion: add ArraySlice and StringSlice #734

Closed
Max10240 opened this issue Oct 27, 2023 · 3 comments
Closed

Suggestion: add ArraySlice and StringSlice #734

Max10240 opened this issue Oct 27, 2023 · 3 comments
Labels
help wanted Extra attention is needed type addition

Comments

@Max10240
Copy link
Contributor

Max10240 commented Oct 27, 2023

for example:

type Tuple = [0, 1, 2, 3];

type Segment0 = ArraySlice<Tuple, 0, 2>; // [0, 1]
type Segment1 = ArraySlice<Tuple, 1, 3>; // [1, 2]

type Str = 'abcde';
type StrSegment0 = StrSlice<Str, 0, 2>; // 'ab'

If the idea is feasible, I can propose a PR to complete it

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@sindresorhus
Copy link
Owner

Sounds like a useful type to me 👍

@sindresorhus sindresorhus added help wanted Extra attention is needed type addition labels Oct 27, 2023
@Max10240
Copy link
Contributor Author

I'm finishing it, but it may take some time

Max10240 pushed a commit to Max10240/type-fest that referenced this issue Nov 26, 2023
Max10240 pushed a commit to Max10240/type-fest that referenced this issue Nov 26, 2023
@sindresorhus
Copy link
Owner

Added in #748

Max10240 pushed a commit to Max10240/type-fest that referenced this issue Mar 14, 2024
Max10240 pushed a commit to Max10240/type-fest that referenced this issue Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type addition
Projects
None yet
Development

No branches or pull requests

2 participants