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

feat: ensure there's at least 1 char in non-empty string #200

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Oct 26, 2023

This is useful e.g. when trying to leverage a non-empty string for accessing its first character. We can say there's always at least 1 char in non-empty string so this allows us to do s[0] with TS option noUncheckedIndexedAccess: true.

This is useful e.g. when trying to leverage a non-empty string for accessing its first character. We can say there's always at least 1 char in non-empty string so this allows us to do `s[0]` with ts option `noUncheckedIndexedAccess: true`.
@sindresorhus sindresorhus merged commit 0d4cf6f into sindresorhus:main Oct 26, 2023
3 checks passed
@simPod simPod deleted the char branch October 26, 2023 14:39
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.

2 participants