Skip to content

Commit

Permalink
Merge pull request #995 from antfu/feat/mark-no-side-effects
Browse files Browse the repository at this point in the history
perf: mark functions as `@__NO_SIDE_EFFECTS__`
  • Loading branch information
fabian-hiller authored Dec 26, 2024
2 parents f3aecd4 + 2f59f25 commit e86f355
Show file tree
Hide file tree
Showing 227 changed files with 227 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
'jsdoc/check-tag-names': [
'error',
{
definedTags: ['alpha', 'beta'],
definedTags: ['alpha', 'beta', '__NO_SIDE_EFFECTS__'],
},
],

Expand Down
1 change: 1 addition & 0 deletions library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to the library will be documented in this file.
- Add `words`, `maxWords`, `minWords` and `notWords` action
- Add `args` and `returns` action to transform functions (issue #243)
- Add new overload signature to `pipe` and `pipeAync` method to support unlimited pipe items of same input and output type (issue #852)
- Add `@__NO_SIDE_EFFECTS__` notation to improve tree shaking (pull request #995)
- Change types and implementation to support Standard Schema
- Change behaviour of `minValue` and `maxValue` for `NaN` (pull request #843)
- Change type and behaviour of `nullable`, `nullableAsync`, `nullish`, `nullishAsync`, `optional`, `optionalAsync`, `undefinedable` and `undefinedableAsync` for undefined default value (issue #878)
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/args/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function args<
TSchema extends Schema,
>(schema: TSchema): ArgsAction<TInput, TSchema>;

// @__NO_SIDE_EFFECTS__
export function args(
schema: Schema
): ArgsAction<(...args: unknown[]) => unknown, Schema> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/args/argsAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function argsAsync<
TSchema extends Schema,
>(schema: TSchema): ArgsActionAsync<TInput, TSchema>;

// @__NO_SIDE_EFFECTS__
export function argsAsync(
schema: Schema
): ArgsActionAsync<(...args: unknown[]) => unknown, Schema> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/await/awaitAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface AwaitActionAsync<TInput extends Promise<unknown>>
*
* @returns An await action.
*/
// @__NO_SIDE_EFFECTS__
export function awaitAsync<
TInput extends Promise<unknown>,
>(): AwaitActionAsync<TInput> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/base64/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export function base64<
const TMessage extends ErrorMessage<Base64Issue<TInput>> | undefined,
>(message: TMessage): Base64Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function base64(
message?: ErrorMessage<Base64Issue<string>>
): Base64Action<string, ErrorMessage<Base64Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/bic/bic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function bic<
const TMessage extends ErrorMessage<BicIssue<TInput>> | undefined,
>(message: TMessage): BicAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function bic(
message?: ErrorMessage<BicIssue<string>>
): BicAction<string, ErrorMessage<BicIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/brand/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface BrandAction<TInput, TName extends BrandName>
*
* @returns A brand action.
*/
// @__NO_SIDE_EFFECTS__
export function brand<TInput, TName extends BrandName>(
name: TName
): BrandAction<TInput, TName> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/bytes/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function bytes<
message: TMessage
): BytesAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function bytes(
requirement: number,
message?: ErrorMessage<BytesIssue<string, number>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/check/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function check<
message: TMessage
): CheckAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function check(
requirement: (input: unknown) => boolean,
message?: ErrorMessage<CheckIssue<unknown>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/check/checkAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function checkAsync<
message: TMessage
): CheckActionAsync<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function checkAsync(
requirement: (input: unknown) => MaybePromise<boolean>,
message?: ErrorMessage<CheckIssue<unknown>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/checkItems/checkItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function checkItems<
message: TMessage
): CheckItemsAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function checkItems(
requirement: ArrayRequirement<unknown[]>,
message?: ErrorMessage<CheckItemsIssue<unknown[]>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/checkItems/checkItemsAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function checkItemsAsync<
message: TMessage
): CheckItemsActionAsync<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function checkItemsAsync(
requirement: ArrayRequirementAsync<unknown[]>,
message?: ErrorMessage<CheckItemsIssue<unknown[]>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/creditCard/creditCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export function creditCard<
const TMessage extends ErrorMessage<CreditCardIssue<TInput>> | undefined,
>(message: TMessage): CreditCardAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function creditCard(
message?: ErrorMessage<CreditCardIssue<string>>
): CreditCardAction<string, ErrorMessage<CreditCardIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/cuid2/cuid2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function cuid2<
const TMessage extends ErrorMessage<Cuid2Issue<TInput>> | undefined,
>(message: TMessage): Cuid2Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function cuid2(
message?: ErrorMessage<Cuid2Issue<string>>
): Cuid2Action<string, ErrorMessage<Cuid2Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/decimal/decimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export function decimal<
const TMessage extends ErrorMessage<DecimalIssue<TInput>> | undefined,
>(message: TMessage): DecimalAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function decimal(
message?: ErrorMessage<DecimalIssue<string>>
): DecimalAction<string, ErrorMessage<DecimalIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/description/description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface DescriptionAction<TInput, TDescription extends string>
*
* @returns A description action.
*/
// @__NO_SIDE_EFFECTS__
export function description<TInput, TDescription extends string>(
description_: TDescription
): DescriptionAction<TInput, TDescription> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/digits/digits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export function digits<
const TMessage extends ErrorMessage<DigitsIssue<TInput>> | undefined,
>(message: TMessage): DigitsAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function digits(
message?: ErrorMessage<DigitsIssue<string>>
): DigitsAction<string, ErrorMessage<DigitsIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/email/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function email<
const TMessage extends ErrorMessage<EmailIssue<TInput>> | undefined,
>(message: TMessage): EmailAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function email(
message?: ErrorMessage<EmailIssue<string>>
): EmailAction<string, ErrorMessage<EmailIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/emoji/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function emoji<
const TMessage extends ErrorMessage<EmojiIssue<TInput>> | undefined,
>(message: TMessage): EmojiAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function emoji(
message?: ErrorMessage<EmojiIssue<string>>
): EmojiAction<string, ErrorMessage<EmojiIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/empty/empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function empty<
const TMessage extends ErrorMessage<EmptyIssue<TInput>> | undefined,
>(message: TMessage): EmptyAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function empty(
message?: ErrorMessage<EmptyIssue<LengthInput>>
): EmptyAction<LengthInput, ErrorMessage<EmptyIssue<LengthInput>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/endsWith/endsWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function endsWith<
message: TMessage
): EndsWithAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function endsWith(
requirement: string,
message?: ErrorMessage<EndsWithIssue<string, string>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/everyItem/everyItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export function everyItem<
message: TMessage
): EveryItemAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function everyItem(
requirement: ArrayRequirement<unknown[]>,
message?: ErrorMessage<EveryItemIssue<unknown[]>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/excludes/excludes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function excludes<
message: TMessage
): ExcludesAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function excludes(
requirement: ContentRequirement<ContentInput>,
message?: ErrorMessage<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/filterItems/filterItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function filterItems<TInput extends ArrayInput>(
operation: ArrayRequirement<TInput>
): FilterItemsAction<TInput>;

// @__NO_SIDE_EFFECTS__
export function filterItems(
operation: ArrayRequirement<unknown[]>
): FilterItemsAction<unknown[]> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/findItem/findItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function findItem<
TOuput extends TInput[number],
>(operation: ArrayRequirement<TInput, TOuput>): FindItemAction<TInput, TOuput>;

// @__NO_SIDE_EFFECTS__
export function findItem(
operation: ArrayRequirement<unknown[], unknown>
): FindItemAction<unknown[], unknown> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/finite/finite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export function finite<
const TMessage extends ErrorMessage<FiniteIssue<TInput>> | undefined,
>(message: TMessage): FiniteAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function finite(
message?: ErrorMessage<FiniteIssue<number>>
): FiniteAction<number, ErrorMessage<FiniteIssue<number>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/graphemes/graphemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function graphemes<
message: TMessage
): GraphemesAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function graphemes(
requirement: number,
message?: ErrorMessage<GraphemesIssue<string, number>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/hash/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function hash<
message: TMessage
): HashAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function hash(
types: [HashType, ...HashType[]],
message?: ErrorMessage<HashIssue<string>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/hexColor/hexColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function hexColor<
const TMessage extends ErrorMessage<HexColorIssue<TInput>> | undefined,
>(message: TMessage): HexColorAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function hexColor(
message?: ErrorMessage<HexColorIssue<string>>
): HexColorAction<string, ErrorMessage<HexColorIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/hexadecimal/hexadecimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function hexadecimal<
const TMessage extends ErrorMessage<HexadecimalIssue<TInput>> | undefined,
>(message: TMessage): HexadecimalAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function hexadecimal(
message?: ErrorMessage<HexadecimalIssue<string>>
): HexadecimalAction<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/imei/imei.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function imei<
const TMessage extends ErrorMessage<ImeiIssue<TInput>> | undefined,
>(message: TMessage): ImeiAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function imei(
message?: ErrorMessage<ImeiIssue<string>>
): ImeiAction<string, ErrorMessage<ImeiIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/includes/includes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function includes<
message: TMessage
): IncludesAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function includes(
requirement: ContentRequirement<ContentInput>,
message?: ErrorMessage<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/integer/integer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export function integer<
const TMessage extends ErrorMessage<IntegerIssue<TInput>> | undefined,
>(message: TMessage): IntegerAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function integer(
message?: ErrorMessage<IntegerIssue<number>>
): IntegerAction<number, ErrorMessage<IntegerIssue<number>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/ip/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function ip<
const TMessage extends ErrorMessage<IpIssue<TInput>> | undefined,
>(message: TMessage): IpAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function ip(
message?: ErrorMessage<IpIssue<string>>
): IpAction<string, ErrorMessage<IpIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/ipv4/ipv4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function ipv4<
const TMessage extends ErrorMessage<Ipv4Issue<TInput>> | undefined,
>(message: TMessage): Ipv4Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function ipv4(
message?: ErrorMessage<Ipv4Issue<string>>
): Ipv4Action<string, ErrorMessage<Ipv4Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/ipv6/ipv6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function ipv6<
const TMessage extends ErrorMessage<Ipv6Issue<TInput>> | undefined,
>(message: TMessage): Ipv6Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function ipv6(
message?: ErrorMessage<Ipv6Issue<string>>
): Ipv6Action<string, ErrorMessage<Ipv6Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoDate/isoDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function isoDate<
const TMessage extends ErrorMessage<IsoDateIssue<TInput>> | undefined,
>(message: TMessage): IsoDateAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoDate(
message?: ErrorMessage<IsoDateIssue<string>>
): IsoDateAction<string, ErrorMessage<IsoDateIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoDateTime/isoDateTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function isoDateTime<
const TMessage extends ErrorMessage<IsoDateTimeIssue<TInput>> | undefined,
>(message: TMessage): IsoDateTimeAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoDateTime(
message?: ErrorMessage<IsoDateTimeIssue<string>>
): IsoDateTimeAction<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoTime/isoTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export function isoTime<
const TMessage extends ErrorMessage<IsoTimeIssue<TInput>> | undefined,
>(message: TMessage): IsoTimeAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoTime(
message?: ErrorMessage<IsoTimeIssue<string>>
): IsoTimeAction<string, ErrorMessage<IsoTimeIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoTimeSecond/isoTimeSecond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function isoTimeSecond<
const TMessage extends ErrorMessage<IsoTimeSecondIssue<TInput>> | undefined,
>(message: TMessage): IsoTimeSecondAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoTimeSecond(
message?: ErrorMessage<IsoTimeSecondIssue<string>>
): IsoTimeSecondAction<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoTimestamp/isoTimestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export function isoTimestamp<
const TMessage extends ErrorMessage<IsoTimestampIssue<TInput>> | undefined,
>(message: TMessage): IsoTimestampAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoTimestamp(
message?: ErrorMessage<IsoTimestampIssue<string>>
): IsoTimestampAction<
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/isoWeek/isoWeek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export function isoWeek<
const TMessage extends ErrorMessage<IsoWeekIssue<TInput>> | undefined,
>(message: TMessage): IsoWeekAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function isoWeek(
message?: ErrorMessage<IsoWeekIssue<string>>
): IsoWeekAction<string, ErrorMessage<IsoWeekIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/length/length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function length<
message: TMessage
): LengthAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function length(
requirement: number,
message?: ErrorMessage<LengthIssue<LengthInput, number>>
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/mac/mac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function mac<
const TMessage extends ErrorMessage<MacIssue<TInput>> | undefined,
>(message: TMessage): MacAction<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function mac(
message?: ErrorMessage<MacIssue<string>>
): MacAction<string, ErrorMessage<MacIssue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/mac48/mac48.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function mac48<
const TMessage extends ErrorMessage<Mac48Issue<TInput>> | undefined,
>(message: TMessage): Mac48Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function mac48(
message?: ErrorMessage<Mac48Issue<string>>
): Mac48Action<string, ErrorMessage<Mac48Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/mac64/mac64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function mac64<
const TMessage extends ErrorMessage<Mac64Issue<TInput>> | undefined,
>(message: TMessage): Mac64Action<TInput, TMessage>;

// @__NO_SIDE_EFFECTS__
export function mac64(
message?: ErrorMessage<Mac64Issue<string>>
): Mac64Action<string, ErrorMessage<Mac64Issue<string>> | undefined> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/mapItems/mapItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function mapItems<TInput extends ArrayInput, TOutput>(
operation: ArrayAction<TInput, TOutput>
): MapItemsAction<TInput, TOutput>;

// @__NO_SIDE_EFFECTS__
export function mapItems(
operation: ArrayAction<unknown[], unknown>
): MapItemsAction<unknown[], unknown> {
Expand Down
1 change: 1 addition & 0 deletions library/src/actions/maxBytes/maxBytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function maxBytes<
message: TMessage
): MaxBytesAction<TInput, TRequirement, TMessage>;

// @__NO_SIDE_EFFECTS__
export function maxBytes(
requirement: number,
message?: ErrorMessage<MaxBytesIssue<string, number>>
Expand Down
Loading

0 comments on commit e86f355

Please sign in to comment.