introduce more return type providers #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
new return type providers:
Iter\count
returnpositive-int
when$iterable
is anon-empty-list<_>
.Iter\count
returnpositive-int
when$iterable
is anon-empty-array<_, _>
.Iter\count
returnint(0)
when$iterable
isempty&array<_, _>
Iter\count
returnint(x)
when$iterable
is anon-empty-list<_>
with a known count, wherex
is the size of$iterable
.Iter\count
returnint(x)
when$iterable
is anon-empty-array<_, _>
with a known count, wherex
is the size of$iterable
.Iter\last
returnTv
when$iterable
is anon-empty-list<Tv>
.Iter\last
returnTv
when$iterable
is anon-empty-array<_, Tv>
.Iter\last
returnnull
when$iterable
isempty&array<_, _>
Iter\last
returnTv
when$iterable
isarray{...}
with at least 1 property.Iter\first
returnTv
when$iterable
is anon-empty-list<Tv>
.Iter\first
returnTv
when$iterable
is anon-empty-array<_, Tv>
.Iter\first
returnnull
when$iterable
isempty&array<_, _>
Iter\first
returnTv
when$iterable
isarray{...}
with at least 1 property.Str\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\chunk
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\chunk
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\Byte\chunk
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\Byte\chunk
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\lowercase
returnsnon-empty-lowercase-string
if$string
isnon-empty-string
ornon-falsy-string
Str\Byte\lowercase
returnsnon-empty-lowercase-string
if$string
isnon-empty-string
ornon-falsy-string
Str\repeat
returnsnon-empty-lowercase-string
if$string
isnon-empty-lowercase-string
Str\repeat
returnsnon-empty-string
if$string
isnon-empty-string
Str\repeat
returnslowercase-string
if$string
islowercase-string
Str\repeat
returnsstring(x)
if$string
is a literal, and$multiplier
is literal, wherex
is the result.Str\slice
returnslowercase-string
if$string
islowercase-string
Str\Byte\slice
returnslowercase-string
if$string
islowercase-string
Str\Grapheme\slice
returnslowercase-string
if$string
islowercase-string
Str\splice
returnslowercase-string
if$string
islowercase-string
and$replacement
islowercase-string
Str\Byte\splice
returnslowercase-string
if$string
islowercase-string
and$replacement
islowercase-string
Str\split
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\split
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\Byte\split
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\Byte\split
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\uppercase
returnsnon-empty-string
if$string
isnon-empty-string
Str\Byte\uppercase
returnsnon-empty-string
if$string
isnon-empty-string