import type { NonEmptyArray, NonEmptyReadonlyArray } from "effect/Array" declare global { interface String { /** * Split a string into substrings using the specified separator and return them as an array. * @param splitter An object that can split a string. * @param limit A value used to limit the number of elements returned in the array. */ split(splitter: { [Symbol.split](string: string, limit?: number): string[] }, limit?: number): [string, ...string[]] /** * Split a string into substrings using the specified separator and return them as an array. * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. * @param limit A value used to limit the number of elements returned in the array. */ split(separator: string | RegExp, limit?: number): [string, ...string[]] } interface JSON { /** * Converts a JavaScript Object Notation (JSON) string into an object. * @param text A valid JSON string. * @param reviver A function that transforms the results. This function is called for each member of the object. * If a member contains nested objects, the nested objects are transformed before the parent object is. */ parse(text: string, reviver?: (this: any, key: string, value: any) => any): unknown } interface Body { json(): Promise } interface Array { map( this: NonEmptyArray, map: (a: A, index: number) => B ): NonEmptyArray } interface ReadonlyArray { // Subsequent property declarations must have the same type. Property 'length' must be of type 'number', but here has type 'NonNegativeInt'. // readonly length: NonNegativeInt map( this: NonEmptyReadonlyArray, map: (a: A, index: number) => B ): NonEmptyReadonlyArray } } declare module "effect/Option" { export interface None { get value(): A | undefined } } // TODO: v4 migration — Either module augmentation removed (Either → Result) // Previously added .right to Left and .left to Right for convenience access