Erster Docker-Stand

This commit is contained in:
Ali
2026-02-20 16:06:40 +09:00
commit f31e2e8ed3
8818 changed files with 1605323 additions and 0 deletions

69
_node_modules/effect/dist/dts/Arbitrary.d.ts generated vendored Normal file
View File

@@ -0,0 +1,69 @@
/**
* @since 3.10.0
*/
import * as FastCheck from "./FastCheck.js";
import type * as Schema from "./Schema.js";
/**
* @category model
* @since 3.10.0
*/
export interface LazyArbitrary<A> {
(fc: typeof FastCheck): FastCheck.Arbitrary<A>;
}
/**
* @category annotations
* @since 3.10.0
*/
export interface ArbitraryGenerationContext {
readonly maxDepth: number;
readonly depthIdentifier?: string;
readonly constraints?: StringConstraints | NumberConstraints | BigIntConstraints | DateConstraints | ArrayConstraints;
}
/**
* @category annotations
* @since 3.10.0
*/
export type ArbitraryAnnotation<A, TypeParameters extends ReadonlyArray<any> = readonly []> = (...arbitraries: [
...{
readonly [K in keyof TypeParameters]: LazyArbitrary<TypeParameters[K]>;
},
ctx: ArbitraryGenerationContext
]) => LazyArbitrary<A>;
/**
* Returns a LazyArbitrary for the `A` type of the provided schema.
*
* @category arbitrary
* @since 3.10.0
*/
export declare const makeLazy: <A, I, R>(schema: Schema.Schema<A, I, R>) => LazyArbitrary<A>;
/**
* Returns a fast-check Arbitrary for the `A` type of the provided schema.
*
* @category arbitrary
* @since 3.10.0
*/
export declare const make: <A, I, R>(schema: Schema.Schema<A, I, R>) => FastCheck.Arbitrary<A>;
interface StringConstraints {
readonly _tag: "StringConstraints";
readonly constraints: FastCheck.StringSharedConstraints;
readonly pattern?: string;
}
interface NumberConstraints {
readonly _tag: "NumberConstraints";
readonly constraints: FastCheck.FloatConstraints;
readonly isInteger: boolean;
}
interface BigIntConstraints {
readonly _tag: "BigIntConstraints";
readonly constraints: FastCheck.BigIntConstraints;
}
interface ArrayConstraints {
readonly _tag: "ArrayConstraints";
readonly constraints: FastCheck.ArrayConstraints;
}
interface DateConstraints {
readonly _tag: "DateConstraints";
readonly constraints: FastCheck.DateConstraints;
}
export {};
//# sourceMappingURL=Arbitrary.d.ts.map

1
_node_modules/effect/dist/dts/Arbitrary.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Arbitrary.d.ts","sourceRoot":"","sources":["../../src/Arbitrary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAO3C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAI1C;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,CAAC,EAAE,EAAE,OAAO,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;CAC/C;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,eAAe,GAAG,gBAAgB,CAAA;CACtH;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,cAAc,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,EAAE,IAAI,CAC5F,GAAG,WAAW,EAAE;IACd,GAAG;QAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;KAAE;IAC7E,GAAG,EAAE,0BAA0B;CAChC,KACE,aAAa,CAAC,CAAC,CAAC,CAAA;AAErB;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,CAGjF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAgC,CAAA;AAEpH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,uBAAuB,CAAA;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAwBD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAAA;IAChD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B;AAsCD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAA;CAClD;AAoBD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAAA;CACjD;AAoBD,UAAU,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,eAAe,CAAA;CAChD"}

5922
_node_modules/effect/dist/dts/Array.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Array.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1483
_node_modules/effect/dist/dts/BigDecimal.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/BigDecimal.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1033
_node_modules/effect/dist/dts/BigInt.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/BigInt.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

523
_node_modules/effect/dist/dts/Boolean.d.ts generated vendored Normal file
View File

@@ -0,0 +1,523 @@
/**
* This module provides utility functions and type class instances for working with the `boolean` type in TypeScript.
* It includes functions for basic boolean operations, as well as type class instances for
* `Equivalence` and `Order`.
*
* @since 2.0.0
*/
import * as equivalence from "./Equivalence.js";
import type { LazyArg } from "./Function.js";
import * as order from "./Order.js";
/**
* Tests if a value is a `boolean`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { isBoolean } from "effect/Boolean"
*
* assert.deepStrictEqual(isBoolean(true), true)
* assert.deepStrictEqual(isBoolean("true"), false)
* ```
*
* @category guards
* @since 2.0.0
*/
export declare const isBoolean: (input: unknown) => input is boolean;
/**
* This function returns the result of either of the given functions depending on the value of the boolean parameter.
* It is useful when you have to run one of two functions depending on the boolean value.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Boolean } from "effect"
*
* assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!")
* ```
*
* @category pattern matching
* @since 2.0.0
*/
export declare const match: {
/**
* This function returns the result of either of the given functions depending on the value of the boolean parameter.
* It is useful when you have to run one of two functions depending on the boolean value.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Boolean } from "effect"
*
* assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!")
* ```
*
* @category pattern matching
* @since 2.0.0
*/
<A, B = A>(options: {
readonly onFalse: LazyArg<A>;
readonly onTrue: LazyArg<B>;
}): (value: boolean) => A | B;
/**
* This function returns the result of either of the given functions depending on the value of the boolean parameter.
* It is useful when you have to run one of two functions depending on the boolean value.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Boolean } from "effect"
*
* assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!")
* ```
*
* @category pattern matching
* @since 2.0.0
*/
<A, B>(value: boolean, options: {
readonly onFalse: LazyArg<A>;
readonly onTrue: LazyArg<B>;
}): A | B;
};
/**
* @category instances
* @since 2.0.0
*/
export declare const Equivalence: equivalence.Equivalence<boolean>;
/**
* @category instances
* @since 2.0.0
*/
export declare const Order: order.Order<boolean>;
/**
* Negates the given boolean: `!self`
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { not } from "effect/Boolean"
*
* assert.deepStrictEqual(not(true), false)
* assert.deepStrictEqual(not(false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const not: (self: boolean) => boolean;
/**
* Combines two boolean using AND: `self && that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { and } from "effect/Boolean"
*
* assert.deepStrictEqual(and(true, true), true)
* assert.deepStrictEqual(and(true, false), false)
* assert.deepStrictEqual(and(false, true), false)
* assert.deepStrictEqual(and(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const and: {
/**
* Combines two boolean using AND: `self && that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { and } from "effect/Boolean"
*
* assert.deepStrictEqual(and(true, true), true)
* assert.deepStrictEqual(and(true, false), false)
* assert.deepStrictEqual(and(false, true), false)
* assert.deepStrictEqual(and(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two boolean using AND: `self && that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { and } from "effect/Boolean"
*
* assert.deepStrictEqual(and(true, true), true)
* assert.deepStrictEqual(and(true, false), false)
* assert.deepStrictEqual(and(false, true), false)
* assert.deepStrictEqual(and(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two boolean using NAND: `!(self && that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nand } from "effect/Boolean"
*
* assert.deepStrictEqual(nand(true, true), false)
* assert.deepStrictEqual(nand(true, false), true)
* assert.deepStrictEqual(nand(false, true), true)
* assert.deepStrictEqual(nand(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const nand: {
/**
* Combines two boolean using NAND: `!(self && that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nand } from "effect/Boolean"
*
* assert.deepStrictEqual(nand(true, true), false)
* assert.deepStrictEqual(nand(true, false), true)
* assert.deepStrictEqual(nand(false, true), true)
* assert.deepStrictEqual(nand(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two boolean using NAND: `!(self && that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nand } from "effect/Boolean"
*
* assert.deepStrictEqual(nand(true, true), false)
* assert.deepStrictEqual(nand(true, false), true)
* assert.deepStrictEqual(nand(false, true), true)
* assert.deepStrictEqual(nand(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two boolean using OR: `self || that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { or } from "effect/Boolean"
*
* assert.deepStrictEqual(or(true, true), true)
* assert.deepStrictEqual(or(true, false), true)
* assert.deepStrictEqual(or(false, true), true)
* assert.deepStrictEqual(or(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const or: {
/**
* Combines two boolean using OR: `self || that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { or } from "effect/Boolean"
*
* assert.deepStrictEqual(or(true, true), true)
* assert.deepStrictEqual(or(true, false), true)
* assert.deepStrictEqual(or(false, true), true)
* assert.deepStrictEqual(or(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two boolean using OR: `self || that`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { or } from "effect/Boolean"
*
* assert.deepStrictEqual(or(true, true), true)
* assert.deepStrictEqual(or(true, false), true)
* assert.deepStrictEqual(or(false, true), true)
* assert.deepStrictEqual(or(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two booleans using NOR: `!(self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nor } from "effect/Boolean"
*
* assert.deepStrictEqual(nor(true, true), false)
* assert.deepStrictEqual(nor(true, false), false)
* assert.deepStrictEqual(nor(false, true), false)
* assert.deepStrictEqual(nor(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const nor: {
/**
* Combines two booleans using NOR: `!(self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nor } from "effect/Boolean"
*
* assert.deepStrictEqual(nor(true, true), false)
* assert.deepStrictEqual(nor(true, false), false)
* assert.deepStrictEqual(nor(false, true), false)
* assert.deepStrictEqual(nor(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two booleans using NOR: `!(self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { nor } from "effect/Boolean"
*
* assert.deepStrictEqual(nor(true, true), false)
* assert.deepStrictEqual(nor(true, false), false)
* assert.deepStrictEqual(nor(false, true), false)
* assert.deepStrictEqual(nor(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two booleans using XOR: `(!self && that) || (self && !that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { xor } from "effect/Boolean"
*
* assert.deepStrictEqual(xor(true, true), false)
* assert.deepStrictEqual(xor(true, false), true)
* assert.deepStrictEqual(xor(false, true), true)
* assert.deepStrictEqual(xor(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const xor: {
/**
* Combines two booleans using XOR: `(!self && that) || (self && !that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { xor } from "effect/Boolean"
*
* assert.deepStrictEqual(xor(true, true), false)
* assert.deepStrictEqual(xor(true, false), true)
* assert.deepStrictEqual(xor(false, true), true)
* assert.deepStrictEqual(xor(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two booleans using XOR: `(!self && that) || (self && !that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { xor } from "effect/Boolean"
*
* assert.deepStrictEqual(xor(true, true), false)
* assert.deepStrictEqual(xor(true, false), true)
* assert.deepStrictEqual(xor(false, true), true)
* assert.deepStrictEqual(xor(false, false), false)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { eqv } from "effect/Boolean"
*
* assert.deepStrictEqual(eqv(true, true), true)
* assert.deepStrictEqual(eqv(true, false), false)
* assert.deepStrictEqual(eqv(false, true), false)
* assert.deepStrictEqual(eqv(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const eqv: {
/**
* Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { eqv } from "effect/Boolean"
*
* assert.deepStrictEqual(eqv(true, true), true)
* assert.deepStrictEqual(eqv(true, false), false)
* assert.deepStrictEqual(eqv(false, true), false)
* assert.deepStrictEqual(eqv(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { eqv } from "effect/Boolean"
*
* assert.deepStrictEqual(eqv(true, true), true)
* assert.deepStrictEqual(eqv(true, false), false)
* assert.deepStrictEqual(eqv(false, true), false)
* assert.deepStrictEqual(eqv(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* Combines two booleans using an implication: `(!self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { implies } from "effect/Boolean"
*
* assert.deepStrictEqual(implies(true, true), true)
* assert.deepStrictEqual(implies(true, false), false)
* assert.deepStrictEqual(implies(false, true), true)
* assert.deepStrictEqual(implies(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
export declare const implies: {
/**
* Combines two booleans using an implication: `(!self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { implies } from "effect/Boolean"
*
* assert.deepStrictEqual(implies(true, true), true)
* assert.deepStrictEqual(implies(true, false), false)
* assert.deepStrictEqual(implies(false, true), true)
* assert.deepStrictEqual(implies(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(that: boolean): (self: boolean) => boolean;
/**
* Combines two booleans using an implication: `(!self || that)`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { implies } from "effect/Boolean"
*
* assert.deepStrictEqual(implies(true, true), true)
* assert.deepStrictEqual(implies(true, false), false)
* assert.deepStrictEqual(implies(false, true), true)
* assert.deepStrictEqual(implies(false, false), true)
* ```
*
* @category combinators
* @since 2.0.0
*/
(self: boolean, that: boolean): boolean;
};
/**
* This utility function is used to check if all the elements in a collection of boolean values are `true`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { every } from "effect/Boolean"
*
* assert.deepStrictEqual(every([true, true, true]), true)
* assert.deepStrictEqual(every([true, false, true]), false)
* ```
*
* @since 2.0.0
*/
export declare const every: (collection: Iterable<boolean>) => boolean;
/**
* This utility function is used to check if at least one of the elements in a collection of boolean values is `true`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { some } from "effect/Boolean"
*
* assert.deepStrictEqual(some([true, false, true]), true)
* assert.deepStrictEqual(some([false, false, false]), false)
* ```
*
* @since 2.0.0
*/
export declare const some: (collection: Iterable<boolean>) => boolean;
//# sourceMappingURL=Boolean.d.ts.map

1
_node_modules/effect/dist/dts/Boolean.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../src/Boolean.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;A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IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CACiD,CAAA;AAE1F;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,EAAE;IAChB;;;;;;;;;;;;;;;;OAgBG;IACH,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CAC+B,CAAA;AAExE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IAC3C;;;;;;;;;;;;;;;;OAgBG;IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CACM,CAAA;AAE/C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,GAAI,YAAY,QAAQ,CAAC,OAAO,CAAC,KAAG,OAOrD,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,IAAI,GAAI,YAAY,QAAQ,CAAC,OAAO,CAAC,KAAG,OAOpD,CAAA"}

234
_node_modules/effect/dist/dts/Brand.d.ts generated vendored Normal file
View File

@@ -0,0 +1,234 @@
import * as Either from "./Either.js";
import * as Option from "./Option.js";
import type { Predicate } from "./Predicate.js";
import type * as Types from "./Types.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const BrandTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type BrandTypeId = typeof BrandTypeId;
/**
* @since 2.0.0
* @category symbols
*/
export declare const RefinedConstructorsTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type RefinedConstructorsTypeId = typeof RefinedConstructorsTypeId;
/**
* A generic interface that defines a branded type.
*
* @since 2.0.0
* @category models
*/
export interface Brand<in out K extends string | symbol> {
readonly [BrandTypeId]: {
readonly [k in K]: K;
};
}
/**
* @since 2.0.0
*/
export declare namespace Brand {
/**
* Represents a list of refinement errors.
*
* @since 2.0.0
* @category models
*/
interface BrandErrors extends Array<RefinementError> {
}
/**
* Represents an error that occurs when the provided value of the branded type does not pass the refinement predicate.
*
* @since 2.0.0
* @category models
*/
interface RefinementError {
readonly meta: unknown;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
interface Constructor<in out A extends Brand<any>> {
readonly [RefinedConstructorsTypeId]: RefinedConstructorsTypeId;
/**
* Constructs a branded type from a value of type `A`, throwing an error if
* the provided `A` is not valid.
*/
(args: Brand.Unbranded<A>): A;
/**
* Constructs a branded type from a value of type `A`, returning `Some<A>`
* if the provided `A` is valid, `None` otherwise.
*/
option(args: Brand.Unbranded<A>): Option.Option<A>;
/**
* Constructs a branded type from a value of type `A`, returning `Right<A>`
* if the provided `A` is valid, `Left<BrandError>` otherwise.
*/
either(args: Brand.Unbranded<A>): Either.Either<A, Brand.BrandErrors>;
/**
* Attempts to refine the provided value of type `A`, returning `true` if
* the provided `A` is valid, `false` otherwise.
*/
is(a: Brand.Unbranded<A>): a is Brand.Unbranded<A> & A;
}
/**
* A utility type to extract a branded type from a `Brand.Constructor`.
*
* @since 2.0.0
* @category models
*/
type FromConstructor<A> = A extends Brand.Constructor<infer B> ? B : never;
/**
* A utility type to extract the value type from a brand.
*
* @since 2.0.0
* @category models
*/
type Unbranded<P> = P extends infer Q & Brands<P> ? Q : P;
/**
* A utility type to extract the brands from a branded type.
*
* @since 2.0.0
* @category models
*/
type Brands<P> = P extends Brand<any> ? Types.UnionToIntersection<{
[k in keyof P[BrandTypeId]]: k extends string | symbol ? Brand<k> : never;
}[keyof P[BrandTypeId]]> : never;
/**
* A utility type that checks that all brands have the same base type.
*
* @since 2.0.0
* @category models
*/
type EnsureCommonBase<Brands extends readonly [Brand.Constructor<any>, ...Array<Brand.Constructor<any>>]> = {
[B in keyof Brands]: Brand.Unbranded<Brand.FromConstructor<Brands[0]>> extends Brand.Unbranded<Brand.FromConstructor<Brands[B]>> ? Brand.Unbranded<Brand.FromConstructor<Brands[B]>> extends Brand.Unbranded<Brand.FromConstructor<Brands[0]>> ? Brands[B] : Brands[B] : "ERROR: All brands should have the same base type";
};
}
/**
* @category alias
* @since 2.0.0
*/
export type Branded<A, K extends string | symbol> = A & Brand<K>;
/**
* Returns a `BrandErrors` that contains a single `RefinementError`.
*
* @since 2.0.0
* @category constructors
*/
export declare const error: (message: string, meta?: unknown) => Brand.BrandErrors;
/**
* Takes a variable number of `BrandErrors` and returns a single `BrandErrors` that contains all refinement errors.
*
* @since 2.0.0
* @category constructors
*/
export declare const errors: (...errors: Array<Brand.BrandErrors>) => Brand.BrandErrors;
/**
* Returns a `Brand.Constructor` that can construct a branded type from an unbranded value using the provided `refinement`
* predicate as validation of the input data.
*
* If you don't want to perform any validation but only distinguish between two values of the same type but with different meanings,
* see {@link nominal}.
*
* **Example**
*
* ```ts
* import * as assert from "node:assert"
* import { Brand } from "effect"
*
* type Int = number & Brand.Brand<"Int">
*
* const Int = Brand.refined<Int>(
* (n) => Number.isInteger(n),
* (n) => Brand.error(`Expected ${n} to be an integer`)
* )
*
* console.log(Int(1))
* // 1
*
* assert.throws(() => Int(1.1))
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare function refined<A extends Brand<any>>(f: (unbranded: Brand.Unbranded<A>) => Option.Option<Brand.BrandErrors>): Brand.Constructor<A>;
export declare function refined<A extends Brand<any>>(refinement: Predicate<Brand.Unbranded<A>>, onFailure: (unbranded: Brand.Unbranded<A>) => Brand.BrandErrors): Brand.Constructor<A>;
/**
* This function returns a `Brand.Constructor` that **does not apply any runtime checks**, it just returns the provided value.
* It can be used to create nominal types that allow distinguishing between two values of the same type but with different meanings.
*
* If you also want to perform some validation, see {@link refined}.
*
* **Example**
*
* ```ts
* import * as assert from "node:assert"
* import { Brand } from "effect"
*
* type UserId = number & Brand.Brand<"UserId">
*
* const UserId = Brand.nominal<UserId>()
*
* console.log(UserId(1))
* // 1
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const nominal: <A extends Brand<any>>() => Brand.Constructor<A>;
/**
* Combines two or more brands together to form a single branded type.
* This API is useful when you want to validate that the input data passes multiple brand validators.
*
* **Example**
*
* ```ts
* import * as assert from "node:assert"
* import { Brand } from "effect"
*
* type Int = number & Brand.Brand<"Int">
* const Int = Brand.refined<Int>(
* (n) => Number.isInteger(n),
* (n) => Brand.error(`Expected ${n} to be an integer`)
* )
* type Positive = number & Brand.Brand<"Positive">
* const Positive = Brand.refined<Positive>(
* (n) => n > 0,
* (n) => Brand.error(`Expected ${n} to be positive`)
* )
*
* const PositiveInt = Brand.all(Int, Positive)
*
* console.log(PositiveInt(1))
* // 1
*
* assert.throws(() => PositiveInt(1.1))
* ```
*
* @since 2.0.0
* @category combining
*/
export declare const all: <Brands extends readonly [Brand.Constructor<any>, ...Array<Brand.Constructor<any>>]>(...brands: Brand.EnsureCommonBase<Brands>) => Brand.Constructor<Types.UnionToIntersection<{
[B in keyof Brands]: Brand.FromConstructor<Brands[B]>;
}[number]> extends infer X extends Brand<any> ? X : Brand<any>>;
/**
* Retrieves the unbranded value from a `Brand` instance.
*
* @since 3.15.0
* @category getters
*/
export declare const unbranded: <A extends Brand<any>>(branded: A) => Brand.Unbranded<A>;
//# sourceMappingURL=Brand.d.ts.map

1
_node_modules/effect/dist/dts/Brand.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Brand.d.ts","sourceRoot":"","sources":["../../src/Brand.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,KAAK,KAAK,MAAM,Y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S,KAAK,CAAC,GAAG,CAAC,OAAK,KAAK,CAAC,WAAW,CAChE,CAAC,CASF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,GAAG,EAAE,CAAC,MAAM,SAAS,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EACnG,GAAG,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,KACtC,KAAK,CAAC,WAAW,CACpB,KAAK,CAAC,mBAAmB,CAAC;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,SAC1F,MAAM,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAmC9C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC,CAAgB,CAAA"}

241
_node_modules/effect/dist/dts/Cache.d.ts generated vendored Normal file
View File

@@ -0,0 +1,241 @@
/**
* @since 2.0.0
*/
import type * as Duration from "./Duration.js";
import type * as Effect from "./Effect.js";
import type { Either } from "./Either.js";
import type * as Exit from "./Exit.js";
import type * as Option from "./Option.js";
import type * as Predicate from "./Predicate.js";
import type * as Types from "./Types.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const CacheTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type CacheTypeId = typeof CacheTypeId;
/**
* @since 3.6.4
* @category symbols
*/
export declare const ConsumerCacheTypeId: unique symbol;
/**
* @since 3.6.4
* @category symbols
*/
export type ConsumerCacheTypeId = typeof ConsumerCacheTypeId;
/**
* A `Cache` is defined in terms of a lookup function that, given a key of
* type `Key`, can either fail with an error of type `Error` or succeed with a
* value of type `Value`. Getting a value from the cache will either return
* the previous result of the lookup function if it is available or else
* compute a new result with the lookup function, put it in the cache, and
* return it.
*
* A cache also has a specified capacity and time to live. When the cache is
* at capacity the least recently accessed values in the cache will be
* removed to make room for new values. Getting a value with a life older than
* the specified time to live will result in a new value being computed with
* the lookup function and returned when available.
*
* The cache is safe for concurrent access. If multiple fibers attempt to get
* the same key the lookup function will only be computed once and the result
* will be returned to all fibers.
*
* @since 2.0.0
* @category models
*/
export interface Cache<in out Key, in out Value, out Error = never> extends ConsumerCache<Key, Value, Error>, Cache.Variance<Key, Value, Error> {
/**
* Retrieves the value associated with the specified key if it exists.
* Otherwise computes the value with the lookup function, puts it in the
* cache, and returns it.
*/
get(key: Key): Effect.Effect<Value, Error>;
/**
* Retrieves the value associated with the specified key if it exists as a left.
* Otherwise computes the value with the lookup function, puts it in the
* cache, and returns it as a right.
*/
getEither(key: Key): Effect.Effect<Either<Value, Value>, Error>;
/**
* Computes the value associated with the specified key, with the lookup
* function, and puts it in the cache. The difference between this and
* `get` method is that `refresh` triggers (re)computation of the value
* without invalidating it in the cache, so any request to the associated
* key can still be served while the value is being re-computed/retrieved
* by the lookup function. Additionally, `refresh` always triggers the
* lookup function, disregarding the last `Error`.
*/
refresh(key: Key): Effect.Effect<void, Error>;
/**
* Associates the specified value with the specified key in the cache.
*/
set(key: Key, value: Value): Effect.Effect<void>;
}
/**
* A ConsumerCache models a portion of a cache which is safe to share without allowing to create new values or access existing ones.
*
* It can be used safely to give over control for request management without leaking writer side details.
*
* @since 2.0.0
* @category models
*/
export interface ConsumerCache<in out Key, out Value, out Error = never> extends Cache.ConsumerVariance<Key, Value, Error> {
/**
* Retrieves the value associated with the specified key if it exists.
* Otherwise returns `Option.none`.
*/
getOption(key: Key): Effect.Effect<Option.Option<Value>, Error>;
/**
* Retrieves the value associated with the specified key if it exists and the
* lookup function has completed. Otherwise returns `Option.none`.
*/
getOptionComplete(key: Key): Effect.Effect<Option.Option<Value>>;
/**
* Returns statistics for this cache.
*/
readonly cacheStats: Effect.Effect<CacheStats>;
/**
* Returns whether a value associated with the specified key exists in the
* cache.
*/
contains(key: Key): Effect.Effect<boolean>;
/**
* Returns statistics for the specified entry.
*/
entryStats(key: Key): Effect.Effect<Option.Option<EntryStats>>;
/**
* Invalidates the value associated with the specified key.
*/
invalidate(key: Key): Effect.Effect<void>;
/**
* Invalidates the value associated with the specified key if the predicate holds.
*/
invalidateWhen(key: Key, predicate: Predicate.Predicate<Value>): Effect.Effect<void>;
/**
* Invalidates all values in the cache.
*/
readonly invalidateAll: Effect.Effect<void>;
/**
* Returns the approximate number of values in the cache.
*/
readonly size: Effect.Effect<number>;
/**
* Returns an approximation of the values in the cache.
*/
readonly keys: Effect.Effect<Array<Key>>;
/**
* Returns an approximation of the values in the cache.
*/
readonly values: Effect.Effect<Array<Value>>;
/**
* Returns an approximation of the values in the cache.
*/
readonly entries: Effect.Effect<Array<[Key, Value]>>;
}
/**
* @since 2.0.0
*/
export declare namespace Cache {
/**
* @since 2.0.0
* @category models
*/
interface Variance<in out Key, in out Value, out Error> {
readonly [CacheTypeId]: {
readonly _Key: Types.Invariant<Key>;
readonly _Error: Types.Covariant<Error>;
readonly _Value: Types.Invariant<Value>;
};
}
/**
* @since 3.6.4
* @category models
*/
interface ConsumerVariance<in out Key, out Value, out Error> {
readonly [ConsumerCacheTypeId]: {
readonly _Key: Types.Invariant<Key>;
readonly _Error: Types.Covariant<Error>;
readonly _Value: Types.Covariant<Value>;
};
}
}
/**
* Constructs a new cache with the specified capacity, time to live, and
* lookup function.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: <Key, Value, Error = never, Environment = never>(options: {
readonly capacity: number;
readonly timeToLive: Duration.DurationInput;
readonly lookup: Lookup<Key, Value, Error, Environment>;
}) => Effect.Effect<Cache<Key, Value, Error>, never, Environment>;
/**
* Constructs a new cache with the specified capacity, time to live, and
* lookup function, where the time to live can depend on the `Exit` value
* returned by the lookup function.
*
* @since 2.0.0
* @category constructors
*/
export declare const makeWith: <Key, Value, Error = never, Environment = never>(options: {
readonly capacity: number;
readonly lookup: Lookup<Key, Value, Error, Environment>;
readonly timeToLive: (exit: Exit.Exit<Value, Error>) => Duration.DurationInput;
}) => Effect.Effect<Cache<Key, Value, Error>, never, Environment>;
/**
* `CacheStats` represents a snapshot of statistics for the cache as of a
* point in time.
*
* @since 2.0.0
* @category models
*/
export interface CacheStats {
readonly hits: number;
readonly misses: number;
readonly size: number;
}
/**
* Constructs a new `CacheStats` from the specified values.
*
* @since 2.0.0
* @category constructors
*/
export declare const makeCacheStats: (options: {
readonly hits: number;
readonly misses: number;
readonly size: number;
}) => CacheStats;
/**
* Represents a snapshot of statistics for an entry in the cache.
*
* @since 2.0.0
* @category models
*/
export interface EntryStats {
readonly loadedMillis: number;
}
/**
* Constructs a new `EntryStats` from the specified values.
*
* @since 2.0.0
* @category constructors
*/
export declare const makeEntryStats: (loadedMillis: number) => EntryStats;
/**
* A `Lookup` represents a lookup function that, given a key of type `Key`, can
* return an effect that will either produce a value of type `Value` or fail
* with an error of type `Error` using an environment of type `Environment`.
*
* @since 2.0.0
* @category models
*/
export type Lookup<Key, Value, Error = never, Environment = never> = (key: Key) => Effect.Effect<Value, Error, Environment>;
//# sourceMappingURL=Cache.d.ts.map

1
_node_modules/effect/dist/dts/Cache.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAA;AAEtC,OAAO,KAAK,K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AAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,KACE,UAAoC,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,UAAoC,CAAA;AAE3F;;;;;;;GAOG;AACH,MAAM,MAAM,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,IAAI,CACnE,GAAG,EAAE,GAAG,KACL,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA"}

1928
_node_modules/effect/dist/dts/Cause.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Cause.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1989
_node_modules/effect/dist/dts/Channel.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Channel.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,135 @@
/**
* @since 2.0.0
* @category symbols
*/
export declare const ChildExecutorDecisionTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ChildExecutorDecisionTypeId = typeof ChildExecutorDecisionTypeId;
/**
* @since 2.0.0
* @category models
*/
export type ChildExecutorDecision = Continue | Close | Yield;
/**
* @since 2.0.0
*/
export declare namespace ChildExecutorDecision {
/**
* @since 2.0.0
* @category models
*/
interface Proto {
readonly [ChildExecutorDecisionTypeId]: ChildExecutorDecisionTypeId;
}
}
/**
* Continue executing the current substream
*
* @since 2.0.0
* @category models
*/
export interface Continue extends ChildExecutorDecision.Proto {
readonly _tag: "Continue";
}
/**
* Close the current substream with a given value and pass execution to the
* next substream
*
* @since 2.0.0
* @category models
*/
export interface Close extends ChildExecutorDecision.Proto {
readonly _tag: "Close";
readonly value: unknown;
}
/**
* Pass execution to the next substream. This either pulls a new element
* from upstream, or yields to an already created active substream.
*
* @since 2.0.0
* @category models
*/
export interface Yield extends ChildExecutorDecision.Proto {
readonly _tag: "Yield";
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const Continue: (_: void) => ChildExecutorDecision;
/**
* @since 2.0.0
* @category constructors
*/
export declare const Close: (value: unknown) => ChildExecutorDecision;
/**
* @since 2.0.0
* @category constructors
*/
export declare const Yield: (_: void) => ChildExecutorDecision;
/**
* Returns `true` if the specified value is a `ChildExecutorDecision`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isChildExecutorDecision: (u: unknown) => u is ChildExecutorDecision;
/**
* Returns `true` if the specified `ChildExecutorDecision` is a `Continue`,
* `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isContinue: (self: ChildExecutorDecision) => self is Continue;
/**
* Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isClose: (self: ChildExecutorDecision) => self is Close;
/**
* Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isYield: (self: ChildExecutorDecision) => self is Yield;
/**
* Folds over a `ChildExecutorDecision` to produce a value of type `A`.
*
* @since 2.0.0
* @category folding
*/
export declare const match: {
/**
* Folds over a `ChildExecutorDecision` to produce a value of type `A`.
*
* @since 2.0.0
* @category folding
*/
<A>(options: {
readonly onContinue: () => A;
readonly onClose: (value: unknown) => A;
readonly onYield: () => A;
}): (self: ChildExecutorDecision) => A;
/**
* Folds over a `ChildExecutorDecision` to produce a value of type `A`.
*
* @since 2.0.0
* @category folding
*/
<A>(self: ChildExecutorDecision, options: {
readonly onContinue: () => A;
readonly onClose: (value: unknown) => A;
readonly onYield: () => A;
}): A;
};
//# sourceMappingURL=ChildExecutorDecision.d.ts.map

View File

@@ -0,0 +1 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;AAEnH;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,IAAI,QAA8B,CAAA;AAEhG;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,IAAI,KAAwB,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,IAAI,KAAwB,CAAA;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;OAKG;IACH,CAAC,CAAC,EACD,OAAO,EAAE;QACP,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;QACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;KAC1B,GACC,CAAC,IAAI,EAAE,qBAAqB,KAAK,CAAC,CAAA;IACrC;;;;;OAKG;IACH,CAAC,CAAC,EACD,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE;QACP,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;QACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;KAC1B,GACC,CAAC,CAAA;CACY,CAAA"}

1709
_node_modules/effect/dist/dts/Chunk.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Chunk.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

97
_node_modules/effect/dist/dts/Clock.d.ts generated vendored Normal file
View File

@@ -0,0 +1,97 @@
/**
* @since 2.0.0
*/
import type * as Context from "./Context.js";
import type * as Duration from "./Duration.js";
import type * as Effect from "./Effect.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const ClockTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ClockTypeId = typeof ClockTypeId;
/**
* Represents a time-based clock which provides functionality related to time
* and scheduling.
*
* @since 2.0.0
* @category models
*/
export interface Clock {
readonly [ClockTypeId]: ClockTypeId;
/**
* Unsafely returns the current time in milliseconds.
*/
unsafeCurrentTimeMillis(): number;
/**
* Returns the current time in milliseconds.
*/
readonly currentTimeMillis: Effect.Effect<number>;
/**
* Unsafely returns the current time in nanoseconds.
*/
unsafeCurrentTimeNanos(): bigint;
/**
* Returns the current time in nanoseconds.
*/
readonly currentTimeNanos: Effect.Effect<bigint>;
/**
* Asynchronously sleeps for the specified duration.
*/
sleep(duration: Duration.Duration): Effect.Effect<void>;
}
/**
* @since 2.0.0
* @category models
*/
export type CancelToken = () => boolean;
/**
* @since 2.0.0
* @category models
*/
export type Task = () => void;
/**
* @since 2.0.0
* @category models
*/
export interface ClockScheduler {
/**
* Unsafely schedules the specified task for the specified duration.
*/
unsafeSchedule(task: Task, duration: Duration.Duration): CancelToken;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const make: (_: void) => Clock;
/**
* @since 2.0.0
* @category constructors
*/
export declare const sleep: (duration: Duration.DurationInput) => Effect.Effect<void>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const currentTimeMillis: Effect.Effect<number>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const currentTimeNanos: Effect.Effect<bigint>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
/**
* @since 2.0.0
* @category context
*/
export declare const Clock: Context.Tag<Clock, Clock>;
//# sourceMappingURL=Clock.d.ts.map

1
_node_modules/effect/dist/dts/Clock.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Clock.d.ts","sourceRoot":"","sources":["../../src/Clock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,K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AAErG;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAqC,CAAA;AAEzF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAoC,CAAA;AAEvF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAC5E,CAAA;AAE3B;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAqB,CAAA"}

667
_node_modules/effect/dist/dts/Config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,667 @@
/**
* @since 2.0.0
*/
import type * as Brand from "./Brand.js";
import type * as Chunk from "./Chunk.js";
import type * as ConfigError from "./ConfigError.js";
import type * as Duration from "./Duration.js";
import type * as Effect from "./Effect.js";
import type * as Either from "./Either.js";
import type { LazyArg } from "./Function.js";
import type * as HashMap from "./HashMap.js";
import type * as HashSet from "./HashSet.js";
import type * as LogLevel from "./LogLevel.js";
import type * as Option from "./Option.js";
import type { Predicate, Refinement } from "./Predicate.js";
import type * as Redacted from "./Redacted.js";
import type * as Secret from "./Secret.js";
import type * as Types from "./Types.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const ConfigTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ConfigTypeId = typeof ConfigTypeId;
/**
* A `Config` describes the structure of some configuration data.
*
* @since 2.0.0
* @category models
*/
export interface Config<out A> extends Config.Variance<A>, Effect.Effect<A, ConfigError.ConfigError> {
}
/**
* @since 2.0.0
*/
export declare namespace Config {
/**
* @since 2.0.0
* @category models
*/
interface Variance<out A> {
readonly [ConfigTypeId]: {
readonly _A: Types.Covariant<A>;
};
}
/**
* @since 2.5.0
* @category models
*/
type Success<T extends Config<any>> = [T] extends [Config<infer _A>] ? _A : never;
/**
* @since 2.0.0
* @category models
*/
interface Primitive<out A> extends Config<A> {
readonly description: string;
parse(text: string): Either.Either<A, ConfigError.ConfigError>;
}
/**
* Wraps a nested structure, converting all primitives to a `Config`.
*
* `Config.Wrap<{ key: string }>` becomes `{ key: Config<string> }`
*
* To create the resulting config, use the `unwrap` constructor.
*
* @since 2.0.0
* @category models
*/
type Wrap<A> = [NonNullable<A>] extends [infer T] ? [IsPlainObject<T>] extends [true] ? {
readonly [K in keyof A]: Wrap<A[K]>;
} | Config<A> : Config<A> : Config<A>;
type IsPlainObject<A> = [A] extends [Record<string, any>] ? [keyof A] extends [never] ? false : [keyof A] extends [string] ? true : false : false;
}
/**
* @since 2.0.0
* @category models
*/
export type LiteralValue = string | number | boolean | null | bigint;
/**
* Constructs a config from a tuple / struct / arguments of configs.
*
* @since 2.0.0
* @category constructors
*/
export declare const all: <const Arg extends Iterable<Config<any>> | Record<string, Config<any>>>(arg: Arg) => Config<[
Arg
] extends [ReadonlyArray<Config<any>>] ? {
-readonly [K in keyof Arg]: [Arg[K]] extends [Config<infer A>] ? A : never;
} : [Arg] extends [Iterable<Config<infer A>>] ? Array<A> : [Arg] extends [Record<string, Config<any>>] ? {
-readonly [K in keyof Arg]: [Arg[K]] extends [Config<infer A>] ? A : never;
} : never>;
/**
* Constructs a config for an array of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const array: <A>(config: Config<A>, name?: string) => Config<Array<A>>;
/**
* Constructs a config for a boolean value.
*
* @since 2.0.0
* @category constructors
*/
export declare const boolean: (name?: string) => Config<boolean>;
/**
* Constructs a config for a network port [1, 65535].
*
* @since 3.16.0
* @category constructors
*/
export declare const port: (name?: string) => Config<number>;
/**
* Constructs a config for an URL value.
*
* @since 3.11.0
* @category constructors
*/
export declare const url: (name?: string) => Config<URL>;
/**
* Constructs a config for a sequence of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const chunk: <A>(config: Config<A>, name?: string) => Config<Chunk.Chunk<A>>;
/**
* Constructs a config for a date value.
*
* @since 2.0.0
* @category constructors
*/
export declare const date: (name?: string) => Config<Date>;
/**
* Constructs a config that fails with the specified message.
*
* @since 2.0.0
* @category constructors
*/
export declare const fail: (message: string) => Config<never>;
/**
* Constructs a config for a float value.
*
* @since 2.0.0
* @category constructors
*/
export declare const number: (name?: string) => Config<number>;
/**
* Constructs a config for a integer value.
*
* @since 2.0.0
* @category constructors
*/
export declare const integer: (name?: string) => Config<number>;
/**
* Constructs a config for a literal value.
*
* **Example**
*
* ```ts
* import { Config } from "effect"
*
* const config = Config.literal("http", "https")("PROTOCOL")
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const literal: <Literals extends ReadonlyArray<LiteralValue>>(...literals: Literals) => (name?: string) => Config<Literals[number]>;
/**
* Constructs a config for a `LogLevel` value.
*
* @since 2.0.0
* @category constructors
*/
export declare const logLevel: (name?: string) => Config<LogLevel.LogLevel>;
/**
* Constructs a config for a duration value.
*
* @since 2.5.0
* @category constructors
*/
export declare const duration: (name?: string) => Config<Duration.Duration>;
/**
* This function returns `true` if the specified value is an `Config` value,
* `false` otherwise.
*
* This function can be useful for checking the type of a value before
* attempting to operate on it as an `Config` value. For example, you could
* use `isConfig` to check the type of a value before using it as an
* argument to a function that expects an `Config` value.
*
* @since 2.0.0
* @category refinements
*/
export declare const isConfig: (u: unknown) => u is Config<unknown>;
/**
* Returns a config whose structure is the same as this one, but which produces
* a different value, constructed using the specified function.
*
* @since 2.0.0
* @category mapping
*/
export declare const map: {
/**
* Returns a config whose structure is the same as this one, but which produces
* a different value, constructed using the specified function.
*
* @since 2.0.0
* @category mapping
*/
<A, B>(f: (a: A) => B): (self: Config<A>) => Config<B>;
/**
* Returns a config whose structure is the same as this one, but which produces
* a different value, constructed using the specified function.
*
* @since 2.0.0
* @category mapping
*/
<A, B>(self: Config<A>, f: (a: A) => B): Config<B>;
};
/**
* Returns a config whose structure is the same as this one, but which may
* produce a different value, constructed using the specified function, which
* may throw exceptions that will be translated into validation errors.
*
* @since 2.0.0
* @category utils
*/
export declare const mapAttempt: {
/**
* Returns a config whose structure is the same as this one, but which may
* produce a different value, constructed using the specified function, which
* may throw exceptions that will be translated into validation errors.
*
* @since 2.0.0
* @category utils
*/
<A, B>(f: (a: A) => B): (self: Config<A>) => Config<B>;
/**
* Returns a config whose structure is the same as this one, but which may
* produce a different value, constructed using the specified function, which
* may throw exceptions that will be translated into validation errors.
*
* @since 2.0.0
* @category utils
*/
<A, B>(self: Config<A>, f: (a: A) => B): Config<B>;
};
/**
* Returns a new config whose structure is the samea as this one, but which
* may produce a different value, constructed using the specified fallible
* function.
*
* @since 2.0.0
* @category utils
*/
export declare const mapOrFail: {
/**
* Returns a new config whose structure is the samea as this one, but which
* may produce a different value, constructed using the specified fallible
* function.
*
* @since 2.0.0
* @category utils
*/
<A, B>(f: (a: A) => Either.Either<B, ConfigError.ConfigError>): (self: Config<A>) => Config<B>;
/**
* Returns a new config whose structure is the samea as this one, but which
* may produce a different value, constructed using the specified fallible
* function.
*
* @since 2.0.0
* @category utils
*/
<A, B>(self: Config<A>, f: (a: A) => Either.Either<B, ConfigError.ConfigError>): Config<B>;
};
/**
* Returns a config that has this configuration nested as a property of the
* specified name.
*
* @since 2.0.0
* @category utils
*/
export declare const nested: {
/**
* Returns a config that has this configuration nested as a property of the
* specified name.
*
* @since 2.0.0
* @category utils
*/
(name: string): <A>(self: Config<A>) => Config<A>;
/**
* Returns a config that has this configuration nested as a property of the
* specified name.
*
* @since 2.0.0
* @category utils
*/
<A>(self: Config<A>, name: string): Config<A>;
};
/**
* Returns a config whose structure is preferentially described by this
* config, but which falls back to the specified config if there is an issue
* reading from this config.
*
* @since 2.0.0
* @category utils
*/
export declare const orElse: {
/**
* Returns a config whose structure is preferentially described by this
* config, but which falls back to the specified config if there is an issue
* reading from this config.
*
* @since 2.0.0
* @category utils
*/
<A2>(that: LazyArg<Config<A2>>): <A>(self: Config<A>) => Config<A2 | A>;
/**
* Returns a config whose structure is preferentially described by this
* config, but which falls back to the specified config if there is an issue
* reading from this config.
*
* @since 2.0.0
* @category utils
*/
<A, A2>(self: Config<A>, that: LazyArg<Config<A2>>): Config<A | A2>;
};
/**
* Returns configuration which reads from this configuration, but which falls
* back to the specified configuration if reading from this configuration
* fails with an error satisfying the specified predicate.
*
* @since 2.0.0
* @category utils
*/
export declare const orElseIf: {
/**
* Returns configuration which reads from this configuration, but which falls
* back to the specified configuration if reading from this configuration
* fails with an error satisfying the specified predicate.
*
* @since 2.0.0
* @category utils
*/
<A2>(options: {
readonly if: Predicate<ConfigError.ConfigError>;
readonly orElse: LazyArg<Config<A2>>;
}): <A>(self: Config<A>) => Config<A>;
/**
* Returns configuration which reads from this configuration, but which falls
* back to the specified configuration if reading from this configuration
* fails with an error satisfying the specified predicate.
*
* @since 2.0.0
* @category utils
*/
<A, A2>(self: Config<A>, options: {
readonly if: Predicate<ConfigError.ConfigError>;
readonly orElse: LazyArg<Config<A2>>;
}): Config<A>;
};
/**
* Returns an optional version of this config, which will be `None` if the
* data is missing from configuration, and `Some` otherwise.
*
* @since 2.0.0
* @category utils
*/
export declare const option: <A>(self: Config<A>) => Config<Option.Option<A>>;
/**
* Constructs a new primitive config.
*
* @since 2.0.0
* @category constructors
*/
export declare const primitive: <A>(description: string, parse: (text: string) => Either.Either<A, ConfigError.ConfigError>) => Config<A>;
/**
* Returns a config that describes a sequence of values, each of which has the
* structure of this config.
*
* @since 2.0.0
* @category utils
*/
export declare const repeat: <A>(self: Config<A>) => Config<Array<A>>;
/**
* Constructs a config for a secret value.
*
* @since 2.0.0
* @category constructors
* @deprecated
*/
export declare const secret: (name?: string) => Config<Secret.Secret>;
/**
* Constructs a config for a redacted value.
*
* @since 2.0.0
* @category constructors
*/
export declare const redacted: {
/**
* Constructs a config for a redacted value.
*
* @since 2.0.0
* @category constructors
*/
(name?: string): Config<Redacted.Redacted>;
/**
* Constructs a config for a redacted value.
*
* @since 2.0.0
* @category constructors
*/
<A>(config: Config<A>): Config<Redacted.Redacted<A>>;
};
/**
* Constructs a config for a branded value.
*
* @since 3.16.0
* @category constructors
*/
export declare const branded: {
/**
* Constructs a config for a branded value.
*
* @since 3.16.0
* @category constructors
*/
<A, B extends Brand.Branded<A, any>>(constructor: Brand.Brand.Constructor<B>): (config: Config<A>) => Config<B>;
/**
* Constructs a config for a branded value.
*
* @since 3.16.0
* @category constructors
*/
<B extends Brand.Branded<string, any>>(name: string | undefined, constructor: Brand.Brand.Constructor<B>): Config<B>;
/**
* Constructs a config for a branded value.
*
* @since 3.16.0
* @category constructors
*/
<A, B extends Brand.Branded<A, any>>(config: Config<A>, constructor: Brand.Brand.Constructor<B>): Config<B>;
};
/**
* Constructs a config for a sequence of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const hashSet: <A>(config: Config<A>, name?: string) => Config<HashSet.HashSet<A>>;
/**
* Constructs a config for a string value.
*
* @since 2.0.0
* @category constructors
*/
export declare const string: (name?: string) => Config<string>;
/**
* Constructs a config for a non-empty string value.
*
* @since 3.7.0
* @category constructors
*/
export declare const nonEmptyString: (name?: string) => Config<string>;
/**
* Constructs a config which contains the specified value.
*
* @since 2.0.0
* @category constructors
*/
export declare const succeed: <A>(value: A) => Config<A>;
/**
* Lazily constructs a config.
*
* @since 2.0.0
* @category constructors
*/
export declare const suspend: <A>(config: LazyArg<Config<A>>) => Config<A>;
/**
* Constructs a config which contains the specified lazy value.
*
* @since 2.0.0
* @category constructors
*/
export declare const sync: <A>(value: LazyArg<A>) => Config<A>;
/**
* Constructs a config for a sequence of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const hashMap: <A>(config: Config<A>, name?: string) => Config<HashMap.HashMap<string, A>>;
/**
* Constructs a config from some configuration wrapped with the `Wrap<A>` utility type.
*
* For example:
*
* ```
* import { Config, unwrap } from "./Config"
*
* interface Options { key: string }
*
* const makeConfig = (config: Config.Wrap<Options>): Config<Options> => unwrap(config)
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const unwrap: <A>(wrapped: Config.Wrap<A>) => Config<A>;
/**
* Returns a config that describes the same structure as this one, but which
* performs validation during loading.
*
* @since 2.0.0
* @category utils
*/
export declare const validate: {
/**
* Returns a config that describes the same structure as this one, but which
* performs validation during loading.
*
* @since 2.0.0
* @category utils
*/
<A, B extends A>(options: {
readonly message: string;
readonly validation: Refinement<A, B>;
}): (self: Config<A>) => Config<B>;
/**
* Returns a config that describes the same structure as this one, but which
* performs validation during loading.
*
* @since 2.0.0
* @category utils
*/
<A>(options: {
readonly message: string;
readonly validation: Predicate<A>;
}): (self: Config<A>) => Config<A>;
/**
* Returns a config that describes the same structure as this one, but which
* performs validation during loading.
*
* @since 2.0.0
* @category utils
*/
<A, B extends A>(self: Config<A>, options: {
readonly message: string;
readonly validation: Refinement<A, B>;
}): Config<B>;
/**
* Returns a config that describes the same structure as this one, but which
* performs validation during loading.
*
* @since 2.0.0
* @category utils
*/
<A>(self: Config<A>, options: {
readonly message: string;
readonly validation: Predicate<A>;
}): Config<A>;
};
/**
* Returns a config that describes the same structure as this one, but has the
* specified default value in case the information cannot be found.
*
* @since 2.0.0
* @category utils
*/
export declare const withDefault: {
/**
* Returns a config that describes the same structure as this one, but has the
* specified default value in case the information cannot be found.
*
* @since 2.0.0
* @category utils
*/
<const A2>(def: A2): <A>(self: Config<A>) => Config<A2 | A>;
/**
* Returns a config that describes the same structure as this one, but has the
* specified default value in case the information cannot be found.
*
* @since 2.0.0
* @category utils
*/
<A, const A2>(self: Config<A>, def: A2): Config<A | A2>;
};
/**
* Adds a description to this configuration, which is intended for humans.
*
* @since 2.0.0
* @category utils
*/
export declare const withDescription: {
/**
* Adds a description to this configuration, which is intended for humans.
*
* @since 2.0.0
* @category utils
*/
(description: string): <A>(self: Config<A>) => Config<A>;
/**
* Adds a description to this configuration, which is intended for humans.
*
* @since 2.0.0
* @category utils
*/
<A>(self: Config<A>, description: string): Config<A>;
};
/**
* Returns a config that is the composition of this config and the specified
* config.
*
* @since 2.0.0
* @category zipping
*/
export declare const zip: {
/**
* Returns a config that is the composition of this config and the specified
* config.
*
* @since 2.0.0
* @category zipping
*/
<B>(that: Config<B>): <A>(self: Config<A>) => Config<[A, B]>;
/**
* Returns a config that is the composition of this config and the specified
* config.
*
* @since 2.0.0
* @category zipping
*/
<A, B>(self: Config<A>, that: Config<B>): Config<[A, B]>;
};
/**
* Returns a config that is the composes this config and the specified config
* using the provided function.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipWith: {
/**
* Returns a config that is the composes this config and the specified config
* using the provided function.
*
* @since 2.0.0
* @category zipping
*/
<B, A, C>(that: Config<B>, f: (a: A, b: B) => C): (self: Config<A>) => Config<C>;
/**
* Returns a config that is the composes this config and the specified config
* using the provided function.
*
* @since 2.0.0
* @category zipping
*/
<A, B, C>(self: Config<A>, that: Config<B>, f: (a: A, b: B) => C): Config<C>;
};
//# sourceMappingURL=Config.d.ts.map

1
_node_modules/effect/dist/dts/Config.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

238
_node_modules/effect/dist/dts/ConfigError.d.ts generated vendored Normal file
View File

@@ -0,0 +1,238 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const ConfigErrorTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ConfigErrorTypeId = typeof ConfigErrorTypeId;
/**
* The possible ways that loading configuration data may fail.
*
* @since 2.0.0
* @category models
*/
export type ConfigError = And | Or | InvalidData | MissingData | SourceUnavailable | Unsupported;
/**
* @since 2.0.0
*/
export declare namespace ConfigError {
/**
* @since 2.0.0
* @category models
*/
interface Proto {
readonly _tag: "ConfigError";
readonly [ConfigErrorTypeId]: ConfigErrorTypeId;
}
/**
* @since 2.0.0
* @category models
*/
type Reducer<C, Z> = ConfigErrorReducer<C, Z>;
}
/**
* @since 2.0.0
* @category models
*/
export interface ConfigErrorReducer<in C, in out Z> {
andCase(context: C, left: Z, right: Z): Z;
orCase(context: C, left: Z, right: Z): Z;
invalidDataCase(context: C, path: Array<string>, message: string): Z;
missingDataCase(context: C, path: Array<string>, message: string): Z;
sourceUnavailableCase(context: C, path: Array<string>, message: string, cause: Cause.Cause<unknown>): Z;
unsupportedCase(context: C, path: Array<string>, message: string): Z;
}
/**
* @since 2.0.0
* @category models
*/
export interface And extends ConfigError.Proto {
readonly _op: "And";
readonly left: ConfigError;
readonly right: ConfigError;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface Or extends ConfigError.Proto {
readonly _op: "Or";
readonly left: ConfigError;
readonly right: ConfigError;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface InvalidData extends ConfigError.Proto {
readonly _op: "InvalidData";
readonly path: Array<string>;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface MissingData extends ConfigError.Proto {
readonly _op: "MissingData";
readonly path: Array<string>;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface SourceUnavailable extends ConfigError.Proto {
readonly _op: "SourceUnavailable";
readonly path: Array<string>;
readonly message: string;
readonly cause: Cause.Cause<unknown>;
}
/**
* @since 2.0.0
* @category models
*/
export interface Unsupported extends ConfigError.Proto {
readonly _op: "Unsupported";
readonly path: Array<string>;
readonly message: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface Options {
readonly pathDelim: string;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const And: (self: ConfigError, that: ConfigError) => ConfigError;
/**
* @since 2.0.0
* @category constructors
*/
export declare const Or: (self: ConfigError, that: ConfigError) => ConfigError;
/**
* @since 2.0.0
* @category constructors
*/
export declare const MissingData: (path: Array<string>, message: string, options?: Options) => ConfigError;
/**
* @since 2.0.0
* @category constructors
*/
export declare const InvalidData: (path: Array<string>, message: string, options?: Options) => ConfigError;
/**
* @since 2.0.0
* @category constructors
*/
export declare const SourceUnavailable: (path: Array<string>, message: string, cause: Cause.Cause<unknown>, options?: Options) => ConfigError;
/**
* @since 2.0.0
* @category constructors
*/
export declare const Unsupported: (path: Array<string>, message: string, options?: Options) => ConfigError;
/**
* Returns `true` if the specified value is a `ConfigError`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isConfigError: (u: unknown) => u is ConfigError;
/**
* Returns `true` if the specified `ConfigError` is an `And`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isAnd: (self: ConfigError) => self is And;
/**
* Returns `true` if the specified `ConfigError` is an `Or`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isOr: (self: ConfigError) => self is Or;
/**
* Returns `true` if the specified `ConfigError` is an `InvalidData`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isInvalidData: (self: ConfigError) => self is InvalidData;
/**
* Returns `true` if the specified `ConfigError` is an `MissingData`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isMissingData: (self: ConfigError) => self is MissingData;
/**
* Returns `true` if the specified `ConfigError` contains only `MissingData` errors, `false` otherwise.
*
* @since 2.0.0
* @categer getters
*/
export declare const isMissingDataOnly: (self: ConfigError) => boolean;
/**
* Returns `true` if the specified `ConfigError` is a `SourceUnavailable`,
* `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isSourceUnavailable: (self: ConfigError) => self is SourceUnavailable;
/**
* Returns `true` if the specified `ConfigError` is an `Unsupported`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isUnsupported: (self: ConfigError) => self is Unsupported;
/**
* @since 2.0.0
* @category utils
*/
export declare const prefixed: {
/**
* @since 2.0.0
* @category utils
*/
(prefix: Array<string>): (self: ConfigError) => ConfigError;
/**
* @since 2.0.0
* @category utils
*/
(self: ConfigError, prefix: Array<string>): ConfigError;
};
/**
* @since 2.0.0
* @category folding
*/
export declare const reduceWithContext: {
/**
* @since 2.0.0
* @category folding
*/
<C, Z>(context: C, reducer: ConfigErrorReducer<C, Z>): (self: ConfigError) => Z;
/**
* @since 2.0.0
* @category folding
*/
<C, Z>(self: ConfigError, context: C, reducer: ConfigErrorReducer<C, Z>): Z;
};
//# sourceMappingURL=ConfigError.d.ts.map

1
_node_modules/effect/dist/dts/ConfigError.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ConfigError.d.ts","sourceRoot":"","sources":["../../src/ConfigError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAGxC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,MAAmC,CAAA;AAE1E;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GACnB,GAAG,GACH,EAAE,GACF,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,WAAW,CAAA;AAEf;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC;;;OAGG;IACH,UAAiB,KAAK;QACpB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;QAC5B,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;KAChD;IAED;;;OAGG;IACH,KAAY,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAChD,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACzC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACxC,eAAe,CAAC,OAAO,EAAE,CA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,aAAa,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,IAAI,WAAoC,CAAA;AAE/F;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB;;;OAGG;IACH,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,WAAW,CAAA;IAC3D;;;OAGG;IACH,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,WAAW,CAAA;CACpC,CAAA;AAErB;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE;IAC9B;;;OAGG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,CAAC,CAAA;IAC/E;;;OAGG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAA;CAC/C,CAAA"}

372
_node_modules/effect/dist/dts/ConfigProvider.d.ts generated vendored Normal file
View File

@@ -0,0 +1,372 @@
/**
* @since 2.0.0
*/
import type * as Config from "./Config.js";
import type * as ConfigError from "./ConfigError.js";
import type * as PathPatch from "./ConfigProviderPathPatch.js";
import type * as Context from "./Context.js";
import type * as Effect from "./Effect.js";
import type { LazyArg } from "./Function.js";
import type * as HashSet from "./HashSet.js";
import type { Pipeable } from "./Pipeable.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const ConfigProviderTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ConfigProviderTypeId = typeof ConfigProviderTypeId;
/**
* @since 2.0.0
* @category symbols
*/
export declare const FlatConfigProviderTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FlatConfigProviderTypeId = typeof FlatConfigProviderTypeId;
/**
* A ConfigProvider is a service that provides configuration given a description
* of the structure of that configuration.
*
* @since 2.0.0
* @category models
*/
export interface ConfigProvider extends ConfigProvider.Proto, Pipeable {
/**
* Loads the specified configuration, or fails with a config error.
*/
load<A>(config: Config.Config<A>): Effect.Effect<A, ConfigError.ConfigError>;
/**
* Flattens this config provider into a simplified config provider that knows
* only how to deal with flat (key/value) properties.
*/
readonly flattened: ConfigProvider.Flat;
}
/**
* @since 2.0.0
*/
export declare namespace ConfigProvider {
/**
* @since 2.0.0
* @category models
*/
interface Proto {
readonly [ConfigProviderTypeId]: ConfigProviderTypeId;
}
/**
* A simplified config provider that knows only how to deal with flat
* (key/value) properties. Because these providers are common, there is
* special support for implementing them.
*
* @since 2.0.0
* @category models
*/
interface Flat {
readonly [FlatConfigProviderTypeId]: FlatConfigProviderTypeId;
readonly patch: PathPatch.PathPatch;
load<A>(path: ReadonlyArray<string>, config: Config.Config.Primitive<A>, split?: boolean): Effect.Effect<Array<A>, ConfigError.ConfigError>;
enumerateChildren(path: ReadonlyArray<string>): Effect.Effect<HashSet.HashSet<string>, ConfigError.ConfigError>;
}
/**
* @since 2.0.0
* @category models
*/
interface FromMapConfig {
readonly pathDelim: string;
readonly seqDelim: string;
}
/**
* @since 2.0.0
* @category models
*/
interface FromEnvConfig {
readonly pathDelim: string;
readonly seqDelim: string;
}
/**
* @since 1.0.0
* @category models
*/
type KeyComponent = KeyName | KeyIndex;
/**
* @since 1.0.0
* @category models
*/
interface KeyName {
readonly _tag: "KeyName";
readonly name: string;
}
/**
* @since 1.0.0
* @category models
*/
interface KeyIndex {
readonly _tag: "KeyIndex";
readonly index: number;
}
}
/**
* The service tag for `ConfigProvider`.
*
* @since 2.0.0
* @category context
*/
export declare const ConfigProvider: Context.Tag<ConfigProvider, ConfigProvider>;
/**
* Creates a new config provider.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: (options: {
readonly load: <A>(config: Config.Config<A>) => Effect.Effect<A, ConfigError.ConfigError>;
readonly flattened: ConfigProvider.Flat;
}) => ConfigProvider;
/**
* Creates a new flat config provider.
*
* @since 2.0.0
* @category constructors
*/
export declare const makeFlat: (options: {
readonly load: <A>(path: ReadonlyArray<string>, config: Config.Config.Primitive<A>, split: boolean) => Effect.Effect<Array<A>, ConfigError.ConfigError>;
readonly enumerateChildren: (path: ReadonlyArray<string>) => Effect.Effect<HashSet.HashSet<string>, ConfigError.ConfigError>;
readonly patch: PathPatch.PathPatch;
}) => ConfigProvider.Flat;
/**
* A config provider that loads configuration from context variables
*
* **Options**:
*
* - `pathDelim`: The delimiter for the path segments (default: `"_"`).
* - `seqDelim`: The delimiter for the sequence of values (default: `","`).
*
* @since 2.0.0
* @category constructors
*/
export declare const fromEnv: (options?: Partial<ConfigProvider.FromEnvConfig>) => ConfigProvider;
/**
* Constructs a new `ConfigProvider` from a key/value (flat) provider, where
* nesting is embedded into the string keys.
*
* @since 2.0.0
* @category constructors
*/
export declare const fromFlat: (flat: ConfigProvider.Flat) => ConfigProvider;
/**
* Constructs a new `ConfigProvider` from a JSON object.
*
* @since 2.0.0
* @category constructors
*/
export declare const fromJson: (json: unknown) => ConfigProvider;
/**
* Constructs a ConfigProvider using a map and the specified delimiter string,
* which determines how to split the keys in the map into path segments.
*
* @since 2.0.0
* @category constructors
*/
export declare const fromMap: (map: Map<string, string>, config?: Partial<ConfigProvider.FromMapConfig>) => ConfigProvider;
/**
* Returns a new config provider that will automatically convert all property
* names to constant case. This can be utilized to adapt the names of
* configuration properties from the default naming convention of camel case
* to the naming convention of a config provider.
*
* @since 2.0.0
* @category combinators
*/
export declare const constantCase: (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically tranform all path
* configuration names with the specified function. This can be utilized to
* adapt the names of configuration properties from one naming convention to
* another.
*
* @since 2.0.0
* @category utils
*/
export declare const mapInputPath: {
/**
* Returns a new config provider that will automatically tranform all path
* configuration names with the specified function. This can be utilized to
* adapt the names of configuration properties from one naming convention to
* another.
*
* @since 2.0.0
* @category utils
*/
(f: (path: string) => string): (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically tranform all path
* configuration names with the specified function. This can be utilized to
* adapt the names of configuration properties from one naming convention to
* another.
*
* @since 2.0.0
* @category utils
*/
(self: ConfigProvider, f: (path: string) => string): ConfigProvider;
};
/**
* Returns a new config provider that will automatically convert all property
* names to kebab case. This can be utilized to adapt the names of
* configuration properties from the default naming convention of camel case
* to the naming convention of a config provider.
*
* @since 2.0.0
* @category combinators
*/
export declare const kebabCase: (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically convert all property
* names to lower case. This can be utilized to adapt the names of
* configuration properties from the default naming convention of camel case
* to the naming convention of a config provider.
*
* @since 2.0.0
* @category combinators
*/
export declare const lowerCase: (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically nest all
* configuration under the specified property name. This can be utilized to
* aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
export declare const nested: {
/**
* Returns a new config provider that will automatically nest all
* configuration under the specified property name. This can be utilized to
* aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
(name: string): (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically nest all
* configuration under the specified property name. This can be utilized to
* aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
(self: ConfigProvider, name: string): ConfigProvider;
};
/**
* Returns a new config provider that preferentially loads configuration data
* from this one, but which will fall back to the specified alternate provider
* if there are any issues loading the configuration from this provider.
*
* @since 2.0.0
* @category utils
*/
export declare const orElse: {
/**
* Returns a new config provider that preferentially loads configuration data
* from this one, but which will fall back to the specified alternate provider
* if there are any issues loading the configuration from this provider.
*
* @since 2.0.0
* @category utils
*/
(that: LazyArg<ConfigProvider>): (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that preferentially loads configuration data
* from this one, but which will fall back to the specified alternate provider
* if there are any issues loading the configuration from this provider.
*
* @since 2.0.0
* @category utils
*/
(self: ConfigProvider, that: LazyArg<ConfigProvider>): ConfigProvider;
};
/**
* Returns a new config provider that will automatically un-nest all
* configuration under the specified property name. This can be utilized to
* de-aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
export declare const unnested: {
/**
* Returns a new config provider that will automatically un-nest all
* configuration under the specified property name. This can be utilized to
* de-aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
(name: string): (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically un-nest all
* configuration under the specified property name. This can be utilized to
* de-aggregate separate configuration sources that are all required to load a
* single configuration value.
*
* @since 2.0.0
* @category utils
*/
(self: ConfigProvider, name: string): ConfigProvider;
};
/**
* Returns a new config provider that will automatically convert all property
* names to upper case. This can be utilized to adapt the names of
* configuration properties from the default naming convention of camel case
* to the naming convention of a config provider.
*
* @since 2.0.0
* @category combinators
*/
export declare const snakeCase: (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that will automatically convert all property
* names to upper case. This can be utilized to adapt the names of
* configuration properties from the default naming convention of camel case
* to the naming convention of a config provider.
*
* @since 2.0.0
* @category combinators
*/
export declare const upperCase: (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that transforms the config provider with the
* specified function within the specified path.
*
* @since 2.0.0
* @category combinators
*/
export declare const within: {
/**
* Returns a new config provider that transforms the config provider with the
* specified function within the specified path.
*
* @since 2.0.0
* @category combinators
*/
(path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): (self: ConfigProvider) => ConfigProvider;
/**
* Returns a new config provider that transforms the config provider with the
* specified function within the specified path.
*
* @since 2.0.0
* @category combinators
*/
(self: ConfigProvider, path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): ConfigProvider;
};
//# sourceMappingURL=ConfigProvider.d.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,118 @@
/**
* Represents a description of how to modify the path to a configuration
* value.
*
* @since 2.0.0
* @category models
*/
export type PathPatch = Empty | AndThen | MapName | Nested | Unnested;
/**
* @since 2.0.0
* @category models
*/
export interface Empty {
readonly _tag: "Empty";
}
/**
* @since 2.0.0
* @category models
*/
export interface AndThen {
readonly _tag: "AndThen";
readonly first: PathPatch;
readonly second: PathPatch;
}
/**
* @since 2.0.0
* @category models
*/
export interface MapName {
readonly _tag: "MapName";
f(string: string): string;
}
/**
* @since 2.0.0
* @category models
*/
export interface Nested {
readonly _tag: "Nested";
readonly name: string;
}
/**
* @since 2.0.0
* @category models
*/
export interface Unnested {
readonly _tag: "Unnested";
readonly name: string;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const empty: PathPatch;
/**
* @since 2.0.0
* @category constructors
*/
export declare const andThen: {
/**
* @since 2.0.0
* @category constructors
*/
(that: PathPatch): (self: PathPatch) => PathPatch;
/**
* @since 2.0.0
* @category constructors
*/
(self: PathPatch, that: PathPatch): PathPatch;
};
/**
* @since 2.0.0
* @category constructors
*/
export declare const mapName: {
/**
* @since 2.0.0
* @category constructors
*/
(f: (string: string) => string): (self: PathPatch) => PathPatch;
/**
* @since 2.0.0
* @category constructors
*/
(self: PathPatch, f: (string: string) => string): PathPatch;
};
/**
* @since 2.0.0
* @category constructors
*/
export declare const nested: {
/**
* @since 2.0.0
* @category constructors
*/
(name: string): (self: PathPatch) => PathPatch;
/**
* @since 2.0.0
* @category constructors
*/
(self: PathPatch, name: string): PathPatch;
};
/**
* @since 2.0.0
* @category constructors
*/
export declare const unnested: {
/**
* @since 2.0.0
* @category constructors
*/
(name: string): (self: PathPatch) => PathPatch;
/**
* @since 2.0.0
* @category constructors
*/
(self: PathPatch, name: string): PathPatch;
};
//# sourceMappingURL=ConfigProviderPathPatch.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ConfigProviderPathPatch.d.ts","sourceRoot":"","sources":["../../src/ConfigProviderPathPatch.ts"],"names":[],"mappings":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;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;CACzC,CAAA;AAEpB;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB;;;OAGG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAA;IAC9C;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,CAAA;AAEnB;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB;;;OAGG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAA;IAC9C;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACvB,CAAA"}

224
_node_modules/effect/dist/dts/Console.d.ts generated vendored Normal file
View File

@@ -0,0 +1,224 @@
/**
* @since 2.0.0
*/
import type * as Context from "./Context.js";
import type { Effect } from "./Effect.js";
import type * as Layer from "./Layer.js";
import type { Scope } from "./Scope.js";
/**
* @since 2.0.0
* @category type ids
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @category type ids
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @category model
*/
export interface Console {
readonly [TypeId]: TypeId;
assert(condition: boolean, ...args: ReadonlyArray<any>): Effect<void>;
readonly clear: Effect<void>;
count(label?: string): Effect<void>;
countReset(label?: string): Effect<void>;
debug(...args: ReadonlyArray<any>): Effect<void>;
dir(item: any, options?: any): Effect<void>;
dirxml(...args: ReadonlyArray<any>): Effect<void>;
error(...args: ReadonlyArray<any>): Effect<void>;
group(options?: {
readonly label?: string | undefined;
readonly collapsed?: boolean | undefined;
}): Effect<void>;
readonly groupEnd: Effect<void>;
info(...args: ReadonlyArray<any>): Effect<void>;
log(...args: ReadonlyArray<any>): Effect<void>;
table(tabularData: any, properties?: ReadonlyArray<string>): Effect<void>;
time(label?: string): Effect<void>;
timeEnd(label?: string): Effect<void>;
timeLog(label?: string, ...args: ReadonlyArray<any>): Effect<void>;
trace(...args: ReadonlyArray<any>): Effect<void>;
warn(...args: ReadonlyArray<any>): Effect<void>;
readonly unsafe: UnsafeConsole;
}
/**
* @since 2.0.0
* @category model
*/
export interface UnsafeConsole {
assert(condition: boolean, ...args: ReadonlyArray<any>): void;
clear(): void;
count(label?: string): void;
countReset(label?: string): void;
debug(...args: ReadonlyArray<any>): void;
dir(item: any, options?: any): void;
dirxml(...args: ReadonlyArray<any>): void;
error(...args: ReadonlyArray<any>): void;
group(...args: ReadonlyArray<any>): void;
groupCollapsed(...args: ReadonlyArray<any>): void;
groupEnd(): void;
info(...args: ReadonlyArray<any>): void;
log(...args: ReadonlyArray<any>): void;
table(tabularData: any, properties?: ReadonlyArray<string>): void;
time(label?: string): void;
timeEnd(label?: string): void;
timeLog(label?: string, ...args: ReadonlyArray<any>): void;
trace(...args: ReadonlyArray<any>): void;
warn(...args: ReadonlyArray<any>): void;
}
/**
* @since 2.0.0
* @category context
*/
export declare const Console: Context.Tag<Console, Console>;
/**
* @since 2.0.0
* @category default services
*/
export declare const withConsole: {
/**
* @since 2.0.0
* @category default services
*/
<C extends Console>(console: C): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
/**
* @since 2.0.0
* @category default services
*/
<A, E, R, C extends Console>(effect: Effect<A, E, R>, console: C): Effect<A, E, R>;
};
/**
* @since 2.0.0
* @category default services
*/
export declare const setConsole: <A extends Console>(console: A) => Layer.Layer<never>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const consoleWith: <A, E, R>(f: (console: Console) => Effect<A, E, R>) => Effect<A, E, R>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const assert: (condition: boolean, ...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const clear: Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const count: (label?: string) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const countReset: (label?: string) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const debug: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const dir: (item: any, options?: any) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const dirxml: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const error: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const group: (options?: {
label?: string | undefined;
collapsed?: boolean | undefined;
} | undefined) => Effect<void, never, Scope>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const info: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const log: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const table: (tabularData: any, properties?: ReadonlyArray<string>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const time: (label?: string | undefined) => Effect<void, never, Scope>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const timeLog: (label?: string, ...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const trace: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const warn: (...args: ReadonlyArray<any>) => Effect<void>;
/**
* @since 2.0.0
* @category accessor
*/
export declare const withGroup: {
/**
* @since 2.0.0
* @category accessor
*/
(options?: {
readonly label?: string | undefined;
readonly collapsed?: boolean | undefined;
}): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
/**
* @since 2.0.0
* @category accessor
*/
<A, E, R>(self: Effect<A, E, R>, options?: {
readonly label?: string | undefined;
readonly collapsed?: boolean | undefined;
}): Effect<A, E, R>;
};
/**
* @since 2.0.0
* @category accessor
*/
export declare const withTime: {
/**
* @since 2.0.0
* @category accessor
*/
(label?: string): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
/**
* @since 2.0.0
* @category accessor
*/
<A, E, R>(self: Effect<A, E, R>, label?: string): Effect<A, E, R>;
};
//# sourceMappingURL=Console.d.ts.map

1
_node_modules/effect/dist/dts/Console.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

823
_node_modules/effect/dist/dts/Context.d.ts generated vendored Normal file
View File

@@ -0,0 +1,823 @@
/**
* This module provides a data structure called `Context` that can be used for dependency injection in effectful
* programs. It is essentially a table mapping `Tag`s to their implementations (called `Service`s), and can be used to
* manage dependencies in a type-safe way. The `Context` data structure is essentially a way of providing access to a set
* of related services that can be passed around as a single unit. This module provides functions to create, modify, and
* query the contents of a `Context`, as well as a number of utility types for working with tags and services.
*
* @since 2.0.0
*/
import type * as Effect from "./Effect.js";
import type { Equal } from "./Equal.js";
import type { LazyArg } from "./Function.js";
import type { Inspectable } from "./Inspectable.js";
import type { Option } from "./Option.js";
import type { Pipeable } from "./Pipeable.js";
import type * as Types from "./Types.js";
import type * as Unify from "./Unify.js";
/**
* @since 2.0.0
* @category symbol
*/
export declare const TagTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbol
*/
export type TagTypeId = typeof TagTypeId;
/**
* @since 3.5.9
* @category models
*/
export interface Tag<in out Id, in out Value> extends Pipeable, Inspectable, ReadonlyTag<Id, Value> {
readonly _op: "Tag";
readonly Service: Value;
readonly Identifier: Id;
readonly [TagTypeId]: {
readonly _Service: Types.Invariant<Value>;
readonly _Identifier: Types.Invariant<Id>;
};
of(self: Value): Value;
context(self: Value): Context<Id>;
readonly stack?: string | undefined;
readonly key: string;
[Unify.typeSymbol]?: unknown;
[Unify.unifySymbol]?: TagUnify<this>;
[Unify.ignoreSymbol]?: TagUnifyIgnore;
}
/**
* @since 3.5.9
* @category models
*/
export interface ReadonlyTag<in out Id, out Value> extends Pipeable, Inspectable, Effect.Effect<Value, never, Id> {
readonly _op: "Tag";
readonly Service: Value;
readonly Identifier: Id;
readonly [TagTypeId]: {
readonly _Service: Types.Covariant<Value>;
readonly _Identifier: Types.Invariant<Id>;
};
readonly stack?: string | undefined;
readonly key: string;
}
/**
* @since 3.11.0
* @category symbol
*/
export declare const ReferenceTypeId: unique symbol;
/**
* @since 3.11.0
* @category symbol
*/
export type ReferenceTypeId = typeof ReferenceTypeId;
/**
* @since 3.11.0
* @category models
*/
export interface Reference<in out Id, in out Value> extends Pipeable, Inspectable {
readonly [ReferenceTypeId]: ReferenceTypeId;
readonly defaultValue: () => Value;
readonly _op: "Tag";
readonly Service: Value;
readonly Identifier: Id;
readonly [TagTypeId]: {
readonly _Service: Types.Invariant<Value>;
readonly _Identifier: Types.Invariant<Id>;
};
of(self: Value): Value;
context(self: Value): Context<Id>;
readonly stack?: string | undefined;
readonly key: string;
[Unify.typeSymbol]?: unknown;
[Unify.unifySymbol]?: TagUnify<this>;
[Unify.ignoreSymbol]?: TagUnifyIgnore;
}
/**
* @since 2.0.0
* @category models
*/
export interface TagClassShape<Id, Shape> {
readonly [TagTypeId]: TagTypeId;
readonly Type: Shape;
readonly Id: Id;
}
/**
* @since 2.0.0
* @category models
*/
export interface TagClass<Self, Id extends string, Type> extends Tag<Self, Type> {
new (_: never): TagClassShape<Id, Type>;
readonly key: Id;
}
/**
* @since 3.11.0
* @category models
*/
export interface ReferenceClass<Self, Id extends string, Type> extends Reference<Self, Type> {
new (_: never): TagClassShape<Id, Type>;
readonly key: Id;
}
/**
* @category models
* @since 2.0.0
*/
export interface TagUnify<A extends {
[Unify.typeSymbol]?: any;
}> {
Tag?: () => Extract<A[Unify.typeSymbol], Tag<any, any>>;
}
/**
* @category models
* @since 2.0.0
*/
export interface TagUnifyIgnore {
}
/**
* @since 2.0.0
*/
export declare namespace Tag {
/**
* @since 2.0.0
*/
type Service<T extends Tag<any, any> | TagClassShape<any, any>> = T extends Tag<any, any> ? T["Service"] : T extends TagClassShape<any, infer A> ? A : never;
/**
* @since 2.0.0
*/
type Identifier<T extends Tag<any, any> | TagClassShape<any, any>> = T extends Tag<any, any> ? T["Identifier"] : T extends TagClassShape<any, any> ? T : never;
}
/**
* Creates a new `Tag` instance with an optional key parameter.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* assert.strictEqual(Context.GenericTag("PORT").key === Context.GenericTag("PORT").key, true)
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const GenericTag: <Identifier, Service = Identifier>(key: string) => Tag<Identifier, Service>;
declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @category symbol
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @category models
*/
export type ValidTagsById<R> = R extends infer S ? Tag<S, any> : never;
/**
* @since 2.0.0
* @category models
*/
export interface Context<in Services> extends Equal, Pipeable, Inspectable {
readonly [TypeId]: {
readonly _Services: Types.Contravariant<Services>;
};
readonly unsafeMap: Map<string, any>;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMake: <Services>(unsafeMap: Map<string, any>) => Context<Services>;
/**
* Checks if the provided argument is a `Context`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* assert.strictEqual(Context.isContext(Context.empty()), true)
* ```
*
* @since 2.0.0
* @category guards
*/
export declare const isContext: (input: unknown) => input is Context<never>;
/**
* Checks if the provided argument is a `Tag`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* assert.strictEqual(Context.isTag(Context.GenericTag("Tag")), true)
* ```
*
* @since 2.0.0
* @category guards
*/
export declare const isTag: (input: unknown) => input is Tag<any, any>;
/**
* Checks if the provided argument is a `Reference`.
*
* @since 3.11.0
* @category guards
* @experimental
*/
export declare const isReference: (u: unknown) => u is Reference<any, any>;
/**
* Returns an empty `Context`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* assert.strictEqual(Context.isContext(Context.empty()), true)
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const empty: () => Context<never>;
/**
* Creates a new `Context` with a single service associated to the tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const make: <I, S>(tag: Tag<I, S>, service: Types.NoInfer<S>) => Context<I>;
/**
* Adds a service to a given `Context`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, pipe } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const someContext = Context.make(Port, { PORT: 8080 })
*
* const Services = pipe(
* someContext,
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
export declare const add: {
/**
* Adds a service to a given `Context`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, pipe } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const someContext = Context.make(Port, { PORT: 8080 })
*
* const Services = pipe(
* someContext,
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
<I, S>(tag: Tag<I, S>, service: Types.NoInfer<S>): <Services>(self: Context<Services>) => Context<Services | I>;
/**
* Adds a service to a given `Context`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, pipe } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const someContext = Context.make(Port, { PORT: 8080 })
*
* const Services = pipe(
* someContext,
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
<Services, I, S>(self: Context<Services>, tag: Tag<I, S>, service: Types.NoInfer<S>): Context<Services | I>;
};
/**
* Get a service from the context that corresponds to the given tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
* @category getters
*/
export declare const get: {
/**
* Get a service from the context that corresponds to the given tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
* @category getters
*/
<I, S>(tag: Reference<I, S>): <Services>(self: Context<Services>) => S;
/**
* Get a service from the context that corresponds to the given tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
* @category getters
*/
<Services, I extends Services, S>(tag: Tag<I, S>): (self: Context<Services>) => S;
/**
* Get a service from the context that corresponds to the given tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
* @category getters
*/
<Services, I, S>(self: Context<Services>, tag: Reference<I, S>): S;
/**
* Get a service from the context that corresponds to the given tag.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
* @category getters
*/
<Services, I extends Services, S>(self: Context<Services>, tag: Tag<I, S>): S;
};
/**
* Get a service from the context that corresponds to the given tag, or
* use the fallback value.
*
* @since 3.7.0
* @category getters
*/
export declare const getOrElse: {
/**
* Get a service from the context that corresponds to the given tag, or
* use the fallback value.
*
* @since 3.7.0
* @category getters
*/
<S, I, B>(tag: Tag<I, S>, orElse: LazyArg<B>): <Services>(self: Context<Services>) => S | B;
/**
* Get a service from the context that corresponds to the given tag, or
* use the fallback value.
*
* @since 3.7.0
* @category getters
*/
<Services, S, I, B>(self: Context<Services>, tag: Tag<I, S>, orElse: LazyArg<B>): S | B;
};
/**
* Get a service from the context that corresponds to the given tag.
* This function is unsafe because if the tag is not present in the context, a runtime error will be thrown.
*
* For a safer version see {@link getOption}.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.unsafeGet(Services, Port), { PORT: 8080 })
* assert.throws(() => Context.unsafeGet(Services, Timeout))
* ```
*
* @since 2.0.0
* @category unsafe
*/
export declare const unsafeGet: {
/**
* Get a service from the context that corresponds to the given tag.
* This function is unsafe because if the tag is not present in the context, a runtime error will be thrown.
*
* For a safer version see {@link getOption}.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.unsafeGet(Services, Port), { PORT: 8080 })
* assert.throws(() => Context.unsafeGet(Services, Timeout))
* ```
*
* @since 2.0.0
* @category unsafe
*/
<S, I>(tag: Tag<I, S>): <Services>(self: Context<Services>) => S;
/**
* Get a service from the context that corresponds to the given tag.
* This function is unsafe because if the tag is not present in the context, a runtime error will be thrown.
*
* For a safer version see {@link getOption}.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.unsafeGet(Services, Port), { PORT: 8080 })
* assert.throws(() => Context.unsafeGet(Services, Timeout))
* ```
*
* @since 2.0.0
* @category unsafe
*/
<Services, S, I>(self: Context<Services>, tag: Tag<I, S>): S;
};
/**
* Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
* found, the `Option` object will be `None`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, Option } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 }))
* assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none())
* ```
*
* @since 2.0.0
* @category getters
*/
export declare const getOption: {
/**
* Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
* found, the `Option` object will be `None`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, Option } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 }))
* assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none())
* ```
*
* @since 2.0.0
* @category getters
*/
<S, I>(tag: Tag<I, S>): <Services>(self: Context<Services>) => Option<S>;
/**
* Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
* found, the `Option` object will be `None`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, Option } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const Services = Context.make(Port, { PORT: 8080 })
*
* assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 }))
* assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none())
* ```
*
* @since 2.0.0
* @category getters
*/
<Services, S, I>(self: Context<Services>, tag: Tag<I, S>): Option<S>;
};
/**
* Merges two `Context`s, returning a new `Context` containing the services of both.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const firstContext = Context.make(Port, { PORT: 8080 })
* const secondContext = Context.make(Timeout, { TIMEOUT: 5000 })
*
* const Services = Context.merge(firstContext, secondContext)
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
export declare const merge: {
/**
* Merges two `Context`s, returning a new `Context` containing the services of both.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const firstContext = Context.make(Port, { PORT: 8080 })
* const secondContext = Context.make(Timeout, { TIMEOUT: 5000 })
*
* const Services = Context.merge(firstContext, secondContext)
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
<R1>(that: Context<R1>): <Services>(self: Context<Services>) => Context<R1 | Services>;
/**
* Merges two `Context`s, returning a new `Context` containing the services of both.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const firstContext = Context.make(Port, { PORT: 8080 })
* const secondContext = Context.make(Timeout, { TIMEOUT: 5000 })
*
* const Services = Context.merge(firstContext, secondContext)
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* ```
*
* @since 2.0.0
*/
<Services, R1>(self: Context<Services>, that: Context<R1>): Context<Services | R1>;
};
/**
* Merges any number of `Context`s, returning a new `Context` containing the services of all.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
* const Host = Context.GenericTag<{ HOST: string }>("Host")
*
* const firstContext = Context.make(Port, { PORT: 8080 })
* const secondContext = Context.make(Timeout, { TIMEOUT: 5000 })
* const thirdContext = Context.make(Host, { HOST: "localhost" })
*
* const Services = Context.mergeAll(firstContext, secondContext, thirdContext)
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* assert.deepStrictEqual(Context.get(Services, Host), { HOST: "localhost" })
* ```
*
* @since 3.12.0
*/
export declare const mergeAll: <T extends Array<unknown>>(...ctxs: [...{
[K in keyof T]: Context<T[K]>;
}]) => Context<T[number]>;
/**
* Returns a new `Context` that contains only the specified services.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, Context, Option } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
*
* const someContext = pipe(
* Context.make(Port, { PORT: 8080 }),
* Context.add(Timeout, { TIMEOUT: 5000 })
* )
*
* const Services = pipe(someContext, Context.pick(Port))
*
* assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 }))
* assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none())
* ```
*
* @since 2.0.0
*/
export declare const pick: <Tags extends ReadonlyArray<Tag<any, any>>>(...tags: Tags) => <Services>(self: Context<Services>) => Context<Services & Tag.Identifier<Tags[number]>>;
/**
* @since 2.0.0
*/
export declare const omit: <Tags extends ReadonlyArray<Tag<any, any>>>(...tags: Tags) => <Services>(self: Context<Services>) => Context<Exclude<Services, Tag.Identifier<Tags[number]>>>;
/**
* @example
* ```ts
* import * as assert from "node:assert"
* import { Context, Layer } from "effect"
*
* class MyTag extends Context.Tag("MyTag")<
* MyTag,
* { readonly myNum: number }
* >() {
* static Live = Layer.succeed(this, { myNum: 108 })
* }
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const Tag: <const Id extends string>(id: Id) => <Self, Shape>() => TagClass<Self, Id, Shape>;
/**
* Creates a context tag with a default value.
*
* **Details**
*
* `Context.Reference` allows you to create a tag that can hold a value. You can
* provide a default value for the service, which will automatically be used
* when the context is accessed, or override it with a custom implementation
* when needed.
*
* **Example** (Declaring a Tag with a default value)
*
* ```ts
* import * as assert from "node:assert"
* import { Context, Effect } from "effect"
*
* class SpecialNumber extends Context.Reference<SpecialNumber>()(
* "SpecialNumber",
* { defaultValue: () => 2048 }
* ) {}
*
* // ┌─── Effect<void, never, never>
* // ▼
* const program = Effect.gen(function* () {
* const specialNumber = yield* SpecialNumber
* console.log(`The special number is ${specialNumber}`)
* })
*
* // No need to provide the SpecialNumber implementation
* Effect.runPromise(program)
* // Output: The special number is 2048
* ```
*
* **Example** (Overriding the default value)
*
* ```ts
* import { Context, Effect } from "effect"
*
* class SpecialNumber extends Context.Reference<SpecialNumber>()(
* "SpecialNumber",
* { defaultValue: () => 2048 }
* ) {}
*
* const program = Effect.gen(function* () {
* const specialNumber = yield* SpecialNumber
* console.log(`The special number is ${specialNumber}`)
* })
*
* Effect.runPromise(program.pipe(Effect.provideService(SpecialNumber, -1)))
* // Output: The special number is -1
* ```
*
* @since 3.11.0
* @category constructors
* @experimental
*/
export declare const Reference: <Self>() => <const Id extends string, Service>(id: Id, options: {
readonly defaultValue: () => Service;
}) => ReferenceClass<Self, Id, Service>;
export {};
//# sourceMappingURL=Context.d.ts.map

1
_node_modules/effect/dist/dts/Context.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

226
_node_modules/effect/dist/dts/Cron.d.ts generated vendored Normal file
View File

@@ -0,0 +1,226 @@
import type * as DateTime from "./DateTime.js";
import * as Either from "./Either.js";
import * as Equal from "./Equal.js";
import * as equivalence from "./Equivalence.js";
import { type Inspectable } from "./Inspectable.js";
import * as Option from "./Option.js";
import { type Pipeable } from "./Pipeable.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @category symbol
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @category models
*/
export interface Cron extends Pipeable, Equal.Equal, Inspectable {
readonly [TypeId]: TypeId;
readonly tz: Option.Option<DateTime.TimeZone>;
readonly seconds: ReadonlySet<number>;
readonly minutes: ReadonlySet<number>;
readonly hours: ReadonlySet<number>;
readonly days: ReadonlySet<number>;
readonly months: ReadonlySet<number>;
readonly weekdays: ReadonlySet<number>;
}
/**
* Checks if a given value is a `Cron` instance.
*
* @since 2.0.0
* @category guards
*/
export declare const isCron: (u: unknown) => u is Cron;
/**
* Creates a `Cron` instance.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: (values: {
readonly seconds?: Iterable<number> | undefined;
readonly minutes: Iterable<number>;
readonly hours: Iterable<number>;
readonly days: Iterable<number>;
readonly months: Iterable<number>;
readonly weekdays: Iterable<number>;
readonly tz?: DateTime.TimeZone | undefined;
}) => Cron;
/**
* @since 2.0.0
* @category symbol
*/
export declare const ParseErrorTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type ParseErrorTypeId = typeof ParseErrorTypeId;
declare const ParseError_base: new <A extends Record<string, any> = {}>(args: import("./Types.js").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("./Cause.js").YieldableError & {
readonly _tag: "CronParseError";
} & Readonly<A>;
/**
* Represents a checked exception which occurs when decoding fails.
*
* @since 2.0.0
* @category models
*/
export declare class ParseError extends ParseError_base<{
readonly message: string;
readonly input?: string;
}> {
/**
* @since 2.0.0
*/
readonly [ParseErrorTypeId]: symbol;
}
/**
* Returns `true` if the specified value is an `ParseError`, `false` otherwise.
*
* @since 2.0.0
* @category guards
*/
export declare const isParseError: (u: unknown) => u is ParseError;
/**
* Parses a cron expression into a `Cron` instance.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Cron, Either } from "effect"
*
* // At 04:00 on every day-of-month from 8 through 14.
* assert.deepStrictEqual(Cron.parse("0 0 4 8-14 * *"), Either.right(Cron.make({
* seconds: [0],
* minutes: [0],
* hours: [4],
* days: [8, 9, 10, 11, 12, 13, 14],
* months: [],
* weekdays: []
* })))
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const parse: (cron: string, tz?: DateTime.TimeZone | string) => Either.Either<Cron, ParseError>;
/**
* Parses a cron expression into a `Cron` instance.
*
* **Details**
*
* This function takes a cron expression as a string and attempts to parse it
* into a `Cron` instance. If the expression is valid, the resulting `Cron`
* instance will represent the schedule defined by the cron expression.
*
* If the expression is invalid, the function throws a `ParseError`.
*
* You can optionally provide a time zone (`tz`) to interpret the cron
* expression in a specific time zone. If no time zone is provided, the cron
* expression will use the default time zone.
*
* @example
* ```ts
* import { Cron } from "effect"
*
* // At 04:00 on every day-of-month from 8 through 14.
* console.log(Cron.unsafeParse("0 4 8-14 * *"))
* // Output:
* // {
* // _id: 'Cron',
* // tz: { _id: 'Option', _tag: 'None' },
* // seconds: [ 0 ],
* // minutes: [ 0 ],
* // hours: [ 4 ],
* // days: [
* // 8, 9, 10, 11,
* // 12, 13, 14
* // ],
* // months: [],
* // weekdays: []
* // }
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const unsafeParse: (cron: string, tz?: DateTime.TimeZone | string) => Cron;
/**
* Checks if a given `Date` falls within an active `Cron` time window.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Cron, Either } from "effect"
*
* const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
* assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 04:00:00")), true)
* assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 05:00:00")), false)
* ```
*
* @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
*
* @since 2.0.0
*/
export declare const match: (cron: Cron, date: DateTime.DateTime.Input) => boolean;
/**
* Returns the next run `Date` for the given `Cron` instance.
*
* Uses the current time as a starting point if no value is provided for `now`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Cron, Either } from "effect"
*
* const after = new Date("2021-01-01 00:00:00")
* const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
* assert.deepStrictEqual(Cron.next(cron, after), new Date("2021-01-08 04:00:00"))
* ```
*
* @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
* @throws `Error` if the next run date cannot be found within 10,000 iterations.
*
* @since 2.0.0
*/
export declare const next: (cron: Cron, startFrom?: DateTime.DateTime.Input) => Date;
/**
* Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance.
*
* @since 2.0.0
*/
export declare const sequence: (cron: Cron, startFrom?: DateTime.DateTime.Input) => IterableIterator<Date>;
/**
* @category instances
* @since 2.0.0
*/
export declare const Equivalence: equivalence.Equivalence<Cron>;
/**
* Checks if two `Cron`s are equal.
*
* @since 2.0.0
* @category predicates
*/
export declare const equals: {
/**
* Checks if two `Cron`s are equal.
*
* @since 2.0.0
* @category predicates
*/
(that: Cron): (self: Cron) => boolean;
/**
* Checks if two `Cron`s are equal.
*
* @since 2.0.0
* @category predicates
*/
(self: Cron, that: Cron): boolean;
};
export {};
//# sourceMappingURL=Cron.d.ts.map

1
_node_modules/effect/dist/dts/Cron.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Cron.d.ts","sourceRoot":"","sources":["../../src/Cron.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAG/C,OAAO,EAAU,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAA;AAG9E,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAK5D;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAkC,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,M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AI,CAIxG,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,IAAI,CAOrD,CAAA;AAMD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB;;;;;OAKG;IACH,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACrC;;;;;OAKG;IACH,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAA;CACsC,CAAA"}

613
_node_modules/effect/dist/dts/Data.d.ts generated vendored Normal file
View File

@@ -0,0 +1,613 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
import type * as Types from "./Types.js";
import type { Unify } from "./Unify.js";
/**
* @since 2.0.0
*/
export declare namespace Case {
/**
* @since 2.0.0
* @category models
*/
interface Constructor<A, Tag extends keyof A = never> {
(args: Types.Equals<Omit<A, Tag>, {}> extends true ? void : {
readonly [P in keyof A as P extends Tag ? never : P]: A[P];
}): A;
}
}
/**
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* const alice = Data.struct({ name: "Alice", age: 30 })
*
* const bob = Data.struct({ name: "Bob", age: 40 })
*
* assert.deepStrictEqual(Equal.equals(alice, alice), true)
* assert.deepStrictEqual(Equal.equals(alice, Data.struct({ name: "Alice", age: 30 })), true)
*
* assert.deepStrictEqual(Equal.equals(alice, { name: "Alice", age: 30 }), false)
* assert.deepStrictEqual(Equal.equals(alice, bob), false)
* ```
*
* @category constructors
* @since 2.0.0
*/
export declare const struct: <A extends Record<string, any>>(a: A) => {
readonly [P in keyof A]: A[P];
};
/**
* @category constructors
* @since 2.0.0
*/
export declare const unsafeStruct: <A extends Record<string, any>>(as: A) => { readonly [P in keyof A]: A[P]; };
/**
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* const alice = Data.tuple("Alice", 30)
*
* const bob = Data.tuple("Bob", 40)
*
* assert.deepStrictEqual(Equal.equals(alice, alice), true)
* assert.deepStrictEqual(Equal.equals(alice, Data.tuple("Alice", 30)), true)
*
* assert.deepStrictEqual(Equal.equals(alice, ["Alice", 30]), false)
* assert.deepStrictEqual(Equal.equals(alice, bob), false)
* ```
*
* @category constructors
* @since 2.0.0
*/
export declare const tuple: <As extends ReadonlyArray<any>>(...as: As) => Readonly<As>;
/**
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* const alice = Data.struct({ name: "Alice", age: 30 })
* const bob = Data.struct({ name: "Bob", age: 40 })
*
* const persons = Data.array([alice, bob])
*
* assert.deepStrictEqual(
* Equal.equals(
* persons,
* Data.array([
* Data.struct({ name: "Alice", age: 30 }),
* Data.struct({ name: "Bob", age: 40 })
* ])
* ),
* true
* )
* ```
*
* @category constructors
* @since 2.0.0
*/
export declare const array: <As extends ReadonlyArray<any>>(as: As) => Readonly<As>;
/**
* @category constructors
* @since 2.0.0
*/
export declare const unsafeArray: <As extends ReadonlyArray<any>>(as: As) => Readonly<As>;
declare const _case: <A>() => Case.Constructor<A>;
export {
/**
* Provides a constructor for the specified `Case`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* interface Person {
* readonly name: string
* }
*
* // Creating a constructor for the specified Case
* const Person = Data.case<Person>()
*
* // Creating instances of Person
* const mike1 = Person({ name: "Mike" })
* const mike2 = Person({ name: "Mike" })
* const john = Person({ name: "John" })
*
* // Checking equality
* assert.deepStrictEqual(Equal.equals(mike1, mike2), true)
* assert.deepStrictEqual(Equal.equals(mike1, john), false)
*
* ```
* @since 2.0.0
* @category constructors
*/
_case as case };
/**
* Provides a tagged constructor for the specified `Case`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data } from "effect"
*
* interface Person {
* readonly _tag: "Person" // the tag
* readonly name: string
* }
*
* const Person = Data.tagged<Person>("Person")
*
* const mike = Person({ name: "Mike" })
*
* assert.deepEqual(mike, { _tag: "Person", name: "Mike" })
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const tagged: <A extends {
readonly _tag: string;
}>(tag: A["_tag"]) => Case.Constructor<A, "_tag">;
/**
* Provides a constructor for a Case Class.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* class Person extends Data.Class<{ readonly name: string }> {}
*
* // Creating instances of Person
* const mike1 = new Person({ name: "Mike" })
* const mike2 = new Person({ name: "Mike" })
* const john = new Person({ name: "John" })
*
* // Checking equality
* assert.deepStrictEqual(Equal.equals(mike1, mike2), true)
* assert.deepStrictEqual(Equal.equals(mike1, john), false)
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const Class: new <A extends Record<string, any> = {}>(args: Types.Equals<A, {}> extends true ? void : {
readonly [P in keyof A]: A[P];
}) => Readonly<A>;
/**
* Provides a Tagged constructor for a Case Class.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { Data, Equal } from "effect"
*
* class Person extends Data.TaggedClass("Person")<{ readonly name: string }> {}
*
* // Creating instances of Person
* const mike1 = new Person({ name: "Mike" })
* const mike2 = new Person({ name: "Mike" })
* const john = new Person({ name: "John" })
*
* // Checking equality
* assert.deepStrictEqual(Equal.equals(mike1, mike2), true)
* assert.deepStrictEqual(Equal.equals(mike1, john), false)
*
* assert.deepStrictEqual(mike1._tag, "Person")
* ```
*
* @since 2.0.0
* @category constructors
*/
export declare const TaggedClass: <Tag extends string>(tag: Tag) => new <A extends Record<string, any> = {}>(args: Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
readonly _tag: Tag;
};
/**
* @since 2.0.0
* @category constructors
*/
export declare const Structural: new <A>(args: Types.Equals<A, {}> extends true ? void : {
readonly [P in keyof A]: A[P];
}) => {};
/**
* Create a tagged enum data type, which is a union of `Data` structs.
*
* ```ts
* import * as assert from "node:assert"
* import { Data } from "effect"
*
* type HttpError = Data.TaggedEnum<{
* BadRequest: { readonly status: 400, readonly message: string }
* NotFound: { readonly status: 404, readonly message: string }
* }>
*
* // Equivalent to:
* type HttpErrorPlain =
* | {
* readonly _tag: "BadRequest"
* readonly status: 400
* readonly message: string
* }
* | {
* readonly _tag: "NotFound"
* readonly status: 404
* readonly message: string
* }
* ```
*
* @since 2.0.0
* @category models
*/
export type TaggedEnum<A extends Record<string, Record<string, any>> & UntaggedChildren<A>> = keyof A extends infer Tag ? Tag extends keyof A ? Types.Simplify<{
readonly _tag: Tag;
} & {
readonly [K in keyof A[Tag]]: A[Tag][K];
}> : never : never;
type ChildrenAreTagged<A> = keyof A extends infer K ? K extends keyof A ? "_tag" extends keyof A[K] ? true : false : never : never;
type UntaggedChildren<A> = true extends ChildrenAreTagged<A> ? "It looks like you're trying to create a tagged enum, but one or more of its members already has a `_tag` property." : unknown;
/**
* @since 2.0.0
*/
export declare namespace TaggedEnum {
/**
* @since 2.0.0
* @category models
*/
interface WithGenerics<Count extends number> {
readonly taggedEnum: {
readonly _tag: string;
};
readonly numberOfGenerics: Count;
readonly A: unknown;
readonly B: unknown;
readonly C: unknown;
readonly D: unknown;
}
/**
* @since 2.0.0
* @category models
*/
type Kind<Z extends WithGenerics<number>, A = unknown, B = unknown, C = unknown, D = unknown> = (Z & {
readonly A: A;
readonly B: B;
readonly C: C;
readonly D: D;
})["taggedEnum"];
/**
* @since 2.0.0
*/
type Args<A extends {
readonly _tag: string;
}, K extends A["_tag"], E = Extract<A, {
readonly _tag: K;
}>> = {
readonly [K in keyof E as K extends "_tag" ? never : K]: E[K];
} extends infer T ? {} extends T ? void : T : never;
/**
* @since 2.0.0
*/
type Value<A extends {
readonly _tag: string;
}, K extends A["_tag"]> = Extract<A, {
readonly _tag: K;
}>;
/**
* @since 3.1.0
*/
type Constructor<A extends {
readonly _tag: string;
}> = Types.Simplify<{
readonly [Tag in A["_tag"]]: Case.Constructor<Extract<A, {
readonly _tag: Tag;
}>, "_tag">;
} & {
readonly $is: <Tag extends A["_tag"]>(tag: Tag) => (u: unknown) => u is Extract<A, {
readonly _tag: Tag;
}>;
readonly $match: {
<const Cases extends {
readonly [Tag in A["_tag"]]: (args: Extract<A, {
readonly _tag: Tag;
}>) => any;
}>(cases: Cases & {
[K in Exclude<keyof Cases, A["_tag"]>]: never;
}): (value: A) => Unify<ReturnType<Cases[A["_tag"]]>>;
<const Cases extends {
readonly [Tag in A["_tag"]]: (args: Extract<A, {
readonly _tag: Tag;
}>) => any;
}>(value: A, cases: Cases & {
[K in Exclude<keyof Cases, A["_tag"]>]: never;
}): Unify<ReturnType<Cases[A["_tag"]]>>;
};
}>;
/**
* @since 3.2.0
*/
interface GenericMatchers<Z extends WithGenerics<number>> {
readonly $is: <Tag extends Z["taggedEnum"]["_tag"]>(tag: Tag) => {
<T extends TaggedEnum.Kind<Z, any, any, any, any>>(u: T): u is T & {
readonly _tag: Tag;
};
(u: unknown): u is Extract<TaggedEnum.Kind<Z>, {
readonly _tag: Tag;
}>;
};
readonly $match: {
<A, B, C, D, Cases extends {
readonly [Tag in Z["taggedEnum"]["_tag"]]: (args: Extract<TaggedEnum.Kind<Z, A, B, C, D>, {
readonly _tag: Tag;
}>) => any;
}>(cases: Cases & {
[K in Exclude<keyof Cases, Z["taggedEnum"]["_tag"]>]: never;
}): (self: TaggedEnum.Kind<Z, A, B, C, D>) => Unify<ReturnType<Cases[Z["taggedEnum"]["_tag"]]>>;
<A, B, C, D, Cases extends {
readonly [Tag in Z["taggedEnum"]["_tag"]]: (args: Extract<TaggedEnum.Kind<Z, A, B, C, D>, {
readonly _tag: Tag;
}>) => any;
}>(self: TaggedEnum.Kind<Z, A, B, C, D>, cases: Cases & {
[K in Exclude<keyof Cases, Z["taggedEnum"]["_tag"]>]: never;
}): Unify<ReturnType<Cases[Z["taggedEnum"]["_tag"]]>>;
};
}
}
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
export declare const taggedEnum: {
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
<Z extends TaggedEnum.WithGenerics<1>>(): Types.Simplify<{
readonly [Tag in Z["taggedEnum"]["_tag"]]: <A>(args: TaggedEnum.Args<TaggedEnum.Kind<Z, A>, Tag, Extract<TaggedEnum.Kind<Z, A>, {
readonly _tag: Tag;
}>>) => TaggedEnum.Value<TaggedEnum.Kind<Z, A>, Tag>;
} & TaggedEnum.GenericMatchers<Z>>;
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
<Z extends TaggedEnum.WithGenerics<2>>(): Types.Simplify<{
readonly [Tag in Z["taggedEnum"]["_tag"]]: <A, B>(args: TaggedEnum.Args<TaggedEnum.Kind<Z, A, B>, Tag, Extract<TaggedEnum.Kind<Z, A, B>, {
readonly _tag: Tag;
}>>) => TaggedEnum.Value<TaggedEnum.Kind<Z, A, B>, Tag>;
} & TaggedEnum.GenericMatchers<Z>>;
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
<Z extends TaggedEnum.WithGenerics<3>>(): Types.Simplify<{
readonly [Tag in Z["taggedEnum"]["_tag"]]: <A, B, C>(args: TaggedEnum.Args<TaggedEnum.Kind<Z, A, B, C>, Tag, Extract<TaggedEnum.Kind<Z, A, B, C>, {
readonly _tag: Tag;
}>>) => TaggedEnum.Value<TaggedEnum.Kind<Z, A, B, C>, Tag>;
} & TaggedEnum.GenericMatchers<Z>>;
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
<Z extends TaggedEnum.WithGenerics<4>>(): Types.Simplify<{
readonly [Tag in Z["taggedEnum"]["_tag"]]: <A, B, C, D>(args: TaggedEnum.Args<TaggedEnum.Kind<Z, A, B, C, D>, Tag, Extract<TaggedEnum.Kind<Z, A, B, C, D>, {
readonly _tag: Tag;
}>>) => TaggedEnum.Value<TaggedEnum.Kind<Z, A, B, C, D>, Tag>;
} & TaggedEnum.GenericMatchers<Z>>;
/**
* Create a constructor for a tagged union of `Data` structs.
*
* You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
* the constructor.
*
* @example
* ```ts
* import { Data } from "effect"
*
* const { BadRequest, NotFound } = Data.taggedEnum<
* | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
* | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
* >()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
* Failure: { readonly error: E }
* Success: { readonly value: A }
* }>
* interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
* readonly taggedEnum: MyResult<this["A"], this["B"]>
* }
* const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
*
* const success = Success({ value: 1 })
*
* @category constructors
* @since 2.0.0
*/
<A extends {
readonly _tag: string;
}>(): TaggedEnum.Constructor<A>;
};
/**
* Provides a constructor for a Case Class.
*
* @since 2.0.0
* @category constructors
*/
export declare const Error: new <A extends Record<string, any> = {}>(args: Types.Equals<A, {}> extends true ? void : {
readonly [P in keyof A]: A[P];
}) => Cause.YieldableError & Readonly<A>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const TaggedError: <Tag extends string>(tag: Tag) => new <A extends Record<string, any> = {}>(args: Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Cause.YieldableError & {
readonly _tag: Tag;
} & Readonly<A>;
//# sourceMappingURL=Data.d.ts.map

1
_node_modules/effect/dist/dts/Data.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2417
_node_modules/effect/dist/dts/DateTime.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/DateTime.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

26
_node_modules/effect/dist/dts/DefaultServices.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
/**
* @since 2.0.0
*/
import type * as Clock from "./Clock.js";
import type * as ConfigProvider from "./ConfigProvider.js";
import type * as Console from "./Console.js";
import type * as Context from "./Context.js";
import type * as FiberRef from "./FiberRef.js";
import type * as Random from "./Random.js";
import type * as Tracer from "./Tracer.js";
/**
* @since 2.0.0
* @category models
*/
export type DefaultServices = Clock.Clock | Console.Console | Random.Random | ConfigProvider.ConfigProvider | Tracer.Tracer;
/**
* @since 2.0.0
* @category constructors
*/
export declare const liveServices: Context.Context<DefaultServices>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentServices: FiberRef.FiberRef<Context.Context<DefaultServices>>;
//# sourceMappingURL=DefaultServices.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefaultServices.d.ts","sourceRoot":"","sources":["../../src/DefaultServices.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,KAAK,CAAC,KAAK,GACX,OAAO,CAAC,OAAO,GACf,MAAM,CAAC,MAAM,GACb,cAAc,CAAC,cAAc,GAC7B,MAAM,CAAC,MAAM,CAAA;AAEjB;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,eAAe,CAAyB,CAAA;AAEnF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAA4B,CAAA"}

437
_node_modules/effect/dist/dts/Deferred.d.ts generated vendored Normal file
View File

@@ -0,0 +1,437 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
import type * as Effect from "./Effect.js";
import type * as Exit from "./Exit.js";
import type * as FiberId from "./FiberId.js";
import type { LazyArg } from "./Function.js";
import type * as Option from "./Option.js";
import type * as Types from "./Types.js";
import type * as Unify from "./Unify.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const DeferredTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type DeferredTypeId = typeof DeferredTypeId;
/**
* A `Deferred` represents an asynchronous variable that can be set exactly
* once, with the ability for an arbitrary number of fibers to suspend (by
* calling `Deferred.await`) and automatically resume when the variable is set.
*
* `Deferred` can be used for building primitive actions whose completions
* require the coordinated action of multiple fibers, and for building
* higher-level concurrent or asynchronous structures.
*
* @since 2.0.0
* @category models
*/
export interface Deferred<in out A, in out E = never> extends Effect.Effect<A, E>, Deferred.Variance<A, E> {
readonly [Unify.typeSymbol]?: unknown;
readonly [Unify.unifySymbol]?: DeferredUnify<this>;
readonly [Unify.ignoreSymbol]?: DeferredUnifyIgnore;
}
/**
* @category models
* @since 3.8.0
*/
export interface DeferredUnify<A extends {
[Unify.typeSymbol]?: any;
}> extends Effect.EffectUnify<A> {
Deferred?: () => Extract<A[Unify.typeSymbol], Deferred<any, any>>;
}
/**
* @category models
* @since 3.8.0
*/
export interface DeferredUnifyIgnore extends Effect.EffectUnifyIgnore {
Effect?: true;
}
/**
* @since 2.0.0
*/
export declare namespace Deferred {
/**
* @since 2.0.0
* @category models
*/
interface Variance<in out A, in out E> {
readonly [DeferredTypeId]: {
readonly _A: Types.Invariant<A>;
readonly _E: Types.Invariant<E>;
};
}
}
/**
* Creates a new `Deferred`.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: <A, E = never>() => Effect.Effect<Deferred<A, E>>;
/**
* Creates a new `Deferred` from the specified `FiberId`.
*
* @since 2.0.0
* @category constructors
*/
export declare const makeAs: <A, E = never>(fiberId: FiberId.FiberId) => Effect.Effect<Deferred<A, E>>;
declare const _await: <A, E>(self: Deferred<A, E>) => Effect.Effect<A, E>;
export {
/**
* Retrieves the value of the `Deferred`, suspending the fiber running the
* workflow until the result is available.
*
* @since 2.0.0
* @category getters
*/
_await as await };
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* Note that `Deferred.completeWith` will be much faster, so consider using
* that if you do not need to memoize the result of the specified effect.
*
* @since 2.0.0
* @category utils
*/
export declare const complete: {
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* Note that `Deferred.completeWith` will be much faster, so consider using
* that if you do not need to memoize the result of the specified effect.
*
* @since 2.0.0
* @category utils
*/
<A, E>(effect: Effect.Effect<A, E>): (self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* Note that `Deferred.completeWith` will be much faster, so consider using
* that if you do not need to memoize the result of the specified effect.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, effect: Effect.Effect<A, E>): Effect.Effect<boolean>;
};
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* @since 2.0.0
* @category utils
*/
export declare const completeWith: {
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* @since 2.0.0
* @category utils
*/
<A, E>(effect: Effect.Effect<A, E>): (self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the deferred with the result of the specified effect. If the
* deferred has already been completed, the method will produce false.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, effect: Effect.Effect<A, E>): Effect.Effect<boolean>;
};
/**
* Exits the `Deferred` with the specified `Exit` value, which will be
* propagated to all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const done: {
/**
* Exits the `Deferred` with the specified `Exit` value, which will be
* propagated to all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(exit: Exit.Exit<A, E>): (self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Exits the `Deferred` with the specified `Exit` value, which will be
* propagated to all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, exit: Exit.Exit<A, E>): Effect.Effect<boolean>;
};
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const fail: {
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<E>(error: E): <A>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, error: E): Effect.Effect<boolean>;
};
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const failSync: {
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<E>(evaluate: LazyArg<E>): <A>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Fails the `Deferred` with the specified error, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, evaluate: LazyArg<E>): Effect.Effect<boolean>;
};
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const failCause: {
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<E>(cause: Cause.Cause<E>): <A>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, cause: Cause.Cause<E>): Effect.Effect<boolean>;
};
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const failCauseSync: {
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<E>(evaluate: LazyArg<Cause.Cause<E>>): <A>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Fails the `Deferred` with the specified `Cause`, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, evaluate: LazyArg<Cause.Cause<E>>): Effect.Effect<boolean>;
};
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const die: {
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
(defect: unknown): <A, E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, defect: unknown): Effect.Effect<boolean>;
};
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
export declare const dieSync: {
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
(evaluate: LazyArg<unknown>): <A, E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Kills the `Deferred` with the specified defect, which will be propagated to
* all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, evaluate: LazyArg<unknown>): Effect.Effect<boolean>;
};
/**
* Completes the `Deferred` with interruption. This will interrupt all fibers
* waiting on the value of the `Deferred` with the `FiberId` of the fiber
* calling this method.
*
* @since 2.0.0
* @category utils
*/
export declare const interrupt: <A, E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the `Deferred` with interruption. This will interrupt all fibers
* waiting on the value of the `Deferred` with the specified `FiberId`.
*
* @since 2.0.0
* @category utils
*/
export declare const interruptWith: {
/**
* Completes the `Deferred` with interruption. This will interrupt all fibers
* waiting on the value of the `Deferred` with the specified `FiberId`.
*
* @since 2.0.0
* @category utils
*/
(fiberId: FiberId.FiberId): <A, E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the `Deferred` with interruption. This will interrupt all fibers
* waiting on the value of the `Deferred` with the specified `FiberId`.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, fiberId: FiberId.FiberId): Effect.Effect<boolean>;
};
/**
* Returns `true` if this `Deferred` has already been completed with a value or
* an error, `false` otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const isDone: <A, E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Returns a `Some<Effect<A, E, R>>` from the `Deferred` if this `Deferred` has
* already been completed, `None` otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const poll: <A, E>(self: Deferred<A, E>) => Effect.Effect<Option.Option<Effect.Effect<A, E>>>;
/**
* Completes the `Deferred` with the specified value.
*
* @since 2.0.0
* @category utils
*/
export declare const succeed: {
/**
* Completes the `Deferred` with the specified value.
*
* @since 2.0.0
* @category utils
*/
<A>(value: A): <E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the `Deferred` with the specified value.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, value: A): Effect.Effect<boolean>;
};
/**
* Completes the `Deferred` with the specified lazily evaluated value.
*
* @since 2.0.0
* @category utils
*/
export declare const sync: {
/**
* Completes the `Deferred` with the specified lazily evaluated value.
*
* @since 2.0.0
* @category utils
*/
<A>(evaluate: LazyArg<A>): <E>(self: Deferred<A, E>) => Effect.Effect<boolean>;
/**
* Completes the `Deferred` with the specified lazily evaluated value.
*
* @since 2.0.0
* @category utils
*/
<A, E>(self: Deferred<A, E>, evaluate: LazyArg<A>): Effect.Effect<boolean>;
};
/**
* Unsafely creates a new `Deferred` from the specified `FiberId`.
*
* @since 2.0.0
* @category unsafe
*/
export declare const unsafeMake: <A, E = never>(fiberId: FiberId.FiberId) => Deferred<A, E>;
/**
* Unsafely exits the `Deferred` with the specified `Exit` value, which will be
* propagated to all fibers waiting on the value of the `Deferred`.
*
* @since 2.0.0
* @category unsafe
*/
export declare const unsafeDone: <A, E>(self: Deferred<A, E>, effect: Effect.Effect<A, E>) => void;
//# sourceMappingURL=Deferred.d.ts.map

1
_node_modules/effect/dist/dts/Deferred.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

420
_node_modules/effect/dist/dts/Differ.d.ts generated vendored Normal file
View File

@@ -0,0 +1,420 @@
/**
* @since 2.0.0
*/
import type { Chunk } from "./Chunk.js";
import type { Context } from "./Context.js";
import type { Either } from "./Either.js";
import type { Equal } from "./Equal.js";
import type { HashMap } from "./HashMap.js";
import type { HashSet } from "./HashSet.js";
import type { Pipeable } from "./Pipeable.js";
import type * as Types from "./Types.js";
/**
* @since 2.0.0
* @category symbol
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @category symbol
*/
export type TypeId = typeof TypeId;
/**
* A `Differ<Value, Patch>` knows how to compare an old value and new value of
* type `Value` to produce a patch of type `Patch` that describes the
* differences between those values. A `Differ` also knows how to apply a patch
* to an old value to produce a new value that represents the old value updated
* with the changes described by the patch.
*
* A `Differ` can be used to construct a `FiberRef` supporting compositional
* updates using the `FiberRef.makePatch` constructor.
*
* The `Differ` companion object contains constructors for `Differ` values for
* common data types such as `Chunk`, `HashMap`, and `HashSet``. In addition,
* `Differ`values can be transformed using the `transform` operator and combined
* using the `orElseEither` and `zip` operators. This allows creating `Differ`
* values for arbitrarily complex data types compositionally.
*
* @since 2.0.0
* @category models
*/
export interface Differ<in out Value, in out Patch> extends Pipeable {
readonly [TypeId]: {
readonly _V: Types.Invariant<Value>;
readonly _P: Types.Invariant<Patch>;
};
readonly empty: Patch;
diff(oldValue: Value, newValue: Value): Patch;
combine(first: Patch, second: Patch): Patch;
patch(patch: Patch, oldValue: Value): Value;
}
declare const ChunkPatchTypeId: unique symbol;
declare const ContextPatchTypeId: unique symbol;
declare const HashMapPatchTypeId: unique symbol;
declare const HashSetPatchTypeId: unique symbol;
declare const OrPatchTypeId: unique symbol;
declare const ReadonlyArrayPatchTypeId: unique symbol;
/**
* @since 2.0.0
*/
export declare namespace Differ {
/**
* @since 2.0.0
*/
namespace Context {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof ContextPatchTypeId;
/**
* A `Patch<Input, Output>` describes an update that transforms a `Env<Input>`
* to a `Env<Output>` as a data structure. This allows combining updates to
* different services in the environment in a compositional way.
*
* @since 2.0.0
* @category models
*/
interface Patch<in Input, out Output> extends Equal {
readonly [ContextPatchTypeId]: {
readonly _Input: Types.Contravariant<Input>;
readonly _Output: Types.Covariant<Output>;
};
}
}
/**
* @since 2.0.0
*/
namespace Chunk {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof ChunkPatchTypeId;
/**
* A patch which describes updates to a chunk of values.
*
* @since 2.0.0
* @category models
*/
interface Patch<in out Value, in out Patch> extends Equal {
readonly [ChunkPatchTypeId]: {
readonly _Value: Types.Invariant<Value>;
readonly _Patch: Types.Invariant<Patch>;
};
}
}
/**
* @since 2.0.0
*/
namespace HashMap {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof HashMapPatchTypeId;
/**
* A patch which describes updates to a map of keys and values.
*
* @since 2.0.0
* @category models
*/
interface Patch<in out Key, in out Value, in out Patch> extends Equal {
readonly [HashMapPatchTypeId]: {
readonly _Key: Types.Invariant<Key>;
readonly _Value: Types.Invariant<Value>;
readonly _Patch: Types.Invariant<Patch>;
};
}
}
/**
* @since 2.0.0
*/
namespace HashSet {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof HashSetPatchTypeId;
/**
* A patch which describes updates to a set of values.
*
* @since 2.0.0
* @category models
*/
interface Patch<in out Value> extends Equal {
readonly [HashSetPatchTypeId]: {
readonly _Value: Types.Invariant<Value>;
};
}
}
/**
* @since 2.0.0
*/
namespace Or {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof OrPatchTypeId;
/**
* A patch which describes updates to either one value or another.
*
* @since 2.0.0
* @category models
*/
interface Patch<in out Value, in out Value2, in out Patch, in out Patch2> extends Equal {
readonly [OrPatchTypeId]: {
readonly _Value: Types.Invariant<Value>;
readonly _Value2: Types.Invariant<Value2>;
readonly _Patch: Types.Invariant<Patch>;
readonly _Patch2: Types.Invariant<Patch2>;
};
}
}
/**
* @since 2.0.0
*/
namespace ReadonlyArray {
/**
* @since 2.0.0
* @category symbol
*/
type TypeId = typeof ReadonlyArrayPatchTypeId;
/**
* A patch which describes updates to a ReadonlyArray of values.
*
* @since 2.0.0
* @category models
*/
interface Patch<in out Value, in out Patch> extends Equal {
readonly [ReadonlyArrayPatchTypeId]: {
readonly _Value: Types.Invariant<Value>;
readonly _Patch: Types.Invariant<Patch>;
};
}
}
}
/**
* An empty patch that describes no changes.
*
* @since 2.0.0
* @category patch
*/
export declare const empty: <Value, Patch>(self: Differ<Value, Patch>) => Patch;
/**
* @since 2.0.0
* @category patch
*/
export declare const diff: {
/**
* @since 2.0.0
* @category patch
*/
<Value>(oldValue: Value, newValue: Value): <Patch>(self: Differ<Value, Patch>) => Patch;
/**
* @since 2.0.0
* @category patch
*/
<Value, Patch>(self: Differ<Value, Patch>, oldValue: Value, newValue: Value): Patch;
};
/**
* Combines two patches to produce a new patch that describes the updates of
* the first patch and then the updates of the second patch. The combine
* operation should be associative. In addition, if the combine operation is
* commutative then joining multiple fibers concurrently will result in
* deterministic `FiberRef` values.
*
* @since 2.0.0
* @category patch
*/
export declare const combine: {
/**
* Combines two patches to produce a new patch that describes the updates of
* the first patch and then the updates of the second patch. The combine
* operation should be associative. In addition, if the combine operation is
* commutative then joining multiple fibers concurrently will result in
* deterministic `FiberRef` values.
*
* @since 2.0.0
* @category patch
*/
<Patch>(first: Patch, second: Patch): <Value>(self: Differ<Value, Patch>) => Patch;
/**
* Combines two patches to produce a new patch that describes the updates of
* the first patch and then the updates of the second patch. The combine
* operation should be associative. In addition, if the combine operation is
* commutative then joining multiple fibers concurrently will result in
* deterministic `FiberRef` values.
*
* @since 2.0.0
* @category patch
*/
<Value, Patch>(self: Differ<Value, Patch>, first: Patch, second: Patch): Patch;
};
/**
* Applies a patch to an old value to produce a new value that is equal to the
* old value with the updates described by the patch.
*
* @since 2.0.0
* @category patch
*/
export declare const patch: {
/**
* Applies a patch to an old value to produce a new value that is equal to the
* old value with the updates described by the patch.
*
* @since 2.0.0
* @category patch
*/
<Patch, Value>(patch: Patch, oldValue: Value): (self: Differ<Value, Patch>) => Value;
/**
* Applies a patch to an old value to produce a new value that is equal to the
* old value with the updates described by the patch.
*
* @since 2.0.0
* @category patch
*/
<Patch, Value>(self: Differ<Value, Patch>, patch: Patch, oldValue: Value): Value;
};
/**
* Constructs a new `Differ`.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: <Value, Patch>(params: {
readonly empty: Patch;
readonly diff: (oldValue: Value, newValue: Value) => Patch;
readonly combine: (first: Patch, second: Patch) => Patch;
readonly patch: (patch: Patch, oldValue: Value) => Value;
}) => Differ<Value, Patch>;
/**
* Constructs a differ that knows how to diff `Env` values.
*
* @since 2.0.0
* @category constructors
*/
export declare const environment: <A>() => Differ<Context<A>, Differ.Context.Patch<A, A>>;
/**
* Constructs a differ that knows how to diff a `Chunk` of values given a
* differ that knows how to diff the values.
*
* @since 2.0.0
* @category constructors
*/
export declare const chunk: <Value, Patch>(differ: Differ<Value, Patch>) => Differ<Chunk<Value>, Differ.Chunk.Patch<Value, Patch>>;
/**
* Constructs a differ that knows how to diff a `HashMap` of keys and values given
* a differ that knows how to diff the values.
*
* @since 2.0.0
* @category constructors
*/
export declare const hashMap: <Key, Value, Patch>(differ: Differ<Value, Patch>) => Differ<HashMap<Key, Value>, Differ.HashMap.Patch<Key, Value, Patch>>;
/**
* Constructs a differ that knows how to diff a `HashSet` of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const hashSet: <Value>() => Differ<HashSet<Value>, Differ.HashSet.Patch<Value>>;
/**
* Combines this differ and the specified differ to produce a differ that
* knows how to diff the sum of their values.
*
* @since 2.0.0
*/
export declare const orElseEither: {
/**
* Combines this differ and the specified differ to produce a differ that
* knows how to diff the sum of their values.
*
* @since 2.0.0
*/
<Value2, Patch2>(that: Differ<Value2, Patch2>): <Value, Patch>(self: Differ<Value, Patch>) => Differ<Either<Value2, Value>, Differ.Or.Patch<Value, Value2, Patch, Patch2>>;
/**
* Combines this differ and the specified differ to produce a differ that
* knows how to diff the sum of their values.
*
* @since 2.0.0
*/
<Value, Patch, Value2, Patch2>(self: Differ<Value, Patch>, that: Differ<Value2, Patch2>): Differ<Either<Value2, Value>, Differ.Or.Patch<Value, Value2, Patch, Patch2>>;
};
/**
* Constructs a differ that knows how to diff a `ReadonlyArray` of values.
*
* @since 2.0.0
* @category constructors
*/
export declare const readonlyArray: <Value, Patch>(differ: Differ<Value, Patch>) => Differ<ReadonlyArray<Value>, Differ.ReadonlyArray.Patch<Value, Patch>>;
/**
* Transforms the type of values that this differ knows how to differ using
* the specified functions that map the new and old value types to each other.
*
* @since 2.0.0
*/
export declare const transform: {
/**
* Transforms the type of values that this differ knows how to differ using
* the specified functions that map the new and old value types to each other.
*
* @since 2.0.0
*/
<Value, Value2>(options: {
readonly toNew: (value: Value) => Value2;
readonly toOld: (value: Value2) => Value;
}): <Patch>(self: Differ<Value, Patch>) => Differ<Value2, Patch>;
/**
* Transforms the type of values that this differ knows how to differ using
* the specified functions that map the new and old value types to each other.
*
* @since 2.0.0
*/
<Value, Patch, Value2>(self: Differ<Value, Patch>, options: {
readonly toNew: (value: Value) => Value2;
readonly toOld: (value: Value2) => Value;
}): Differ<Value2, Patch>;
};
/**
* Constructs a differ that just diffs two values by returning a function that
* sets the value to the new value. This differ does not support combining
* multiple updates to the value compositionally and should only be used when
* there is no compositional way to update them.
*
* @since 2.0.0
*/
export declare const update: <A>() => Differ<A, (a: A) => A>;
/**
* A variant of `update` that allows specifying the function that will be used
* to combine old values with new values.
*
* @since 2.0.0
*/
export declare const updateWith: <A>(f: (x: A, y: A) => A) => Differ<A, (a: A) => A>;
/**
* Combines this differ and the specified differ to produce a new differ that
* knows how to diff the product of their values.
*
* @since 2.0.0
*/
export declare const zip: {
/**
* Combines this differ and the specified differ to produce a new differ that
* knows how to diff the product of their values.
*
* @since 2.0.0
*/
<Value2, Patch2>(that: Differ<Value2, Patch2>): <Value, Patch>(self: Differ<Value, Patch>) => Differ<readonly [Value, Value2], // readonly because invariant
readonly [Patch, Patch2]>;
/**
* Combines this differ and the specified differ to produce a new differ that
* knows how to diff the product of their values.
*
* @since 2.0.0
*/
<Value, Patch, Value2, Patch2>(self: Differ<Value, Patch>, that: Differ<Value2, Patch2>): Differ<readonly [Value, Value2], // readonly because invariant
readonly [Patch, Patch2]>;
};
export {};
//# sourceMappingURL=Differ.d.ts.map

1
_node_modules/effect/dist/dts/Differ.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

557
_node_modules/effect/dist/dts/Duration.d.ts generated vendored Normal file
View File

@@ -0,0 +1,557 @@
/**
* @since 2.0.0
*/
import * as Equal from "./Equal.js";
import type * as equivalence from "./Equivalence.js";
import type { Inspectable } from "./Inspectable.js";
import * as Option from "./Option.js";
import * as order from "./Order.js";
import type { Pipeable } from "./Pipeable.js";
declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @category symbol
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @category models
*/
export interface Duration extends Equal.Equal, Pipeable, Inspectable {
readonly [TypeId]: TypeId;
readonly value: DurationValue;
}
/**
* @since 2.0.0
* @category models
*/
export type DurationValue = {
readonly _tag: "Millis";
readonly millis: number;
} | {
readonly _tag: "Nanos";
readonly nanos: bigint;
} | {
readonly _tag: "Infinity";
};
/**
* @since 2.0.0
* @category models
*/
export type Unit = "nano" | "nanos" | "micro" | "micros" | "milli" | "millis" | "second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days" | "week" | "weeks";
/**
* @since 2.0.0
* @category models
*/
export type DurationInput = Duration | number | bigint | readonly [seconds: number, nanos: number] | `${number} ${Unit}`;
/**
* @since 2.0.0
*/
export declare const decode: (input: DurationInput) => Duration;
/**
* @since 2.5.0
*/
export declare const decodeUnknown: (u: unknown) => Option.Option<Duration>;
/**
* @since 2.0.0
* @category guards
*/
export declare const isDuration: (u: unknown) => u is Duration;
/**
* @since 2.0.0
* @category guards
*/
export declare const isFinite: (self: Duration) => boolean;
/**
* @since 3.5.0
* @category guards
*/
export declare const isZero: (self: Duration) => boolean;
/**
* @since 2.0.0
* @category constructors
*/
export declare const zero: Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const infinity: Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const nanos: (nanos: bigint) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const micros: (micros: bigint) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const millis: (millis: number) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const seconds: (seconds: number) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const minutes: (minutes: number) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const hours: (hours: number) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const days: (days: number) => Duration;
/**
* @since 2.0.0
* @category constructors
*/
export declare const weeks: (weeks: number) => Duration;
/**
* @since 2.0.0
* @category getters
*/
export declare const toMillis: (self: DurationInput) => number;
/**
* @since 2.0.0
* @category getters
*/
export declare const toSeconds: (self: DurationInput) => number;
/**
* @since 3.8.0
* @category getters
*/
export declare const toMinutes: (self: DurationInput) => number;
/**
* @since 3.8.0
* @category getters
*/
export declare const toHours: (self: DurationInput) => number;
/**
* @since 3.8.0
* @category getters
*/
export declare const toDays: (self: DurationInput) => number;
/**
* @since 3.8.0
* @category getters
*/
export declare const toWeeks: (self: DurationInput) => number;
/**
* Get the duration in nanoseconds as a bigint.
*
* If the duration is infinite, returns `Option.none()`
*
* @since 2.0.0
* @category getters
*/
export declare const toNanos: (self: DurationInput) => Option.Option<bigint>;
/**
* Get the duration in nanoseconds as a bigint.
*
* If the duration is infinite, it throws an error.
*
* @since 2.0.0
* @category getters
*/
export declare const unsafeToNanos: (self: DurationInput) => bigint;
/**
* @since 2.0.0
* @category getters
*/
export declare const toHrTime: (self: DurationInput) => [seconds: number, nanos: number];
/**
* @since 2.0.0
* @category pattern matching
*/
export declare const match: {
/**
* @since 2.0.0
* @category pattern matching
*/
<A, B>(options: {
readonly onMillis: (millis: number) => A;
readonly onNanos: (nanos: bigint) => B;
}): (self: DurationInput) => A | B;
/**
* @since 2.0.0
* @category pattern matching
*/
<A, B>(self: DurationInput, options: {
readonly onMillis: (millis: number) => A;
readonly onNanos: (nanos: bigint) => B;
}): A | B;
};
/**
* @since 2.0.0
* @category pattern matching
*/
export declare const matchWith: {
/**
* @since 2.0.0
* @category pattern matching
*/
<A, B>(that: DurationInput, options: {
readonly onMillis: (self: number, that: number) => A;
readonly onNanos: (self: bigint, that: bigint) => B;
}): (self: DurationInput) => A | B;
/**
* @since 2.0.0
* @category pattern matching
*/
<A, B>(self: DurationInput, that: DurationInput, options: {
readonly onMillis: (self: number, that: number) => A;
readonly onNanos: (self: bigint, that: bigint) => B;
}): A | B;
};
/**
* @category instances
* @since 2.0.0
*/
export declare const Order: order.Order<Duration>;
/**
* Checks if a `Duration` is between a `minimum` and `maximum` value.
*
* @category predicates
* @since 2.0.0
*/
export declare const between: {
/**
* Checks if a `Duration` is between a `minimum` and `maximum` value.
*
* @category predicates
* @since 2.0.0
*/
(options: {
minimum: DurationInput;
maximum: DurationInput;
}): (self: DurationInput) => boolean;
/**
* Checks if a `Duration` is between a `minimum` and `maximum` value.
*
* @category predicates
* @since 2.0.0
*/
(self: DurationInput, options: {
minimum: DurationInput;
maximum: DurationInput;
}): boolean;
};
/**
* @category instances
* @since 2.0.0
*/
export declare const Equivalence: equivalence.Equivalence<Duration>;
/**
* @since 2.0.0
*/
export declare const min: {
/**
* @since 2.0.0
*/
(that: DurationInput): (self: DurationInput) => Duration;
/**
* @since 2.0.0
*/
(self: DurationInput, that: DurationInput): Duration;
};
/**
* @since 2.0.0
* @category order
*/
export declare const max: {
/**
* @since 2.0.0
* @category order
*/
(that: DurationInput): (self: DurationInput) => Duration;
/**
* @since 2.0.0
* @category order
*/
(self: DurationInput, that: DurationInput): Duration;
};
/**
* @since 2.0.0
* @category order
*/
export declare const clamp: {
/**
* @since 2.0.0
* @category order
*/
(options: {
minimum: DurationInput;
maximum: DurationInput;
}): (self: DurationInput) => Duration;
/**
* @since 2.0.0
* @category order
*/
(self: DurationInput, options: {
minimum: DurationInput;
maximum: DurationInput;
}): Duration;
};
/**
* @since 2.4.19
* @category math
*/
export declare const divide: {
/**
* @since 2.4.19
* @category math
*/
(by: number): (self: DurationInput) => Option.Option<Duration>;
/**
* @since 2.4.19
* @category math
*/
(self: DurationInput, by: number): Option.Option<Duration>;
};
/**
* @since 2.4.19
* @category math
*/
export declare const unsafeDivide: {
/**
* @since 2.4.19
* @category math
*/
(by: number): (self: DurationInput) => Duration;
/**
* @since 2.4.19
* @category math
*/
(self: DurationInput, by: number): Duration;
};
/**
* @since 2.0.0
* @category math
*/
export declare const times: {
/**
* @since 2.0.0
* @category math
*/
(times: number): (self: DurationInput) => Duration;
/**
* @since 2.0.0
* @category math
*/
(self: DurationInput, times: number): Duration;
};
/**
* @since 2.0.0
* @category math
*/
export declare const subtract: {
/**
* @since 2.0.0
* @category math
*/
(that: DurationInput): (self: DurationInput) => Duration;
/**
* @since 2.0.0
* @category math
*/
(self: DurationInput, that: DurationInput): Duration;
};
/**
* @since 2.0.0
* @category math
*/
export declare const sum: {
/**
* @since 2.0.0
* @category math
*/
(that: DurationInput): (self: DurationInput) => Duration;
/**
* @since 2.0.0
* @category math
*/
(self: DurationInput, that: DurationInput): Duration;
};
/**
* @since 2.0.0
* @category predicates
*/
export declare const lessThan: {
/**
* @since 2.0.0
* @category predicates
*/
(that: DurationInput): (self: DurationInput) => boolean;
/**
* @since 2.0.0
* @category predicates
*/
(self: DurationInput, that: DurationInput): boolean;
};
/**
* @since 2.0.0
* @category predicates
*/
export declare const lessThanOrEqualTo: {
/**
* @since 2.0.0
* @category predicates
*/
(that: DurationInput): (self: DurationInput) => boolean;
/**
* @since 2.0.0
* @category predicates
*/
(self: DurationInput, that: DurationInput): boolean;
};
/**
* @since 2.0.0
* @category predicates
*/
export declare const greaterThan: {
/**
* @since 2.0.0
* @category predicates
*/
(that: DurationInput): (self: DurationInput) => boolean;
/**
* @since 2.0.0
* @category predicates
*/
(self: DurationInput, that: DurationInput): boolean;
};
/**
* @since 2.0.0
* @category predicates
*/
export declare const greaterThanOrEqualTo: {
/**
* @since 2.0.0
* @category predicates
*/
(that: DurationInput): (self: DurationInput) => boolean;
/**
* @since 2.0.0
* @category predicates
*/
(self: DurationInput, that: DurationInput): boolean;
};
/**
* @since 2.0.0
* @category predicates
*/
export declare const equals: {
/**
* @since 2.0.0
* @category predicates
*/
(that: DurationInput): (self: DurationInput) => boolean;
/**
* @since 2.0.0
* @category predicates
*/
(self: DurationInput, that: DurationInput): boolean;
};
/**
* Converts a `Duration` to its parts.
*
* @since 3.8.0
* @category conversions
*/
export declare const parts: (self: DurationInput) => {
days: number;
hours: number;
minutes: number;
seconds: number;
millis: number;
nanos: number;
};
/**
* Converts a `Duration` to a human readable string.
*
* @since 2.0.0
* @category conversions
* @example
* ```ts
* import { Duration } from "effect"
*
* Duration.format(Duration.millis(1000)) // "1s"
* Duration.format(Duration.millis(1001)) // "1s 1ms"
* ```
*/
export declare const format: (self: DurationInput) => string;
/**
* Formats a Duration into an ISO8601 duration string.
*
* Months are assumed to be 30 days and years are assumed to be 365 days.
*
* Milliseconds and nanoseconds are expressed as fractional seconds.
*
* @example
* ```ts
* import { Duration } from "effect"
*
* Duration.unsafeFormatIso(Duration.days(1)) // => "P1D"
* Duration.unsafeFormatIso(Duration.minutes(90)) // => "PT1H30M"
* Duration.unsafeFormatIso(Duration.millis(1500)) // => "PT1.5S"
* ```
*
* @throws `RangeError` If the duration is not finite.
*
* @since 3.13.0
* @category conversions
*/
export declare const unsafeFormatIso: (self: DurationInput) => string;
/**
* Formats a Duration into an ISO8601 duration string.
*
* Months are assumed to be 30 days and years are assumed to be 365 days.
*
* Returns `Option.none()` if the duration is infinite.
*
* @example
* ```ts
* import { Duration, Option } from "effect"
*
* Duration.formatIso(Duration.days(1)) // => Option.some("P1D")
* Duration.formatIso(Duration.minutes(90)) // => Option.some("PT1H30M")
* Duration.formatIso(Duration.millis(1500)) // => Option.some("PT1.5S")
* Duration.formatIso(Duration.infinity) // => Option.none()
* ```
*
* @since 3.13.0
* @category conversions
*/
export declare const formatIso: (self: DurationInput) => Option.Option<string>;
/**
* Parses an ISO8601 duration string into a `Duration`.
*
* Months are assumed to be 30 days and years are assumed to be 365 days.
*
* @example
* ```ts
* import { Duration, Option } from "effect"
*
* Duration.fromIso("P1D") // => Option.some(Duration.days(1))
* Duration.fromIso("PT1H") // => Option.some(Duration.hours(1))
* Duration.fromIso("PT1M") // => Option.some(Duration.minutes(1))
* Duration.fromIso("PT1.5S") // => Option.some(Duration.seconds(1.5))
* ```
*
* @since 3.13.0
* @category conversions
*/
export declare const fromIso: (iso: string) => Option.Option<Duration>;
export {};
//# sourceMappingURL=Duration.d.ts.map

1
_node_modules/effect/dist/dts/Duration.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

26981
_node_modules/effect/dist/dts/Effect.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Effect.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

93
_node_modules/effect/dist/dts/Effectable.d.ts generated vendored Normal file
View File

@@ -0,0 +1,93 @@
/**
* @since 2.0.0
*/
import type * as Channel from "./Channel.js";
import type * as Effect from "./Effect.js";
import type * as Sink from "./Sink.js";
import type * as Stream from "./Stream.js";
/**
* @since 2.0.0
* @category type ids
*/
export declare const EffectTypeId: Effect.EffectTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export type EffectTypeId = Effect.EffectTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export declare const StreamTypeId: Stream.StreamTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export type StreamTypeId = Stream.StreamTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export declare const SinkTypeId: Sink.SinkTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export type SinkTypeId = Sink.SinkTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export declare const ChannelTypeId: Channel.ChannelTypeId;
/**
* @since 2.0.0
* @category type ids
*/
export type ChannelTypeId = Channel.ChannelTypeId;
/**
* @since 2.0.0
* @category models
*/
export interface CommitPrimitive {
new <A, E = never, R = never>(): Effect.Effect<A, E, R>;
}
/**
* @since 2.0.0
* @category prototypes
*/
export declare const EffectPrototype: Effect.Effect<never>;
/**
* @since 2.0.0
* @category prototypes
*/
export declare const CommitPrototype: Effect.Effect<never>;
/**
* @since 2.0.0
* @category prototypes
*/
export declare const StructuralCommitPrototype: Effect.Effect<never>;
declare const Base: CommitPrimitive;
declare const StructuralBase: CommitPrimitive;
/**
* @since 2.0.0
* @category constructors
*/
export declare abstract class Class<A, E = never, R = never> extends Base<A, E, R> {
/**
* @since 2.0.0
*/
abstract commit(): Effect.Effect<A, E, R>;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare abstract class StructuralClass<A, E = never, R = never> extends StructuralBase<A, E, R> {
/**
* @since 2.0.0
*/
abstract commit(): Effect.Effect<A, E, R>;
}
export {};
//# sourceMappingURL=Effectable.d.ts.map

1
_node_modules/effect/dist/dts/Effectable.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Effectable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,CAAC,KAAK,CAAsC,CAAA;AAEjG,QAAA,MAAM,IAAI,EAAE,eAA+B,CAAA;AAC3C,QAAA,MAAM,cAAc,EAAE,eAAyC,CAAA;AAE/D;;;GAGG;AACH,8BAAsB,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,CAAE,SAAQ,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,8BAAsB,eAAe,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,CAAE,SAAQ,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5F;;OAEG;IACH,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAC1C"}

1431
_node_modules/effect/dist/dts/Either.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Either.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

160
_node_modules/effect/dist/dts/Encoding.d.ts generated vendored Normal file
View File

@@ -0,0 +1,160 @@
/**
* This module provides encoding & decoding functionality for:
*
* - base64 (RFC4648)
* - base64 (URL)
* - hex
*
* @since 2.0.0
*/
import * as Either from "./Either.js";
/**
* Encodes the given value into a base64 (RFC4648) `string`.
*
* @category encoding
* @since 2.0.0
*/
export declare const encodeBase64: (input: Uint8Array | string) => string;
/**
* Decodes a base64 (RFC4648) encoded `string` into a `Uint8Array`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeBase64: (str: string) => Either.Either<Uint8Array, DecodeException>;
/**
* Decodes a base64 (RFC4648) encoded `string` into a UTF-8 `string`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeBase64String: (str: string) => Either.Either<string, DecodeException>;
/**
* Encodes the given value into a base64 (URL) `string`.
*
* @category encoding
* @since 2.0.0
*/
export declare const encodeBase64Url: (input: Uint8Array | string) => string;
/**
* Decodes a base64 (URL) encoded `string` into a `Uint8Array`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeBase64Url: (str: string) => Either.Either<Uint8Array, DecodeException>;
/**
* Decodes a base64 (URL) encoded `string` into a UTF-8 `string`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeBase64UrlString: (str: string) => Either.Either<string, DecodeException>;
/**
* Encodes the given value into a hex `string`.
*
* @category encoding
* @since 2.0.0
*/
export declare const encodeHex: (input: Uint8Array | string) => string;
/**
* Decodes a hex encoded `string` into a `Uint8Array`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeHex: (str: string) => Either.Either<Uint8Array, DecodeException>;
/**
* Decodes a hex encoded `string` into a UTF-8 `string`.
*
* @category decoding
* @since 2.0.0
*/
export declare const decodeHexString: (str: string) => Either.Either<string, DecodeException>;
/**
* Encodes a UTF-8 `string` into a URI component `string`.
*
* @category encoding
* @since 3.12.0
*/
export declare const encodeUriComponent: (str: string) => Either.Either<string, EncodeException>;
/**
* Decodes a URI component `string` into a UTF-8 `string`.
*
* @category decoding
* @since 3.12.0
*/
export declare const decodeUriComponent: (str: string) => Either.Either<string, DecodeException>;
/**
* @since 2.0.0
* @category symbols
*/
export declare const DecodeExceptionTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type DecodeExceptionTypeId = typeof DecodeExceptionTypeId;
/**
* Represents a checked exception which occurs when decoding fails.
*
* @since 2.0.0
* @category models
*/
export interface DecodeException {
readonly _tag: "DecodeException";
readonly [DecodeExceptionTypeId]: DecodeExceptionTypeId;
readonly input: string;
readonly message?: string;
}
/**
* Creates a checked exception which occurs when decoding fails.
*
* @since 2.0.0
* @category errors
*/
export declare const DecodeException: (input: string, message?: string) => DecodeException;
/**
* Returns `true` if the specified value is an `DecodeException`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isDecodeException: (u: unknown) => u is DecodeException;
/**
* @since 3.12.0
* @category symbols
*/
export declare const EncodeExceptionTypeId: unique symbol;
/**
* @since 3.12.0
* @category symbols
*/
export type EncodeExceptionTypeId = typeof EncodeExceptionTypeId;
/**
* Represents a checked exception which occurs when encoding fails.
*
* @since 3.12.0
* @category models
*/
export interface EncodeException {
readonly _tag: "EncodeException";
readonly [EncodeExceptionTypeId]: EncodeExceptionTypeId;
readonly input: string;
readonly message?: string;
}
/**
* Creates a checked exception which occurs when encoding fails.
*
* @since 3.12.0
* @category errors
*/
export declare const EncodeException: (input: string, message?: string) => EncodeException;
/**
* Returns `true` if the specified value is an `EncodeException`, `false` otherwise.
*
* @since 3.12.0
* @category refinements
*/
export declare const isEncodeException: (u: unknown) => u is EncodeException;
//# sourceMappingURL=Encoding.d.ts.map

1
_node_modules/effect/dist/dts/Encoding.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Encoding.d.ts","sourceRoot":"","sources":["../../src/Encoding.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAMrC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,KAAK,MACqC,CAAA;AAEhG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAuB,CAAA;AAE3G;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,2CAAmE,CAAA;AAEjH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,KAAK,MACwC,CAAA;AAEtG;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,C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AC,IAAI,eAA0C,CAAA;AAE/F;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,MAAqC,CAAA;AAEhF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,eAAwC,CAAA;AAE3G;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,eAA0C,CAAA"}

34
_node_modules/effect/dist/dts/Equal.d.ts generated vendored Normal file
View File

@@ -0,0 +1,34 @@
/**
* @since 2.0.0
*/
import type { Equivalence } from "./Equivalence.js";
import * as Hash from "./Hash.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const symbol: unique symbol;
/**
* @since 2.0.0
* @category models
*/
export interface Equal extends Hash.Hash {
[symbol](that: Equal): boolean;
}
/**
* @since 2.0.0
* @category equality
*/
export declare function equals<B>(that: B): <A>(self: A) => boolean;
export declare function equals<A, B>(self: A, that: B): boolean;
/**
* @since 2.0.0
* @category guards
*/
export declare const isEqual: (u: unknown) => u is Equal;
/**
* @since 2.0.0
* @category instances
*/
export declare const equivalence: <A>() => Equivalence<A>;
//# sourceMappingURL=Equal.d.ts.map

1
_node_modules/effect/dist/dts/Equal.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Equal.d.ts","sourceRoot":"","sources":["../../src/Equal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAIjC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAmC,CAAA;AAE/D;;;GAGG;AACH,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,IAAI;IACtC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAA;CAC/B;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,OAAO,CAAA;AAC3D,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAA;AA0DvD;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,KAA+B,CAAA;AAEzE;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,CAAgB,CAAA"}

158
_node_modules/effect/dist/dts/Equivalence.d.ts generated vendored Normal file
View File

@@ -0,0 +1,158 @@
import type { TypeLambda } from "./HKT.js";
/**
* @category type class
* @since 2.0.0
*/
export interface Equivalence<in A> {
(self: A, that: A): boolean;
}
/**
* @category type lambdas
* @since 2.0.0
*/
export interface EquivalenceTypeLambda extends TypeLambda {
readonly type: Equivalence<this["Target"]>;
}
/**
* @category constructors
* @since 2.0.0
*/
export declare const make: <A>(isEquivalent: (self: A, that: A) => boolean) => Equivalence<A>;
/**
* Return an `Equivalence` that uses strict equality (===) to compare values.
*
* @since 2.0.0
* @category constructors
*/
export declare const strict: <A>() => Equivalence<A>;
/**
* @category instances
* @since 2.0.0
*/
export declare const string: Equivalence<string>;
/**
* @category instances
* @since 2.0.0
*/
export declare const number: Equivalence<number>;
/**
* @category instances
* @since 2.0.0
*/
export declare const boolean: Equivalence<boolean>;
/**
* @category instances
* @since 2.0.0
*/
export declare const bigint: Equivalence<bigint>;
/**
* @category instances
* @since 2.0.0
*/
export declare const symbol: Equivalence<symbol>;
/**
* @category combining
* @since 2.0.0
*/
export declare const combine: {
/**
* @category combining
* @since 2.0.0
*/
<A>(that: Equivalence<A>): (self: Equivalence<A>) => Equivalence<A>;
/**
* @category combining
* @since 2.0.0
*/
<A>(self: Equivalence<A>, that: Equivalence<A>): Equivalence<A>;
};
/**
* @category combining
* @since 2.0.0
*/
export declare const combineMany: {
/**
* @category combining
* @since 2.0.0
*/
<A>(collection: Iterable<Equivalence<A>>): (self: Equivalence<A>) => Equivalence<A>;
/**
* @category combining
* @since 2.0.0
*/
<A>(self: Equivalence<A>, collection: Iterable<Equivalence<A>>): Equivalence<A>;
};
/**
* @category combining
* @since 2.0.0
*/
export declare const combineAll: <A>(collection: Iterable<Equivalence<A>>) => Equivalence<A>;
/**
* @category mapping
* @since 2.0.0
*/
export declare const mapInput: {
/**
* @category mapping
* @since 2.0.0
*/
<B, A>(f: (b: B) => A): (self: Equivalence<A>) => Equivalence<B>;
/**
* @category mapping
* @since 2.0.0
*/
<A, B>(self: Equivalence<A>, f: (b: B) => A): Equivalence<B>;
};
/**
* @category instances
* @since 2.0.0
*/
export declare const Date: Equivalence<Date>;
/**
* @category combining
* @since 2.0.0
*/
export declare const product: {
<B>(that: Equivalence<B>): <A>(self: Equivalence<A>) => Equivalence<readonly [A, B]>;
<A, B>(self: Equivalence<A>, that: Equivalence<B>): Equivalence<readonly [A, B]>;
};
/**
* @category combining
* @since 2.0.0
*/
export declare const all: <A>(collection: Iterable<Equivalence<A>>) => Equivalence<ReadonlyArray<A>>;
/**
* @category combining
* @since 2.0.0
*/
export declare const productMany: <A>(self: Equivalence<A>, collection: Iterable<Equivalence<A>>) => Equivalence<readonly [A, ...Array<A>]>;
/**
* Similar to `Promise.all` but operates on `Equivalence`s.
*
* ```ts skip-type-checking
* [Equivalence<A>, Equivalence<B>, ...] -> Equivalence<[A, B, ...]>
* ```
*
* Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple
* by applying each `Equivalence` to the corresponding element of the tuple.
*
* @category combinators
* @since 2.0.0
*/
export declare const tuple: <T extends ReadonlyArray<Equivalence<any>>>(...elements: T) => Equivalence<Readonly<{ [I in keyof T]: [T[I]] extends [Equivalence<infer A>] ? A : never; }>>;
/**
* Creates a new `Equivalence` for an array of values based on a given `Equivalence` for the elements of the array.
*
* @category combinators
* @since 2.0.0
*/
export declare const array: <A>(item: Equivalence<A>) => Equivalence<ReadonlyArray<A>>;
/**
* Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct
* by applying each `Equivalence` to the corresponding property of the struct.
*
* @category combinators
* @since 2.0.0
*/
export declare const struct: <R extends Record<string, Equivalence<any>>>(fields: R) => Equivalence<{ readonly [K in keyof R]: [R[K]] extends [Equivalence<infer A>] ? A : never; }>;
//# sourceMappingURL=Equivalence.d.ts.map

1
_node_modules/effect/dist/dts/Equivalence.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Equivalence.d.ts","sourceRoot":"","sources":["../../src/Equivalence.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;CAC3C;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,OA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C,CAAC,CAAC,CAgBzF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAC3B,MAAM,WAAW,CAAC,CAAC,CAAC,EACpB,YAAY,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KACnC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAGvC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAC7D,GAAG,UAAU,CAAC,KACb,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAAE,CAAC,CAAyB,CAAA;AAEvH;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAcxE,CAAA;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,EAC/D,QAAQ,CAAC,KACR,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAAE,CAU5F,CAAA"}

210
_node_modules/effect/dist/dts/ExecutionPlan.d.ts generated vendored Normal file
View File

@@ -0,0 +1,210 @@
/**
* @since 3.16.0
* @experimental
*/
import type { NonEmptyReadonlyArray } from "./Array.js";
import type * as Context from "./Context.js";
import * as Effect from "./Effect.js";
import * as Layer from "./Layer.js";
import type { Pipeable } from "./Pipeable.js";
import type * as Schedule from "./Schedule.js";
/**
* @since 3.16.0
* @category Symbols
* @experimental
*/
export declare const TypeId: unique symbol;
/**
* @since 3.16.0
* @category Symbols
* @experimental
*/
export type TypeId = typeof TypeId;
/**
* @since 3.16.0
* @category Guards
* @experimental
*/
export declare const isExecutionPlan: (u: unknown) => u is ExecutionPlan<any>;
/**
* A `ExecutionPlan` can be used with `Effect.withExecutionPlan` or `Stream.withExecutionPlan`, allowing you to provide different resources for each step of execution until the effect succeeds or the plan is exhausted.
*
* ```ts
* import type { LanguageModel } from "@effect/ai"
* import type { Layer } from "effect"
* import { Effect, ExecutionPlan, Schedule } from "effect"
*
* declare const layerBad: Layer.Layer<LanguageModel.LanguageModel>
* declare const layerGood: Layer.Layer<LanguageModel.LanguageModel>
*
* const ThePlan = ExecutionPlan.make(
* {
* // First try with the bad layer 2 times with a 3 second delay between attempts
* provide: layerBad,
* attempts: 2,
* schedule: Schedule.spaced(3000)
* },
* // Then try with the bad layer 3 times with a 1 second delay between attempts
* {
* provide: layerBad,
* attempts: 3,
* schedule: Schedule.spaced(1000)
* },
* // Finally try with the good layer.
* //
* // If `attempts` is omitted, the plan will only attempt once, unless a schedule is provided.
* {
* provide: layerGood
* }
* )
*
* declare const effect: Effect.Effect<
* void,
* never,
* LanguageModel.LanguageModel
* >
* const withPlan: Effect.Effect<void> = Effect.withExecutionPlan(effect, ThePlan)
* ```
*
* @since 3.16.0
* @category Models
* @experimental
*/
export interface ExecutionPlan<Types extends {
provides: any;
input: any;
error: any;
requirements: any;
}> extends Pipeable {
readonly [TypeId]: TypeId;
readonly steps: NonEmptyReadonlyArray<{
readonly provide: Context.Context<Types["provides"]> | Layer.Layer<Types["provides"], Types["error"], Types["requirements"]>;
readonly attempts?: number | undefined;
readonly while?: ((input: Types["input"]) => Effect.Effect<boolean, Types["error"], Types["requirements"]>) | undefined;
readonly schedule?: Schedule.Schedule<any, Types["input"], Types["requirements"]> | undefined;
}>;
/**
* Returns an equivalent `ExecutionPlan` with the requirements satisfied,
* using the current context.
*/
readonly withRequirements: Effect.Effect<ExecutionPlan<{
provides: Types["provides"];
input: Types["input"];
error: Types["error"];
requirements: never;
}>, never, Types["requirements"]>;
}
/**
* @since 3.16.0
* @experimental
*/
export type TypesBase = {
provides: any;
input: any;
error: any;
requirements: any;
};
/**
* Create an `ExecutionPlan`, which can be used with `Effect.withExecutionPlan` or `Stream.withExecutionPlan`, allowing you to provide different resources for each step of execution until the effect succeeds or the plan is exhausted.
*
* ```ts
* import type { LanguageModel } from "@effect/ai"
* import type { Layer } from "effect"
* import { Effect, ExecutionPlan, Schedule } from "effect"
*
* declare const layerBad: Layer.Layer<LanguageModel.LanguageModel>
* declare const layerGood: Layer.Layer<LanguageModel.LanguageModel>
*
* const ThePlan = ExecutionPlan.make(
* {
* // First try with the bad layer 2 times with a 3 second delay between attempts
* provide: layerBad,
* attempts: 2,
* schedule: Schedule.spaced(3000)
* },
* // Then try with the bad layer 3 times with a 1 second delay between attempts
* {
* provide: layerBad,
* attempts: 3,
* schedule: Schedule.spaced(1000)
* },
* // Finally try with the good layer.
* //
* // If `attempts` is omitted, the plan will only attempt once, unless a schedule is provided.
* {
* provide: layerGood
* }
* )
*
* declare const effect: Effect.Effect<
* void,
* never,
* LanguageModel.LanguageModel
* >
* const withPlan: Effect.Effect<void> = Effect.withExecutionPlan(effect, ThePlan)
* ```
*
* @since 3.16.0
* @category Constructors
* @experimental
*/
export declare const make: <const Steps extends NonEmptyReadonlyArray<make.Step>>(...steps: Steps & { [K in keyof Steps]: make.Step; }) => ExecutionPlan<{
provides: make.StepProvides<Steps>;
input: make.StepInput<Steps>;
error: (Steps[number]["provide"] extends Context.Context<infer _P> | Layer.Layer<infer _P, infer E, infer _R> ? E : never) | (Steps[number]["while"] extends (input: infer _I) => Effect.Effect<infer _A, infer _E, infer _R_1> ? _E : never);
requirements: (Steps[number]["provide"] extends Layer.Layer<infer _A_1, infer _E_1, infer R> ? R : never) | (Steps[number]["while"] extends (input: infer _I) => Effect.Effect<infer _A_1, infer _E_2, infer R_1> ? R_1 : never) | (Steps[number]["schedule"] extends Schedule.Schedule<infer _O, infer _I, infer R_2> ? R_2 : never);
}>;
/**
* @since 3.16.0
* @experimental
*/
export declare namespace make {
/**
* @since 3.16.0
* @experimental
*/
type Step = {
readonly provide: Context.Context<any> | Context.Context<never> | Layer.Layer.Any;
readonly attempts?: number | undefined;
readonly while?: ((input: any) => boolean | Effect.Effect<boolean, any, any>) | undefined;
readonly schedule?: Schedule.Schedule<any, any, any> | undefined;
};
/**
* @since 3.16.1
* @experimental
*/
type StepProvides<Steps extends ReadonlyArray<any>, Out = unknown> = Steps extends readonly [infer Step, ...infer Rest] ? StepProvides<Rest, Out & ((Step extends {
readonly provide: Context.Context<infer P> | Layer.Layer<infer P, infer _E, infer _R>;
} ? P : unknown))> : Out;
/**
* @since 3.16.1
* @experimental
*/
type PlanProvides<Plans extends ReadonlyArray<any>, Out = unknown> = Plans extends readonly [infer Plan, ...infer Rest] ? PlanProvides<Rest, Out & (Plan extends ExecutionPlan<infer T> ? T["provides"] : unknown)> : Out;
/**
* @since 3.16.0
* @experimental
*/
type StepInput<Steps extends ReadonlyArray<any>, Out = unknown> = Steps extends readonly [infer Step, ...infer Rest] ? StepInput<Rest, Out & ((Step extends {
readonly while: (input: infer I) => infer _;
} ? I : unknown) & (Step extends {
readonly schedule: Schedule.Schedule<infer _O, infer I, infer _R>;
} ? I : unknown))> : Out;
/**
* @since 3.16.0
* @experimental
*/
type PlanInput<Plans extends ReadonlyArray<any>, Out = unknown> = Plans extends readonly [infer Plan, ...infer Rest] ? PlanInput<Rest, Out & (Plan extends ExecutionPlan<infer T> ? T["input"] : unknown)> : Out;
}
/**
* @since 3.16.0
* @category Combining
* @experimental
*/
export declare const merge: <const Plans extends NonEmptyReadonlyArray<ExecutionPlan<any>>>(...plans: Plans) => ExecutionPlan<{
provides: make.PlanProvides<Plans>;
input: make.PlanInput<Plans>;
error: Plans[number] extends ExecutionPlan<infer T> ? T["error"] : never;
requirements: Plans[number] extends ExecutionPlan<infer T> ? T["requirements"] : never;
}>;
//# sourceMappingURL=ExecutionPlan.d.ts.map

1
_node_modules/effect/dist/dts/ExecutionPlan.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

122
_node_modules/effect/dist/dts/ExecutionStrategy.d.ts generated vendored Normal file
View File

@@ -0,0 +1,122 @@
/**
* @since 2.0.0
*/
import type { LazyArg } from "./Function.js";
/**
* Describes a strategy for evaluating multiple effects, potentially in
* parallel.
*
* There are 3 possible execution strategies: `Sequential`, `Parallel`,
* `ParallelN`.
*
* @since 2.0.0
* @category models
*/
export type ExecutionStrategy = Sequential | Parallel | ParallelN;
/**
* Execute effects sequentially.
*
* @since 2.0.0
* @category models
*/
export interface Sequential {
readonly _tag: "Sequential";
}
/**
* Execute effects in parallel.
*
* @since 2.0.0
* @category models
*/
export interface Parallel {
readonly _tag: "Parallel";
}
/**
* Execute effects in parallel, up to the specified number of concurrent fibers.
*
* @since 2.0.0
* @category models
*/
export interface ParallelN {
readonly _tag: "ParallelN";
readonly parallelism: number;
}
/**
* Execute effects sequentially.
*
* @since 2.0.0
* @category constructors
*/
export declare const sequential: ExecutionStrategy;
/**
* Execute effects in parallel.
*
* @since 2.0.0
* @category constructors
*/
export declare const parallel: ExecutionStrategy;
/**
* Execute effects in parallel, up to the specified number of concurrent fibers.
*
* @since 2.0.0
* @category constructors
*/
export declare const parallelN: (parallelism: number) => ExecutionStrategy;
/**
* Returns `true` if the specified `ExecutionStrategy` is an instance of
* `Sequential`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isSequential: (self: ExecutionStrategy) => self is Sequential;
/**
* Returns `true` if the specified `ExecutionStrategy` is an instance of
* `Sequential`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isParallel: (self: ExecutionStrategy) => self is Parallel;
/**
* Returns `true` if the specified `ExecutionStrategy` is an instance of
* `Sequential`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isParallelN: (self: ExecutionStrategy) => self is ParallelN;
/**
* Folds over the specified `ExecutionStrategy` using the provided case
* functions.
*
* @since 2.0.0
* @category folding
*/
export declare const match: {
/**
* Folds over the specified `ExecutionStrategy` using the provided case
* functions.
*
* @since 2.0.0
* @category folding
*/
<A>(options: {
readonly onSequential: LazyArg<A>;
readonly onParallel: LazyArg<A>;
readonly onParallelN: (n: number) => A;
}): (self: ExecutionStrategy) => A;
/**
* Folds over the specified `ExecutionStrategy` using the provided case
* functions.
*
* @since 2.0.0
* @category folding
*/
<A>(self: ExecutionStrategy, options: {
readonly onSequential: LazyArg<A>;
readonly onParallel: LazyArg<A>;
readonly onParallelN: (n: number) => A;
}): A;
};
//# sourceMappingURL=ExecutionStrategy.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExecutionStrategy.d.ts","sourceRoot":"","sources":["../../src/ExecutionStrategy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,iBAAuC,CAAA;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,iBAAqC,CAAA;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,iBAAsC,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,IAAI,UAAkC,CAAA;AAElG;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,IAAI,QAA8B,CAAA;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,IAAI,SAAgC,CAAA;AAE/F;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;;OAMG;IACH,CAAC,CAAC,EACD,OAAO,EAAE;QACP,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC/B,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAA;KACvC,GACC,CAAC,IAAI,EAAE,iBAAiB,KAAK,CAAC,CAAA;IACjC;;;;;;OAMG;IACH,CAAC,CAAC,EACD,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE;QACP,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC/B,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAA;KACvC,GACC,CAAC,CAAA;CACY,CAAA"}

663
_node_modules/effect/dist/dts/Exit.d.ts generated vendored Normal file
View File

@@ -0,0 +1,663 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
import type * as Effect from "./Effect.js";
import type * as Either from "./Either.js";
import type * as FiberId from "./FiberId.js";
import type { Inspectable } from "./Inspectable.js";
import type * as Option from "./Option.js";
import type { Pipeable } from "./Pipeable.js";
import type { Predicate, Refinement } from "./Predicate.js";
import type { NoInfer } from "./Types.js";
import type * as Unify from "./Unify.js";
/**
* An `Exit<A, E = never>` describes the result of a executing an `Effect` workflow.
*
* There are two possible values for an `Exit<A, E>`:
* - `Exit.Success` contain a success value of type `A`
* - `Exit.Failure` contains a failure `Cause` of type `E`
*
* @since 2.0.0
* @category models
*/
export type Exit<A, E = never> = Success<A, E> | Failure<A, E>;
/**
* Represents a failed `Effect` workflow containing the `Cause` of the failure
* of type `E`.
*
* @since 2.0.0
* @category models
*/
export interface Failure<out A, out E> extends Effect.Effect<A, E>, Pipeable, Inspectable {
readonly _tag: "Failure";
readonly _op: "Failure";
readonly cause: Cause.Cause<E>;
[Unify.typeSymbol]?: unknown;
[Unify.unifySymbol]?: ExitUnify<this>;
[Unify.ignoreSymbol]?: ExitUnifyIgnore;
}
/**
* @category models
* @since 2.0.0
*/
export interface ExitUnify<A extends {
[Unify.typeSymbol]?: any;
}> extends Effect.EffectUnify<A> {
Exit?: () => A[Unify.typeSymbol] extends Exit<infer A0, infer E0> | infer _ ? Exit<A0, E0> : never;
}
/**
* @category models
* @since 2.0.0
*/
export interface ExitUnifyIgnore extends Effect.EffectUnifyIgnore {
Effect?: true;
}
/**
* Represents a successful `Effect` workflow and containing the returned value
* of type `A`.
*
* @since 2.0.0
* @category models
*/
export interface Success<out A, out E> extends Effect.Effect<A, E>, Pipeable, Inspectable {
readonly _tag: "Success";
readonly _op: "Success";
readonly value: A;
[Unify.typeSymbol]?: unknown;
[Unify.unifySymbol]?: ExitUnify<this>;
[Unify.ignoreSymbol]?: ExitUnifyIgnore;
}
/**
* Returns `true` if the specified value is an `Exit`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isExit: (u: unknown) => u is Exit<unknown, unknown>;
/**
* Returns `true` if the specified `Exit` is a `Failure`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isFailure: <A, E>(self: Exit<A, E>) => self is Failure<A, E>;
/**
* Returns `true` if the specified `Exit` is a `Success`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isSuccess: <A, E>(self: Exit<A, E>) => self is Success<A, E>;
/**
* Returns `true` if the specified exit is a `Failure` **and** the `Cause` of
* the failure was due to interruption, `false` otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const isInterrupted: <A, E>(self: Exit<A, E>) => boolean;
/**
* Maps the `Success` value of the specified exit to the provided constant
* value.
*
* @since 2.0.0
* @category mapping
*/
export declare const as: {
/**
* Maps the `Success` value of the specified exit to the provided constant
* value.
*
* @since 2.0.0
* @category mapping
*/
<A2>(value: A2): <A, E>(self: Exit<A, E>) => Exit<A2, E>;
/**
* Maps the `Success` value of the specified exit to the provided constant
* value.
*
* @since 2.0.0
* @category mapping
*/
<A, E, A2>(self: Exit<A, E>, value: A2): Exit<A2, E>;
};
/**
* Maps the `Success` value of the specified exit to a void.
*
* @since 2.0.0
* @category mapping
*/
export declare const asVoid: <A, E>(self: Exit<A, E>) => Exit<void, E>;
/**
* Returns a `Some<Cause<E>>` if the specified exit is a `Failure`, `None`
* otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const causeOption: <A, E>(self: Exit<A, E>) => Option.Option<Cause.Cause<E>>;
/**
* Collects all of the specified exit values into a `Some<Exit<List<A>, E>>`. If
* the provided iterable contains no elements, `None` will be returned.
*
* @since 2.0.0
* @category constructors
*/
export declare const all: <A, E>(exits: Iterable<Exit<A, E>>, options?: {
readonly parallel?: boolean | undefined;
} | undefined) => Option.Option<Exit<Array<A>, E>>;
/**
* Constructs a new `Exit.Failure` from the specified unrecoverable defect.
*
* @since 2.0.0
* @category constructors
*/
export declare const die: (defect: unknown) => Exit<never>;
/**
* Executes the predicate on the value of the specified exit if it is a
* `Success`, otherwise returns `false`.
*
* @since 2.0.0
* @category elements
*/
export declare const exists: {
/**
* Executes the predicate on the value of the specified exit if it is a
* `Success`, otherwise returns `false`.
*
* @since 2.0.0
* @category elements
*/
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E>(self: Exit<A, E>) => self is Exit<B>;
/**
* Executes the predicate on the value of the specified exit if it is a
* `Success`, otherwise returns `false`.
*
* @since 2.0.0
* @category elements
*/
<A>(predicate: Predicate<NoInfer<A>>): <E>(self: Exit<A, E>) => boolean;
/**
* Executes the predicate on the value of the specified exit if it is a
* `Success`, otherwise returns `false`.
*
* @since 2.0.0
* @category elements
*/
<A, E, B extends A>(self: Exit<A, E>, refinement: Refinement<A, B>): self is Exit<B>;
/**
* Executes the predicate on the value of the specified exit if it is a
* `Success`, otherwise returns `false`.
*
* @since 2.0.0
* @category elements
*/
<A, E>(self: Exit<A, E>, predicate: Predicate<A>): boolean;
};
/**
* Constructs a new `Exit.Failure` from the specified recoverable error of type
* `E`.
*
* @since 2.0.0
* @category constructors
*/
export declare const fail: <E>(error: E) => Exit<never, E>;
/**
* Constructs a new `Exit.Failure` from the specified `Cause` of type `E`.
*
* @since 2.0.0
* @category constructors
*/
export declare const failCause: <E>(cause: Cause.Cause<E>) => Exit<never, E>;
/**
* @since 2.0.0
* @category sequencing
*/
export declare const flatMap: {
/**
* @since 2.0.0
* @category sequencing
*/
<A, A2, E2>(f: (a: A) => Exit<A2, E2>): <E>(self: Exit<A, E>) => Exit<A2, E2 | E>;
/**
* @since 2.0.0
* @category sequencing
*/
<A, E, E2, A2>(self: Exit<A, E>, f: (a: A) => Exit<A2, E2>): Exit<A2, E | E2>;
};
/**
* @since 2.0.0
* @category sequencing
*/
export declare const flatMapEffect: {
/**
* @since 2.0.0
* @category sequencing
*/
<A, E, A2, E2, R>(f: (a: A) => Effect.Effect<Exit<A2, E>, E2, R>): (self: Exit<A, E>) => Effect.Effect<Exit<A2, E>, E2, R>;
/**
* @since 2.0.0
* @category sequencing
*/
<A, E, A2, E2, R>(self: Exit<A, E>, f: (a: A) => Effect.Effect<Exit<A2, E>, E2, R>): Effect.Effect<Exit<A2, E>, E2, R>;
};
/**
* @since 2.0.0
* @category sequencing
*/
export declare const flatten: <A, E, E2>(self: Exit<Exit<A, E>, E2>) => Exit<A, E | E2>;
/**
* @since 2.0.0
* @category traversing
*/
export declare const forEachEffect: {
/**
* @since 2.0.0
* @category traversing
*/
<A, B, E2, R>(f: (a: A) => Effect.Effect<B, E2, R>): <E>(self: Exit<A, E>) => Effect.Effect<Exit<B, E2 | E>, never, R>;
/**
* @since 2.0.0
* @category traversing
*/
<A, E, B, E2, R>(self: Exit<A, E>, f: (a: A) => Effect.Effect<B, E2, R>): Effect.Effect<Exit<B, E | E2>, never, R>;
};
/**
* Converts an `Either<R, L>` into an `Exit<R, L>`.
*
* @since 2.0.0
* @category conversions
*/
export declare const fromEither: <R, L>(either: Either.Either<R, L>) => Exit<R, L>;
/**
* Converts an `Option<A>` into an `Exit<void, A>`.
*
* @since 2.0.0
* @category conversions
*/
export declare const fromOption: <A>(option: Option.Option<A>) => Exit<A, void>;
/**
* Returns the `A` if specified exit is a `Success`, otherwise returns the
* alternate `A` value computed from the specified function which receives the
* `Cause<E>` of the exit `Failure`.
*
* @since 2.0.0
* @category getters
*/
export declare const getOrElse: {
/**
* Returns the `A` if specified exit is a `Success`, otherwise returns the
* alternate `A` value computed from the specified function which receives the
* `Cause<E>` of the exit `Failure`.
*
* @since 2.0.0
* @category getters
*/
<E, A2>(orElse: (cause: Cause.Cause<E>) => A2): <A>(self: Exit<A, E>) => A2 | A;
/**
* Returns the `A` if specified exit is a `Success`, otherwise returns the
* alternate `A` value computed from the specified function which receives the
* `Cause<E>` of the exit `Failure`.
*
* @since 2.0.0
* @category getters
*/
<A, E, A2>(self: Exit<A, E>, orElse: (cause: Cause.Cause<E>) => A2): A | A2;
};
/**
* Constructs a new `Exit.Failure` from the specified `FiberId` indicating that
* the `Fiber` running an `Effect` workflow was terminated due to interruption.
*
* @since 2.0.0
* @category constructors
*/
export declare const interrupt: (fiberId: FiberId.FiberId) => Exit<never>;
/**
* Maps over the `Success` value of the specified exit using the provided
* function.
*
* @since 2.0.0
* @category mapping
*/
export declare const map: {
/**
* Maps over the `Success` value of the specified exit using the provided
* function.
*
* @since 2.0.0
* @category mapping
*/
<A, B>(f: (a: A) => B): <E>(self: Exit<A, E>) => Exit<B, E>;
/**
* Maps over the `Success` value of the specified exit using the provided
* function.
*
* @since 2.0.0
* @category mapping
*/
<A, E, B>(self: Exit<A, E>, f: (a: A) => B): Exit<B, E>;
};
/**
* Maps over the `Success` and `Failure` cases of the specified exit using the
* provided functions.
*
* @since 2.0.0
* @category mapping
*/
export declare const mapBoth: {
/**
* Maps over the `Success` and `Failure` cases of the specified exit using the
* provided functions.
*
* @since 2.0.0
* @category mapping
*/
<E, A, E2, A2>(options: {
readonly onFailure: (e: E) => E2;
readonly onSuccess: (a: A) => A2;
}): (self: Exit<A, E>) => Exit<A2, E2>;
/**
* Maps over the `Success` and `Failure` cases of the specified exit using the
* provided functions.
*
* @since 2.0.0
* @category mapping
*/
<A, E, E2, A2>(self: Exit<A, E>, options: {
readonly onFailure: (e: E) => E2;
readonly onSuccess: (a: A) => A2;
}): Exit<A2, E2>;
};
/**
* Maps over the error contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
export declare const mapError: {
/**
* Maps over the error contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
<E, E2>(f: (e: E) => E2): <A>(self: Exit<A, E>) => Exit<A, E2>;
/**
* Maps over the error contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
<A, E, E2>(self: Exit<A, E>, f: (e: E) => E2): Exit<A, E2>;
};
/**
* Maps over the `Cause` contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
export declare const mapErrorCause: {
/**
* Maps over the `Cause` contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <A>(self: Exit<A, E>) => Exit<A, E2>;
/**
* Maps over the `Cause` contained in the `Failure` of the specified exit using
* the provided function.
*
* @since 2.0.0
* @category mapping
*/
<E, A, E2>(self: Exit<A, E>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Exit<A, E2>;
};
/**
* @since 2.0.0
* @category folding
*/
export declare const match: {
/**
* @since 2.0.0
* @category folding
*/
<E, A, Z1, Z2>(options: {
readonly onFailure: (cause: Cause.Cause<E>) => Z1;
readonly onSuccess: (a: A) => Z2;
}): (self: Exit<A, E>) => Z1 | Z2;
/**
* @since 2.0.0
* @category folding
*/
<A, E, Z1, Z2>(self: Exit<A, E>, options: {
readonly onFailure: (cause: Cause.Cause<E>) => Z1;
readonly onSuccess: (a: A) => Z2;
}): Z1 | Z2;
};
/**
* @since 2.0.0
* @category folding
*/
export declare const matchEffect: {
/**
* @since 2.0.0
* @category folding
*/
<E, A2, E2, R, A, A3, E3, R2>(options: {
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<A2, E2, R>;
readonly onSuccess: (a: A) => Effect.Effect<A3, E3, R2>;
}): (self: Exit<A, E>) => Effect.Effect<A2 | A3, E2 | E3, R | R2>;
/**
* @since 2.0.0
* @category folding
*/
<A, E, A2, E2, R, A3, E3, R2>(self: Exit<A, E>, options: {
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<A2, E2, R>;
readonly onSuccess: (a: A) => Effect.Effect<A3, E3, R2>;
}): Effect.Effect<A2 | A3, E2 | E3, R | R2>;
};
/**
* Constructs a new `Exit.Success` containing the specified value of type `A`.
*
* @since 2.0.0
* @category constructors
*/
export declare const succeed: <A>(value: A) => Exit<A>;
declare const void_: Exit<void>;
export {
/**
* Represents an `Exit` which succeeds with `undefined`.
*
* @since 2.0.0
* @category constructors
*/
void_ as void };
/**
* Sequentially zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zip: {
/**
* Sequentially zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<[A, A2], E2 | E>;
/**
* Sequentially zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<[A, A2], E | E2>;
};
/**
* Sequentially zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipLeft: {
/**
* Sequentially zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<A, E2 | E>;
/**
* Sequentially zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<A, E | E2>;
};
/**
* Sequentially zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipRight: {
/**
* Sequentially zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<A2, E2 | E>;
/**
* Sequentially zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<A2, E | E2>;
};
/**
* Parallelly zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipPar: {
/**
* Parallelly zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<[A, A2], E2 | E>;
/**
* Parallelly zips the this result with the specified result or else returns
* the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<[A, A2], E | E2>;
};
/**
* Parallelly zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipParLeft: {
/**
* Parallelly zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<A, E2 | E>;
/**
* Parallelly zips the this result with the specified result discarding the
* second element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<A, E | E2>;
};
/**
* Parallelly zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipParRight: {
/**
* Parallelly zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Exit<A2, E2>): <A, E>(self: Exit<A, E>) => Exit<A2, E2 | E>;
/**
* Parallelly zips the this result with the specified result discarding the
* first element of the tuple or else returns the failed `Cause<E | E2>`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Exit<A, E>, that: Exit<A2, E2>): Exit<A2, E | E2>;
};
/**
* Zips this exit together with that exit using the specified combination
* functions.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipWith: {
/**
* Zips this exit together with that exit using the specified combination
* functions.
*
* @since 2.0.0
* @category zipping
*/
<B, E2, A, C, E>(that: Exit<B, E2>, options: {
readonly onSuccess: (a: A, b: B) => C;
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<any>;
}): (self: Exit<A, E>) => Exit<C, any>;
/**
* Zips this exit together with that exit using the specified combination
* functions.
*
* @since 2.0.0
* @category zipping
*/
<A, E, B, E2, C>(self: Exit<A, E>, that: Exit<B, E2>, options: {
readonly onSuccess: (a: A, b: B) => C;
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>;
}): Exit<C, E | E2>;
};
//# sourceMappingURL=Exit.d.ts.map

1
_node_modules/effect/dist/dts/Exit.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

9
_node_modules/effect/dist/dts/FastCheck.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
/**
* @since 3.10.0
*/
/**
* @category re-exports
* @since 3.10.0
*/
export * from "fast-check";
//# sourceMappingURL=FastCheck.d.ts.map

1
_node_modules/effect/dist/dts/FastCheck.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FastCheck.d.ts","sourceRoot":"","sources":["../../src/FastCheck.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,cAAc,YAAY,CAAA"}

831
_node_modules/effect/dist/dts/Fiber.d.ts generated vendored Normal file
View File

@@ -0,0 +1,831 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
import type { Context } from "./Context.js";
import type { DefaultServices } from "./DefaultServices.js";
import type * as Effect from "./Effect.js";
import type * as Either from "./Either.js";
import type * as Exit from "./Exit.js";
import type * as FiberId from "./FiberId.js";
import type { FiberRef } from "./FiberRef.js";
import type * as FiberRefs from "./FiberRefs.js";
import type * as FiberStatus from "./FiberStatus.js";
import type * as HashSet from "./HashSet.js";
import type * as Option from "./Option.js";
import type * as order from "./Order.js";
import type * as RuntimeFlags from "./RuntimeFlags.js";
import type { Scheduler } from "./Scheduler.js";
import type * as Scope from "./Scope.js";
import type { Supervisor } from "./Supervisor.js";
import type { AnySpan, Tracer } from "./Tracer.js";
import type * as Types from "./Types.js";
import type * as Unify from "./Unify.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const FiberTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FiberTypeId = typeof FiberTypeId;
/**
* @since 2.0.0
* @category symbols
*/
export declare const RuntimeFiberTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type RuntimeFiberTypeId = typeof RuntimeFiberTypeId;
/**
* A fiber is a lightweight thread of execution that never consumes more than a
* whole thread (but may consume much less, depending on contention and
* asynchronicity). Fibers are spawned by forking effects, which run
* concurrently with the parent effect.
*
* Fibers can be joined, yielding their result to other fibers, or interrupted,
* which terminates the fiber, safely releasing all resources.
*
* @since 2.0.0
* @category models
*/
export interface Fiber<out A, out E = never> extends Effect.Effect<A, E>, Fiber.Variance<A, E> {
/**
* The identity of the fiber.
*/
id(): FiberId.FiberId;
/**
* Awaits the fiber, which suspends the awaiting fiber until the result of the
* fiber has been determined.
*/
readonly await: Effect.Effect<Exit.Exit<A, E>>;
/**
* Retrieves the immediate children of the fiber.
*/
readonly children: Effect.Effect<Array<Fiber.Runtime<any, any>>>;
/**
* Inherits values from all `FiberRef` instances into current fiber. This
* will resume immediately.
*/
readonly inheritAll: Effect.Effect<void>;
/**
* Tentatively observes the fiber, but returns immediately if it is not
* already done.
*/
readonly poll: Effect.Effect<Option.Option<Exit.Exit<A, E>>>;
/**
* In the background, interrupts the fiber as if interrupted from the
* specified fiber. If the fiber has already exited, the returned effect will
* resume immediately. Otherwise, the effect will resume when the fiber exits.
*/
interruptAsFork(fiberId: FiberId.FiberId): Effect.Effect<void>;
readonly [Unify.typeSymbol]?: unknown;
readonly [Unify.unifySymbol]?: FiberUnify<this>;
readonly [Unify.ignoreSymbol]?: FiberUnifyIgnore;
}
/**
* @category models
* @since 3.8.0
*/
export interface FiberUnify<A extends {
[Unify.typeSymbol]?: any;
}> extends Effect.EffectUnify<A> {
Fiber?: () => A[Unify.typeSymbol] extends Fiber<infer A0, infer E0> | infer _ ? Fiber<A0, E0> : never;
}
/**
* @category models
* @since 3.8.0
*/
export interface FiberUnifyIgnore extends Effect.EffectUnifyIgnore {
Effect?: true;
}
/**
* A runtime fiber that is executing an effect. Runtime fibers have an
* identity and a trace.
*
* @since 2.0.0
* @category models
*/
export interface RuntimeFiber<out A, out E = never> extends Fiber<A, E>, Fiber.RuntimeVariance<A, E> {
/**
* Reads the current number of ops that have occurred since the last yield
*/
get currentOpCount(): number;
/**
* Reads the current value of a fiber ref
*/
getFiberRef<X>(fiberRef: FiberRef<X>): X;
/**
* The identity of the fiber.
*/
id(): FiberId.Runtime;
/**
* The status of the fiber.
*/
readonly status: Effect.Effect<FiberStatus.FiberStatus>;
/**
* Returns the current `RuntimeFlags` the fiber is running with.
*/
readonly runtimeFlags: Effect.Effect<RuntimeFlags.RuntimeFlags>;
/**
* Adds an observer to the list of observers.
*/
addObserver(observer: (exit: Exit.Exit<A, E>) => void): void;
/**
* Removes the specified observer from the list of observers that will be
* notified when the fiber exits.
*/
removeObserver(observer: (exit: Exit.Exit<A, E>) => void): void;
/**
* Retrieves all fiber refs of the fiber.
*/
getFiberRefs(): FiberRefs.FiberRefs;
/**
* Unsafely observes the fiber, but returns immediately if it is not
* already done.
*/
unsafePoll(): Exit.Exit<A, E> | null;
/**
* In the background, interrupts the fiber as if interrupted from the
* specified fiber. If the fiber has already exited, the returned effect will
* resume immediately. Otherwise, the effect will resume when the fiber exits.
*/
unsafeInterruptAsFork(fiberId: FiberId.FiberId): void;
/**
* Gets the current context
*/
get currentContext(): Context<never>;
/**
* Gets the current context
*/
get currentDefaultServices(): Context<DefaultServices>;
/**
* Gets the current scheduler
*/
get currentScheduler(): Scheduler;
/**
* Gets the current tracer
*/
get currentTracer(): Tracer;
/**
* Gets the current span
*/
get currentSpan(): AnySpan | undefined;
/**
* Gets the current supervisor
*/
get currentSupervisor(): Supervisor<unknown>;
readonly [Unify.typeSymbol]?: unknown;
readonly [Unify.unifySymbol]?: RuntimeFiberUnify<this>;
readonly [Unify.ignoreSymbol]?: RuntimeFiberUnifyIgnore;
}
/**
* @category models
* @since 3.8.0
*/
export interface RuntimeFiberUnify<A extends {
[Unify.typeSymbol]?: any;
}> extends FiberUnify<A> {
RuntimeFiber?: () => A[Unify.typeSymbol] extends RuntimeFiber<infer A0, infer E0> | infer _ ? RuntimeFiber<A0, E0> : never;
}
/**
* @category models
* @since 3.8.0
*/
export interface RuntimeFiberUnifyIgnore extends FiberUnifyIgnore {
Fiber?: true;
}
/**
* @since 2.0.0
*/
export declare namespace Fiber {
/**
* @since 2.0.0
* @category models
*/
type Runtime<A, E = never> = RuntimeFiber<A, E>;
/**
* @since 2.0.0
* @category models
*/
interface Variance<out A, out E> {
readonly [FiberTypeId]: {
readonly _A: Types.Covariant<A>;
readonly _E: Types.Covariant<E>;
};
}
/**
* @since 2.0.0
*/
interface RuntimeVariance<out A, out E> {
readonly [RuntimeFiberTypeId]: {
readonly _A: Types.Covariant<A>;
readonly _E: Types.Covariant<E>;
};
}
/**
* @since 2.0.0
* @category models
*/
interface Dump {
/**
* The fiber's unique identifier.
*/
readonly id: FiberId.Runtime;
/**
* The status of the fiber.
*/
readonly status: FiberStatus.FiberStatus;
}
/**
* A record containing information about a `Fiber`.
*
* @since 2.0.0
* @category models
*/
interface Descriptor {
/**
* The fiber's unique identifier.
*/
readonly id: FiberId.FiberId;
/**
* The status of the fiber.
*/
readonly status: FiberStatus.FiberStatus;
/**
* The set of fibers attempting to interrupt the fiber or its ancestors.
*/
readonly interruptors: HashSet.HashSet<FiberId.FiberId>;
}
}
/**
* @since 2.0.0
* @category instances
*/
export declare const Order: order.Order<RuntimeFiber<unknown, unknown>>;
/**
* Returns `true` if the specified value is a `Fiber`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isFiber: (u: unknown) => u is Fiber<unknown, unknown>;
/**
* Returns `true` if the specified `Fiber` is a `RuntimeFiber`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isRuntimeFiber: <A, E>(self: Fiber<A, E>) => self is RuntimeFiber<A, E>;
/**
* The identity of the fiber.
*
* @since 2.0.0
* @category getters
*/
export declare const id: <A, E>(self: Fiber<A, E>) => FiberId.FiberId;
declare const _await: <A, E>(self: Fiber<A, E>) => Effect.Effect<Exit.Exit<A, E>>;
export {
/**
* Awaits the fiber, which suspends the awaiting fiber until the result of the
* fiber has been determined.
*
* @since 2.0.0
* @category getters
*/
_await as await };
/**
* Awaits on all fibers to be completed, successfully or not.
*
* @since 2.0.0
* @category destructors
*/
export declare const awaitAll: <const T extends Iterable<Fiber<any, any>>>(fibers: T) => Effect.Effect<[
T
] extends [ReadonlyArray<infer U>] ? number extends T["length"] ? Array<U extends Fiber<infer A, infer E> ? Exit.Exit<A, E> : never> : {
-readonly [K in keyof T]: T[K] extends Fiber<infer A, infer E> ? Exit.Exit<A, E> : never;
} : Array<T extends Iterable<infer U> ? U extends Fiber<infer A, infer E> ? Exit.Exit<A, E> : never : never>>;
/**
* Retrieves the immediate children of the fiber.
*
* @since 2.0.0
* @category getters
*/
export declare const children: <A, E>(self: Fiber<A, E>) => Effect.Effect<Array<RuntimeFiber<any, any>>>;
/**
* Collects all fibers into a single fiber producing an in-order list of the
* results.
*
* @since 2.0.0
* @category constructors
*/
export declare const all: <A, E>(fibers: Iterable<Fiber<A, E>>) => Fiber<ReadonlyArray<A>, E>;
/**
* A fiber that is done with the specified `Exit` value.
*
* @since 2.0.0
* @category constructors
*/
export declare const done: <A, E>(exit: Exit.Exit<A, E>) => Fiber<A, E>;
/**
* @since 2.0.0
* @category destructors
*/
export declare const dump: <A, E>(self: RuntimeFiber<A, E>) => Effect.Effect<Fiber.Dump>;
/**
* @since 2.0.0
* @category destructors
*/
export declare const dumpAll: (fibers: Iterable<RuntimeFiber<unknown, unknown>>) => Effect.Effect<Array<Fiber.Dump>>;
/**
* A fiber that has already failed with the specified value.
*
* @since 2.0.0
* @category constructors
*/
export declare const fail: <E>(error: E) => Fiber<never, E>;
/**
* Creates a `Fiber` that has already failed with the specified cause.
*
* @since 2.0.0
* @category constructors
*/
export declare const failCause: <E>(cause: Cause.Cause<E>) => Fiber<never, E>;
/**
* Lifts an `Effect` into a `Fiber`.
*
* @since 2.0.0
* @category conversions
*/
export declare const fromEffect: <A, E>(effect: Effect.Effect<A, E>) => Effect.Effect<Fiber<A, E>>;
/**
* Gets the current fiber if one is running.
*
* @since 2.0.0
* @category utilities
*/
export declare const getCurrentFiber: () => Option.Option<RuntimeFiber<any, any>>;
/**
* Inherits values from all `FiberRef` instances into current fiber. This
* will resume immediately.
*
* @since 2.0.0
* @category destructors
*/
export declare const inheritAll: <A, E>(self: Fiber<A, E>) => Effect.Effect<void>;
/**
* Interrupts the fiber from whichever fiber is calling this method. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
export declare const interrupt: <A, E>(self: Fiber<A, E>) => Effect.Effect<Exit.Exit<A, E>>;
/**
* Constructrs a `Fiber` that is already interrupted.
*
* @since 2.0.0
* @category constructors
*/
export declare const interrupted: (fiberId: FiberId.FiberId) => Fiber<never>;
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
export declare const interruptAs: {
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
(fiberId: FiberId.FiberId): <A, E>(self: Fiber<A, E>) => Effect.Effect<Exit.Exit<A, E>>;
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
<A, E>(self: Fiber<A, E>, fiberId: FiberId.FiberId): Effect.Effect<Exit.Exit<A, E>>;
};
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
export declare const interruptAsFork: {
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
(fiberId: FiberId.FiberId): <A, E>(self: Fiber<A, E>) => Effect.Effect<void>;
/**
* Interrupts the fiber as if interrupted from the specified fiber. If the
* fiber has already exited, the returned effect will resume immediately.
* Otherwise, the effect will resume when the fiber exits.
*
* @since 2.0.0
* @category interruption
*/
<A, E>(self: Fiber<A, E>, fiberId: FiberId.FiberId): Effect.Effect<void>;
};
/**
* Interrupts all fibers, awaiting their interruption.
*
* @since 2.0.0
* @category interruption
*/
export declare const interruptAll: (fibers: Iterable<Fiber<any, any>>) => Effect.Effect<void>;
/**
* Interrupts all fibers as by the specified fiber, awaiting their
* interruption.
*
* @since 2.0.0
* @category interruption
*/
export declare const interruptAllAs: {
/**
* Interrupts all fibers as by the specified fiber, awaiting their
* interruption.
*
* @since 2.0.0
* @category interruption
*/
(fiberId: FiberId.FiberId): (fibers: Iterable<Fiber<any, any>>) => Effect.Effect<void>;
/**
* Interrupts all fibers as by the specified fiber, awaiting their
* interruption.
*
* @since 2.0.0
* @category interruption
*/
(fibers: Iterable<Fiber<any, any>>, fiberId: FiberId.FiberId): Effect.Effect<void>;
};
/**
* Interrupts the fiber from whichever fiber is calling this method. The
* interruption will happen in a separate daemon fiber, and the returned
* effect will always resume immediately without waiting.
*
* @since 2.0.0
* @category interruption
*/
export declare const interruptFork: <A, E>(self: Fiber<A, E>) => Effect.Effect<void>;
/**
* Joins the fiber, which suspends the joining fiber until the result of the
* fiber has been determined. Attempting to join a fiber that has erred will
* result in a catchable error. Joining an interrupted fiber will result in an
* "inner interruption" of this fiber, unlike interruption triggered by
* another fiber, "inner interruption" can be caught and recovered.
*
* @since 2.0.0
* @category destructors
*/
export declare const join: <A, E>(self: Fiber<A, E>) => Effect.Effect<A, E>;
/**
* Joins all fibers, awaiting their _successful_ completion. Attempting to
* join a fiber that has erred will result in a catchable error, _if_ that
* error does not result from interruption.
*
* @since 2.0.0
* @category destructors
*/
export declare const joinAll: <A, E>(fibers: Iterable<Fiber<A, E>>) => Effect.Effect<Array<A>, E>;
/**
* Maps over the value the Fiber computes.
*
* @since 2.0.0
* @category mapping
*/
export declare const map: {
/**
* Maps over the value the Fiber computes.
*
* @since 2.0.0
* @category mapping
*/
<A, B>(f: (a: A) => B): <E>(self: Fiber<A, E>) => Fiber<B, E>;
/**
* Maps over the value the Fiber computes.
*
* @since 2.0.0
* @category mapping
*/
<A, E, B>(self: Fiber<A, E>, f: (a: A) => B): Fiber<B, E>;
};
/**
* Effectually maps over the value the fiber computes.
*
* @since 2.0.0
* @category mapping
*/
export declare const mapEffect: {
/**
* Effectually maps over the value the fiber computes.
*
* @since 2.0.0
* @category mapping
*/
<A, A2, E2>(f: (a: A) => Effect.Effect<A2, E2>): <E>(self: Fiber<A, E>) => Fiber<A2, E2 | E>;
/**
* Effectually maps over the value the fiber computes.
*
* @since 2.0.0
* @category mapping
*/
<A, E, A2, E2>(self: Fiber<A, E>, f: (a: A) => Effect.Effect<A2, E2>): Fiber<A2, E | E2>;
};
/**
* Passes the success of this fiber to the specified callback, and continues
* with the fiber that it returns.
*
* @since 2.0.0
* @category mapping
*/
export declare const mapFiber: {
/**
* Passes the success of this fiber to the specified callback, and continues
* with the fiber that it returns.
*
* @since 2.0.0
* @category mapping
*/
<E, E2, A, B>(f: (a: A) => Fiber<B, E2>): (self: Fiber<A, E>) => Effect.Effect<Fiber<B, E | E2>>;
/**
* Passes the success of this fiber to the specified callback, and continues
* with the fiber that it returns.
*
* @since 2.0.0
* @category mapping
*/
<A, E, E2, B>(self: Fiber<A, E>, f: (a: A) => Fiber<B, E2>): Effect.Effect<Fiber<B, E | E2>>;
};
/**
* Folds over the `Fiber` or `RuntimeFiber`.
*
* @since 2.0.0
* @category folding
*/
export declare const match: {
/**
* Folds over the `Fiber` or `RuntimeFiber`.
*
* @since 2.0.0
* @category folding
*/
<A, E, Z>(options: {
readonly onFiber: (fiber: Fiber<A, E>) => Z;
readonly onRuntimeFiber: (fiber: RuntimeFiber<A, E>) => Z;
}): (self: Fiber<A, E>) => Z;
/**
* Folds over the `Fiber` or `RuntimeFiber`.
*
* @since 2.0.0
* @category folding
*/
<A, E, Z>(self: Fiber<A, E>, options: {
readonly onFiber: (fiber: Fiber<A, E>) => Z;
readonly onRuntimeFiber: (fiber: RuntimeFiber<A, E>) => Z;
}): Z;
};
/**
* A fiber that never fails or succeeds.
*
* @since 2.0.0
* @category constructors
*/
export declare const never: Fiber<never>;
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
export declare const orElse: {
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
<A2, E2>(that: Fiber<A2, E2>): <A, E>(self: Fiber<A, E>) => Fiber<A2 | A, E2 | E>;
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
<A, E, A2, E2>(self: Fiber<A, E>, that: Fiber<A2, E2>): Fiber<A | A2, E | E2>;
};
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
export declare const orElseEither: {
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
<A2, E2>(that: Fiber<A2, E2>): <A, E>(self: Fiber<A, E>) => Fiber<Either.Either<A2, A>, E2 | E>;
/**
* Returns a fiber that prefers `this` fiber, but falls back to the `that` one
* when `this` one fails. Interrupting the returned fiber will interrupt both
* fibers, sequentially, from left to right.
*
* @since 2.0.0
* @category alternatives
*/
<A, E, A2, E2>(self: Fiber<A, E>, that: Fiber<A2, E2>): Fiber<Either.Either<A2, A>, E | E2>;
};
/**
* Tentatively observes the fiber, but returns immediately if it is not
* already done.
*
* @since 2.0.0
* @category getters
*/
export declare const poll: <A, E>(self: Fiber<A, E>) => Effect.Effect<Option.Option<Exit.Exit<A, E>>>;
/**
* Pretty-prints a `RuntimeFiber`.
*
* @since 2.0.0
* @category destructors
*/
export declare const pretty: <A, E>(self: RuntimeFiber<A, E>) => Effect.Effect<string>;
/**
* Returns a chunk containing all root fibers.
*
* @since 2.0.0
* @category constructors
*/
export declare const roots: Effect.Effect<Array<RuntimeFiber<any, any>>>;
/**
* Returns a chunk containing all root fibers.
*
* @since 2.0.0
* @category constructors
*/
export declare const unsafeRoots: (_: void) => Array<RuntimeFiber<any, any>>;
/**
* Converts this fiber into a scoped effect. The fiber is interrupted when the
* scope is closed.
*
* @since 2.0.0
* @category destructors
*/
export declare const scoped: <A, E>(self: Fiber<A, E>) => Effect.Effect<Fiber<A, E>, never, Scope.Scope>;
/**
* Returns the `FiberStatus` of a `RuntimeFiber`.
*
* @since 2.0.0
* @category getters
*/
export declare const status: <A, E>(self: RuntimeFiber<A, E>) => Effect.Effect<FiberStatus.FiberStatus>;
/**
* Returns a fiber that has already succeeded with the specified value.
*
* @since 2.0.0
* @category constructors
*/
export declare const succeed: <A>(value: A) => Fiber<A>;
declare const void_: Fiber<void>;
export {
/**
* A fiber that has already succeeded with unit.
*
* @since 2.0.0
* @category constructors
*/
void_ as void };
/**
* Zips this fiber and the specified fiber together, producing a tuple of
* their output.
*
* @since 2.0.0
* @category zipping
*/
export declare const zip: {
/**
* Zips this fiber and the specified fiber together, producing a tuple of
* their output.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Fiber<A2, E2>): <A, E>(self: Fiber<A, E>) => Fiber<[A, A2], E2 | E>;
/**
* Zips this fiber and the specified fiber together, producing a tuple of
* their output.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Fiber<A, E>, that: Fiber<A2, E2>): Fiber<[A, A2], E | E2>;
};
/**
* Same as `zip` but discards the output of that `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipLeft: {
/**
* Same as `zip` but discards the output of that `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Fiber<A2, E2>): <A, E>(self: Fiber<A, E>) => Fiber<A, E2 | E>;
/**
* Same as `zip` but discards the output of that `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Fiber<A, E>, that: Fiber<A2, E2>): Fiber<A, E | E2>;
};
/**
* Same as `zip` but discards the output of this `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipRight: {
/**
* Same as `zip` but discards the output of this `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
<A2, E2>(that: Fiber<A2, E2>): <A, E>(self: Fiber<A, E>) => Fiber<A2, E2 | E>;
/**
* Same as `zip` but discards the output of this `Fiber`.
*
* @since 2.0.0
* @category zipping
*/
<A, E, A2, E2>(self: Fiber<A, E>, that: Fiber<A2, E2>): Fiber<A2, E | E2>;
};
/**
* Zips this fiber with the specified fiber, combining their results using the
* specified combiner function. Both joins and interruptions are performed in
* sequential order from left to right.
*
* @since 2.0.0
* @category zipping
*/
export declare const zipWith: {
/**
* Zips this fiber with the specified fiber, combining their results using the
* specified combiner function. Both joins and interruptions are performed in
* sequential order from left to right.
*
* @since 2.0.0
* @category zipping
*/
<B, E2, A, C>(that: Fiber<B, E2>, f: (a: A, b: B) => C): <E>(self: Fiber<A, E>) => Fiber<C, E2 | E>;
/**
* Zips this fiber with the specified fiber, combining their results using the
* specified combiner function. Both joins and interruptions are performed in
* sequential order from left to right.
*
* @since 2.0.0
* @category zipping
*/
<A, E, B, E2, C>(self: Fiber<A, E>, that: Fiber<B, E2>, f: (a: A, b: B) => C): Fiber<C, E | E2>;
};
//# sourceMappingURL=Fiber.d.ts.map

1
_node_modules/effect/dist/dts/Fiber.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

270
_node_modules/effect/dist/dts/FiberHandle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,270 @@
/**
* @since 2.0.0
*/
import type { NoSuchElementException } from "./Cause.js";
import * as Deferred from "./Deferred.js";
import * as Effect from "./Effect.js";
import * as Fiber from "./Fiber.js";
import * as FiberId from "./FiberId.js";
import * as Inspectable from "./Inspectable.js";
import * as Option from "./Option.js";
import { type Pipeable } from "./Pipeable.js";
import * as Runtime from "./Runtime.js";
import type * as Scope from "./Scope.js";
/**
* @since 2.0.0
* @categories type ids
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @categories type ids
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @categories models
*/
export interface FiberHandle<out A = unknown, out E = unknown> extends Pipeable, Inspectable.Inspectable {
readonly [TypeId]: TypeId;
readonly deferred: Deferred.Deferred<void, unknown>;
}
/**
* @since 2.0.0
* @categories refinements
*/
export declare const isFiberHandle: (u: unknown) => u is FiberHandle;
/**
* A FiberHandle can be used to store a single fiber.
* When the associated Scope is closed, the contained fiber will be interrupted.
*
* You can add a fiber to the handle using `FiberHandle.run`, and the fiber will
* be automatically removed from the FiberHandle when it completes.
*
* @example
* ```ts
* import { Effect, FiberHandle } from "effect"
*
* Effect.gen(function*() {
* const handle = yield* FiberHandle.make()
*
* // run some effects
* yield* FiberHandle.run(handle, Effect.never)
* // this will interrupt the previous fiber
* yield* FiberHandle.run(handle, Effect.never)
*
* yield* Effect.sleep(1000)
* }).pipe(
* Effect.scoped // The fiber will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories constructors
*/
export declare const make: <A = unknown, E = unknown>() => Effect.Effect<FiberHandle<A, E>, never, Scope.Scope>;
/**
* Create an Effect run function that is backed by a FiberHandle.
*
* @since 2.0.0
* @categories constructors
*/
export declare const makeRuntime: <R, E = unknown, A = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
}) | undefined) => Fiber.RuntimeFiber<XA, XE>), never, Scope.Scope | R>;
/**
* Create an Effect run function that is backed by a FiberHandle.
*
* @since 3.13.0
* @categories constructors
*/
export declare const makeRuntimePromise: <R = never, A = unknown, E = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions | undefined) => Promise<XA>), never, Scope.Scope | R>;
/**
* Set the fiber in a FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber is already running, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeSet: {
/**
* Set the fiber in a FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber is already running, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
}): (self: FiberHandle<A, E>) => void;
/**
* Set the fiber in a FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber is already running, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(self: FiberHandle<A, E>, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
}): void;
};
/**
* Set the fiber in the FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber already exists in the FiberHandle, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
export declare const set: {
/**
* Set the fiber in the FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber already exists in the FiberHandle, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly onlyIfMissing?: boolean;
readonly propagateInterruption?: boolean | undefined;
}): (self: FiberHandle<A, E>) => Effect.Effect<void>;
/**
* Set the fiber in the FiberHandle. When the fiber completes, it will be removed from the FiberHandle.
* If a fiber already exists in the FiberHandle, it will be interrupted unless `options.onlyIfMissing` is set.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(self: FiberHandle<A, E>, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly onlyIfMissing?: boolean;
readonly propagateInterruption?: boolean | undefined;
}): Effect.Effect<void>;
};
/**
* Retrieve the fiber from the FiberHandle.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeGet: <A, E>(self: FiberHandle<A, E>) => Option.Option<Fiber.RuntimeFiber<A, E>>;
/**
* Retrieve the fiber from the FiberHandle.
*
* @since 2.0.0
* @categories combinators
*/
export declare const get: <A, E>(self: FiberHandle<A, E>) => Effect.Effect<Fiber.RuntimeFiber<A, E>, NoSuchElementException>;
/**
* @since 2.0.0
* @categories combinators
*/
export declare const clear: <A, E>(self: FiberHandle<A, E>) => Effect.Effect<void>;
/**
* Run an Effect and add the forked fiber to the FiberHandle.
* When the fiber completes, it will be removed from the FiberHandle.
*
* @since 2.0.0
* @categories combinators
*/
export declare const run: {
/**
* Run an Effect and add the forked fiber to the FiberHandle.
* When the fiber completes, it will be removed from the FiberHandle.
*
* @since 2.0.0
* @categories combinators
*/
<A, E>(self: FiberHandle<A, E>, options?: {
readonly onlyIfMissing?: boolean;
readonly propagateInterruption?: boolean | undefined;
}): <R, XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>) => Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
/**
* Run an Effect and add the forked fiber to the FiberHandle.
* When the fiber completes, it will be removed from the FiberHandle.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, R, XE extends E, XA extends A>(self: FiberHandle<A, E>, effect: Effect.Effect<XA, XE, R>, options?: {
readonly onlyIfMissing?: boolean;
readonly propagateInterruption?: boolean | undefined;
}): Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
};
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle.
*
* @example
* ```ts
* import { Context, Effect, FiberHandle } from "effect"
*
* interface Users {
* readonly _: unique symbol
* }
* const Users = Context.GenericTag<Users, {
* getAll: Effect.Effect<Array<unknown>>
* }>("Users")
*
* Effect.gen(function*() {
* const handle = yield* FiberHandle.make()
* const run = yield* FiberHandle.runtime(handle)<Users>()
*
* // run an effect and set the fiber in the handle
* run(Effect.andThen(Users, _ => _.getAll))
*
* // this will interrupt the previous fiber
* run(Effect.andThen(Users, _ => _.getAll))
* }).pipe(
* Effect.scoped // The fiber will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories combinators
*/
export declare const runtime: <A, E>(self: FiberHandle<A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined) => Fiber.RuntimeFiber<XA, XE>), never, R>;
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle.
*
* The returned run function will return Promise's that will resolve when the
* fiber completes.
*
* @since 3.13.0
* @categories combinators
*/
export declare const runtimePromise: <A, E>(self: FiberHandle<A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly propagateInterruption?: boolean | undefined;
}) | undefined) => Promise<XA>), never, R>;
/**
* If any of the Fiber's in the handle terminate with a failure,
* the returned Effect will terminate with the first failure that occurred.
*
* @since 2.0.0
* @categories combinators
* @example
* ```ts
* import { Effect, FiberHandle } from "effect";
*
* Effect.gen(function* (_) {
* const handle = yield* _(FiberHandle.make());
* yield* _(FiberHandle.set(handle, Effect.runFork(Effect.fail("error"))));
*
* // parent fiber will fail with "error"
* yield* _(FiberHandle.join(handle));
* });
* ```
*/
export declare const join: <A, E>(self: FiberHandle<A, E>) => Effect.Effect<void, E>;
/**
* Wait for the fiber in the FiberHandle to complete.
*
* @since 3.13.0
* @categories combinators
*/
export declare const awaitEmpty: <A, E>(self: FiberHandle<A, E>) => Effect.Effect<void, E>;
//# sourceMappingURL=FiberHandle.d.ts.map

1
_node_modules/effect/dist/dts/FiberHandle.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

196
_node_modules/effect/dist/dts/FiberId.d.ts generated vendored Normal file
View File

@@ -0,0 +1,196 @@
/**
* @since 2.0.0
*/
import type * as Equal from "./Equal.js";
import type * as HashSet from "./HashSet.js";
import type { Inspectable } from "./Inspectable.js";
import type * as Option from "./Option.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const FiberIdTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FiberIdTypeId = typeof FiberIdTypeId;
/**
* @since 2.0.0
* @category models
*/
export type Single = None | Runtime;
/**
* @since 2.0.0
* @category models
*/
export type FiberId = Single | Composite;
/**
* @since 2.0.0
* @category models
*/
export interface None extends Equal.Equal, Inspectable {
readonly [FiberIdTypeId]: FiberIdTypeId;
readonly _tag: "None";
readonly id: -1;
readonly startTimeMillis: -1;
}
/**
* @since 2.0.0
* @category models
*/
export interface Runtime extends Equal.Equal, Inspectable {
readonly [FiberIdTypeId]: FiberIdTypeId;
readonly _tag: "Runtime";
readonly id: number;
readonly startTimeMillis: number;
}
/**
* @since 2.0.0
* @category models
*/
export interface Composite extends Equal.Equal, Inspectable {
readonly [FiberIdTypeId]: FiberIdTypeId;
readonly _tag: "Composite";
readonly left: FiberId;
readonly right: FiberId;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const none: None;
/**
* @since 2.0.0
* @category constructors
*/
export declare const runtime: (id: number, startTimeMillis: number) => Runtime;
/**
* @since 2.0.0
* @category constructors
*/
export declare const composite: (left: FiberId, right: FiberId) => Composite;
/**
* Returns `true` if the specified unknown value is a `FiberId`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isFiberId: (self: unknown) => self is FiberId;
/**
* Returns `true` if the `FiberId` is a `None`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isNone: (self: FiberId) => self is None;
/**
* Returns `true` if the `FiberId` is a `Runtime`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isRuntime: (self: FiberId) => self is Runtime;
/**
* Returns `true` if the `FiberId` is a `Composite`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isComposite: (self: FiberId) => self is Composite;
/**
* Combine two `FiberId`s.
*
* @since 2.0.0
* @category constructors
*/
export declare const combine: {
/**
* Combine two `FiberId`s.
*
* @since 2.0.0
* @category constructors
*/
(that: FiberId): (self: FiberId) => FiberId;
/**
* Combine two `FiberId`s.
*
* @since 2.0.0
* @category constructors
*/
(self: FiberId, that: FiberId): FiberId;
};
/**
* Combines a set of `FiberId`s into a single `FiberId`.
*
* @since 2.0.0
* @category constructors
*/
export declare const combineAll: (fiberIds: HashSet.HashSet<FiberId>) => FiberId;
/**
* Returns this `FiberId` if it is not `None`, otherwise returns that `FiberId`.
*
* @since 2.0.0
* @category utils
*/
export declare const getOrElse: {
/**
* Returns this `FiberId` if it is not `None`, otherwise returns that `FiberId`.
*
* @since 2.0.0
* @category utils
*/
(that: FiberId): (self: FiberId) => FiberId;
/**
* Returns this `FiberId` if it is not `None`, otherwise returns that `FiberId`.
*
* @since 2.0.0
* @category utils
*/
(self: FiberId, that: FiberId): FiberId;
};
/**
* Get the set of identifiers for this `FiberId`.
*
* @since 2.0.0
* @category destructors
*/
export declare const ids: (self: FiberId) => HashSet.HashSet<number>;
/**
* Creates a new `FiberId`.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: (id: number, startTimeSeconds: number) => FiberId;
/**
* Creates a string representing the name of the current thread of execution
* represented by the specified `FiberId`.
*
* @since 2.0.0
* @category destructors
*/
export declare const threadName: (self: FiberId) => string;
/**
* Convert a `FiberId` into an `Option<FiberId>`.
*
* @since 2.0.0
* @category destructors
*/
export declare const toOption: (self: FiberId) => Option.Option<FiberId>;
/**
* Convert a `FiberId` into a `HashSet<FiberId>`.
*
* @since 2.0.0
* @category destructors
*/
export declare const toSet: (self: FiberId) => HashSet.HashSet<Runtime>;
/**
* Unsafely creates a new `FiberId`.
*
* @since 2.0.0
* @category unsafe
*/
export declare const unsafeMake: (_: void) => Runtime;
//# sourceMappingURL=FiberId.d.ts.map

1
_node_modules/effect/dist/dts/FiberId.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FiberId.d.ts","sourceRoot":"","sources":["../../src/FiberId.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,MAA+B,CAAA;AAElE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAEhD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAAA;AAEnC;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAExC;;;GAGG;AACH,MAAM,W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EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAqB,CAAA;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,OAAO,CAAkB,CAAA;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAA6B,CAAA"}

368
_node_modules/effect/dist/dts/FiberMap.d.ts generated vendored Normal file
View File

@@ -0,0 +1,368 @@
/**
* @since 2.0.0
*/
import type { NoSuchElementException } from "./Cause.js";
import * as Deferred from "./Deferred.js";
import * as Effect from "./Effect.js";
import * as Fiber from "./Fiber.js";
import * as FiberId from "./FiberId.js";
import * as Inspectable from "./Inspectable.js";
import * as Option from "./Option.js";
import { type Pipeable } from "./Pipeable.js";
import * as Runtime from "./Runtime.js";
import type * as Scope from "./Scope.js";
/**
* @since 2.0.0
* @categories type ids
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @categories type ids
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @categories models
*/
export interface FiberMap<in out K, out A = unknown, out E = unknown> extends Pipeable, Inspectable.Inspectable, Iterable<[K, Fiber.RuntimeFiber<A, E>]> {
readonly [TypeId]: TypeId;
readonly deferred: Deferred.Deferred<void, unknown>;
}
/**
* @since 2.0.0
* @categories refinements
*/
export declare const isFiberMap: (u: unknown) => u is FiberMap<unknown>;
/**
* A FiberMap can be used to store a collection of fibers, indexed by some key.
* When the associated Scope is closed, all fibers in the map will be interrupted.
*
* You can add fibers to the map using `FiberMap.set` or `FiberMap.run`, and the fibers will
* be automatically removed from the FiberMap when they complete.
*
* @example
* ```ts
* import { Effect, FiberMap } from "effect"
*
* Effect.gen(function*() {
* const map = yield* FiberMap.make<string>()
*
* // run some effects and add the fibers to the map
* yield* FiberMap.run(map, "fiber a", Effect.never)
* yield* FiberMap.run(map, "fiber b", Effect.never)
*
* yield* Effect.sleep(1000)
* }).pipe(
* Effect.scoped // The fibers will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories constructors
*/
export declare const make: <K, A = unknown, E = unknown>() => Effect.Effect<FiberMap<K, A, E>, never, Scope.Scope>;
/**
* Create an Effect run function that is backed by a FiberMap.
*
* @since 2.0.0
* @categories constructors
*/
export declare const makeRuntime: <R, K, E = unknown, A = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(key: K, effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
}) | undefined) => Fiber.RuntimeFiber<XA, XE>), never, Scope.Scope | R>;
/**
* Create an Effect run function that is backed by a FiberMap.
*
* @since 3.13.0
* @categories constructors
*/
export declare const makeRuntimePromise: <R, K, A = unknown, E = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(key: K, effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
}) | undefined) => Promise<XA>), never, Scope.Scope | R>;
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeSet: {
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E, XE extends E, XA extends A>(key: K, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): (self: FiberMap<K, A, E>) => void;
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E, XE extends E, XA extends A>(self: FiberMap<K, A, E>, key: K, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): void;
};
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
export declare const set: {
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E, XE extends E, XA extends A>(key: K, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): (self: FiberMap<K, A, E>) => Effect.Effect<void>;
/**
* Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap.
* If the key already exists in the FiberMap, the previous fiber will be interrupted.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E, XE extends E, XA extends A>(self: FiberMap<K, A, E>, key: K, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): Effect.Effect<void>;
};
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeGet: {
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K>(key: K): <A, E>(self: FiberMap<K, A, E>) => Option.Option<Fiber.RuntimeFiber<A, E>>;
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K): Option.Option<Fiber.RuntimeFiber<A, E>>;
};
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
export declare const get: {
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K>(key: K): <A, E>(self: FiberMap<K, A, E>) => Effect.Effect<Fiber.RuntimeFiber<A, E>, NoSuchElementException>;
/**
* Retrieve a fiber from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K): Effect.Effect<Fiber.RuntimeFiber<A, E>, NoSuchElementException>;
};
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeHas: {
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K>(key: K): <A, E>(self: FiberMap<K, A, E>) => boolean;
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K): boolean;
};
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
export declare const has: {
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K>(key: K): <A, E>(self: FiberMap<K, A, E>) => Effect.Effect<boolean>;
/**
* Check if a key exists in the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K): Effect.Effect<boolean>;
};
/**
* Remove a fiber from the FiberMap, interrupting it if it exists.
*
* @since 2.0.0
* @categories combinators
*/
export declare const remove: {
/**
* Remove a fiber from the FiberMap, interrupting it if it exists.
*
* @since 2.0.0
* @categories combinators
*/
<K>(key: K): <A, E>(self: FiberMap<K, A, E>) => Effect.Effect<void>;
/**
* Remove a fiber from the FiberMap, interrupting it if it exists.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K): Effect.Effect<void>;
};
/**
* @since 2.0.0
* @categories combinators
*/
export declare const clear: <K, A, E>(self: FiberMap<K, A, E>) => Effect.Effect<void>;
/**
* Run an Effect and add the forked fiber to the FiberMap.
* When the fiber completes, it will be removed from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
export declare const run: {
/**
* Run an Effect and add the forked fiber to the FiberMap.
* When the fiber completes, it will be removed from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E>(self: FiberMap<K, A, E>, key: K, options?: {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): <R, XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>) => Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
/**
* Run an Effect and add the forked fiber to the FiberMap.
* When the fiber completes, it will be removed from the FiberMap.
*
* @since 2.0.0
* @categories combinators
*/
<K, A, E, R, XE extends E, XA extends A>(self: FiberMap<K, A, E>, key: K, effect: Effect.Effect<XA, XE, R>, options?: {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
};
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap.
*
* @example
* ```ts
* import { Context, Effect, FiberMap } from "effect"
*
* interface Users {
* readonly _: unique symbol
* }
* const Users = Context.GenericTag<Users, {
* getAll: Effect.Effect<Array<unknown>>
* }>("Users")
*
* Effect.gen(function*() {
* const map = yield* FiberMap.make<string>()
* const run = yield* FiberMap.runtime(map)<Users>()
*
* // run some effects and add the fibers to the map
* run("effect-a", Effect.andThen(Users, _ => _.getAll))
* run("effect-b", Effect.andThen(Users, _ => _.getAll))
* }).pipe(
* Effect.scoped // The fibers will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories combinators
*/
export declare const runtime: <K, A, E>(self: FiberMap<K, A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(key: K, effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined) => Fiber.RuntimeFiber<XA, XE>), never, R>;
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap.
*
* @since 3.13.0
* @categories combinators
*/
export declare const runtimePromise: <K, A, E>(self: FiberMap<K, A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(key: K, effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly onlyIfMissing?: boolean | undefined;
readonly propagateInterruption?: boolean | undefined;
}) | undefined) => Promise<XA>), never, R>;
/**
* @since 2.0.0
* @categories combinators
*/
export declare const size: <K, A, E>(self: FiberMap<K, A, E>) => Effect.Effect<number>;
/**
* Join all fibers in the FiberMap. If any of the Fiber's in the map terminate with a failure,
* the returned Effect will terminate with the first failure that occurred.
*
* @since 2.0.0
* @categories combinators
* @example
* ```ts
* import { Effect, FiberMap } from "effect";
*
* Effect.gen(function* (_) {
* const map = yield* _(FiberMap.make());
* yield* _(FiberMap.set(map, "a", Effect.runFork(Effect.fail("error"))));
*
* // parent fiber will fail with "error"
* yield* _(FiberMap.join(map));
* });
* ```
*/
export declare const join: <K, A, E>(self: FiberMap<K, A, E>) => Effect.Effect<void, E>;
/**
* Wait for the FiberMap to be empty.
*
* @since 3.13.0
* @categories combinators
*/
export declare const awaitEmpty: <K, A, E>(self: FiberMap<K, A, E>) => Effect.Effect<void, E>;
//# sourceMappingURL=FiberMap.d.ts.map

1
_node_modules/effect/dist/dts/FiberMap.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

422
_node_modules/effect/dist/dts/FiberRef.d.ts generated vendored Normal file
View File

@@ -0,0 +1,422 @@
/**
* @since 2.0.0
*/
import type * as Cause from "./Cause.js";
import type * as Chunk from "./Chunk.js";
import type * as Context from "./Context.js";
import type * as Differ from "./Differ.js";
import type * as Effect from "./Effect.js";
import type { LazyArg } from "./Function.js";
import type * as HashMap from "./HashMap.js";
import type * as HashSet from "./HashSet.js";
import type * as List from "./List.js";
import type * as Logger from "./Logger.js";
import type * as LogLevel from "./LogLevel.js";
import type * as LogSpan from "./LogSpan.js";
import type * as MetricLabel from "./MetricLabel.js";
import type * as Option from "./Option.js";
import type * as Request from "./Request.js";
import type * as RuntimeFlags from "./RuntimeFlags.js";
import * as Scheduler from "./Scheduler.js";
import type * as Scope from "./Scope.js";
import type * as Supervisor from "./Supervisor.js";
import type * as Tracer from "./Tracer.js";
import type * as Types from "./Types.js";
import type * as Unify from "./Unify.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const FiberRefTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FiberRefTypeId = typeof FiberRefTypeId;
/**
* @since 2.0.0
* @category model
*/
export interface FiberRef<in out A> extends Effect.Effect<A>, Variance<A> {
readonly [Unify.typeSymbol]?: unknown;
readonly [Unify.unifySymbol]?: FiberRefUnify<this>;
readonly [Unify.ignoreSymbol]?: FiberRefUnifyIgnore;
}
/**
* @category models
* @since 3.8.0
*/
export interface FiberRefUnify<A extends {
[Unify.typeSymbol]?: any;
}> extends Effect.EffectUnify<A> {
FiberRef?: () => Extract<A[Unify.typeSymbol], FiberRef<any>>;
}
/**
* @category models
* @since 3.8.0
*/
export interface FiberRefUnifyIgnore extends Effect.EffectUnifyIgnore {
Effect?: true;
}
/**
* @since 2.0.0
* @category models
*/
export interface Variance<in out A> {
readonly [FiberRefTypeId]: {
readonly _A: Types.Invariant<A>;
};
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const make: <A>(initial: A, options?: {
readonly fork?: ((a: A) => A) | undefined;
readonly join?: ((left: A, right: A) => A) | undefined;
}) => Effect.Effect<FiberRef<A>, never, Scope.Scope>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const makeWith: <Value>(ref: LazyArg<FiberRef<Value>>) => Effect.Effect<FiberRef<Value>, never, Scope.Scope>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const makeContext: <A>(initial: Context.Context<A>) => Effect.Effect<FiberRef<Context.Context<A>>, never, Scope.Scope>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const makeRuntimeFlags: (initial: RuntimeFlags.RuntimeFlags) => Effect.Effect<FiberRef<RuntimeFlags.RuntimeFlags>, never, Scope.Scope>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMake: <Value>(initial: Value, options?: {
readonly fork?: ((a: Value) => Value) | undefined;
readonly join?: ((left: Value, right: Value) => Value) | undefined;
}) => FiberRef<Value>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMakeHashSet: <A>(initial: HashSet.HashSet<A>) => FiberRef<HashSet.HashSet<A>>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMakeContext: <A>(initial: Context.Context<A>) => FiberRef<Context.Context<A>>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMakeSupervisor: (initial: Supervisor.Supervisor<any>) => FiberRef<Supervisor.Supervisor<any>>;
/**
* @since 2.0.0
* @category constructors
*/
export declare const unsafeMakePatch: <Value, Patch>(initial: Value, options: {
readonly differ: Differ.Differ<Value, Patch>;
readonly fork: Patch;
readonly join?: ((oldV: Value, newV: Value) => Value) | undefined;
}) => FiberRef<Value>;
/**
* @since 2.0.0
* @category getters
*/
export declare const get: <A>(self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
export declare const getAndSet: {
/**
* @since 2.0.0
* @category utils
*/
<A>(value: A): (self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, value: A): Effect.Effect<A>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const getAndUpdate: {
/**
* @since 2.0.0
* @category utils
*/
<A>(f: (a: A) => A): (self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, f: (a: A) => A): Effect.Effect<A>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const getAndUpdateSome: {
/**
* @since 2.0.0
* @category utils
*/
<A>(pf: (a: A) => Option.Option<A>): (self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<A>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const getWith: {
/**
* @since 2.0.0
* @category utils
*/
<A, B, E, R>(f: (a: A) => Effect.Effect<B, E, R>): (self: FiberRef<A>) => Effect.Effect<B, E, R>;
/**
* @since 2.0.0
* @category utils
*/
<A, B, E, R>(self: FiberRef<A>, f: (a: A) => Effect.Effect<B, E, R>): Effect.Effect<B, E, R>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const set: {
/**
* @since 2.0.0
* @category utils
*/
<A>(value: A): (self: FiberRef<A>) => Effect.Effect<void>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, value: A): Effect.Effect<void>;
};
declare const _delete: <A>(self: FiberRef<A>) => Effect.Effect<void>;
export {
/**
* @since 2.0.0
* @category utils
*/
_delete as delete };
/**
* @since 2.0.0
* @category utils
*/
export declare const reset: <A>(self: FiberRef<A>) => Effect.Effect<void>;
/**
* @since 2.0.0
* @category utils
*/
export declare const modify: {
/**
* @since 2.0.0
* @category utils
*/
<A, B>(f: (a: A) => readonly [B, A]): (self: FiberRef<A>) => Effect.Effect<B>;
/**
* @since 2.0.0
* @category utils
*/
<A, B>(self: FiberRef<A>, f: (a: A) => readonly [B, A]): Effect.Effect<B>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const modifySome: <A, B>(self: FiberRef<A>, def: B, f: (a: A) => Option.Option<readonly [B, A]>) => Effect.Effect<B>;
/**
* @since 2.0.0
* @category utils
*/
export declare const update: {
/**
* @since 2.0.0
* @category utils
*/
<A>(f: (a: A) => A): (self: FiberRef<A>) => Effect.Effect<void>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, f: (a: A) => A): Effect.Effect<void>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const updateSome: {
/**
* @since 2.0.0
* @category utils
*/
<A>(pf: (a: A) => Option.Option<A>): (self: FiberRef<A>) => Effect.Effect<void>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<void>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const updateAndGet: {
/**
* @since 2.0.0
* @category utils
*/
<A>(f: (a: A) => A): (self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, f: (a: A) => A): Effect.Effect<A>;
};
/**
* @since 2.0.0
* @category utils
*/
export declare const updateSomeAndGet: {
/**
* @since 2.0.0
* @category utils
*/
<A>(pf: (a: A) => Option.Option<A>): (self: FiberRef<A>) => Effect.Effect<A>;
/**
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRef<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<A>;
};
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentConcurrency: FiberRef<number | "unbounded">;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentRequestBatchingEnabled: FiberRef<boolean>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentRequestCache: FiberRef<Request.Cache>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentRequestCacheEnabled: FiberRef<boolean>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentContext: FiberRef<Context.Context<never>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentSchedulingPriority: FiberRef<number>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentMaxOpsBeforeYield: FiberRef<number>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const unhandledErrorLogLevel: FiberRef<Option.Option<LogLevel.LogLevel>>;
/**
* @since 3.17.0
* @category fiberRefs
*/
export declare const versionMismatchErrorLogLevel: FiberRef<Option.Option<LogLevel.LogLevel>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentLogAnnotations: FiberRef<HashMap.HashMap<string, unknown>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentLoggers: FiberRef<HashSet.HashSet<Logger.Logger<unknown, any>>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentLogLevel: FiberRef<LogLevel.LogLevel>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentMinimumLogLevel: FiberRef<LogLevel.LogLevel>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentLogSpan: FiberRef<List.List<LogSpan.LogSpan>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentRuntimeFlags: FiberRef<RuntimeFlags.RuntimeFlags>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentScheduler: FiberRef<Scheduler.Scheduler>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentSupervisor: FiberRef<Supervisor.Supervisor<any>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentMetricLabels: FiberRef<ReadonlyArray<MetricLabel.MetricLabel>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentTracerEnabled: FiberRef<boolean>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentTracerTimingEnabled: FiberRef<boolean>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentTracerSpanAnnotations: FiberRef<HashMap.HashMap<string, unknown>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const currentTracerSpanLinks: FiberRef<Chunk.Chunk<Tracer.SpanLink>>;
/**
* @since 2.0.0
* @category fiberRefs
*/
export declare const interruptedCause: FiberRef<Cause.Cause<never>>;
//# sourceMappingURL=FiberRef.d.ts.map

1
_node_modules/effect/dist/dts/FiberRef.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

256
_node_modules/effect/dist/dts/FiberRefs.d.ts generated vendored Normal file
View File

@@ -0,0 +1,256 @@
/**
* @since 2.0.0
*/
import type * as Arr from "./Array.js";
import type * as Effect from "./Effect.js";
import type * as FiberId from "./FiberId.js";
import type * as FiberRef from "./FiberRef.js";
import type * as HashSet from "./HashSet.js";
import type * as Option from "./Option.js";
import type { Pipeable } from "./Pipeable.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const FiberRefsSym: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FiberRefsSym = typeof FiberRefsSym;
/**
* `FiberRefs` is a data type that represents a collection of `FiberRef` values.
*
* This allows safely propagating `FiberRef` values across fiber boundaries, for
* example between an asynchronous producer and consumer.
*
* @since 2.0.0
* @category models
*/
export interface FiberRefs extends Pipeable {
readonly [FiberRefsSym]: FiberRefsSym;
readonly locals: Map<FiberRef.FiberRef<any>, Arr.NonEmptyReadonlyArray<readonly [FiberId.Single, any]>>;
}
declare const delete_: {
<A>(fiberRef: FiberRef.FiberRef<A>): (self: FiberRefs) => FiberRefs;
<A>(self: FiberRefs, fiberRef: FiberRef.FiberRef<A>): FiberRefs;
};
export {
/**
* Deletes the specified `FiberRef` from the `FibterRefs`.
*
* @since 2.0.0
* @category utils
*/
delete_ as delete };
/**
* Returns a set of each `FiberRef` in this collection.
*
* @since 2.0.0
* @category getters
*/
export declare const fiberRefs: (self: FiberRefs) => HashSet.HashSet<FiberRef.FiberRef<any>>;
/**
* Forks this collection of fiber refs as the specified child fiber id. This
* will potentially modify the value of the fiber refs, as determined by the
* individual fiber refs that make up the collection.
*
* @since 2.0.0
* @category utils
*/
export declare const forkAs: {
/**
* Forks this collection of fiber refs as the specified child fiber id. This
* will potentially modify the value of the fiber refs, as determined by the
* individual fiber refs that make up the collection.
*
* @since 2.0.0
* @category utils
*/
(childId: FiberId.Single): (self: FiberRefs) => FiberRefs;
/**
* Forks this collection of fiber refs as the specified child fiber id. This
* will potentially modify the value of the fiber refs, as determined by the
* individual fiber refs that make up the collection.
*
* @since 2.0.0
* @category utils
*/
(self: FiberRefs, childId: FiberId.Single): FiberRefs;
};
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or `None` otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const get: {
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or `None` otherwise.
*
* @since 2.0.0
* @category getters
*/
<A>(fiberRef: FiberRef.FiberRef<A>): (self: FiberRefs) => Option.Option<A>;
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or `None` otherwise.
*
* @since 2.0.0
* @category getters
*/
<A>(self: FiberRefs, fiberRef: FiberRef.FiberRef<A>): Option.Option<A>;
};
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or the `initial` value of the `FiberRef` otherwise.
*
* @since 2.0.0
* @category getters
*/
export declare const getOrDefault: {
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or the `initial` value of the `FiberRef` otherwise.
*
* @since 2.0.0
* @category getters
*/
<A>(fiberRef: FiberRef.FiberRef<A>): (self: FiberRefs) => A;
/**
* Gets the value of the specified `FiberRef` in this collection of `FiberRef`
* values if it exists or the `initial` value of the `FiberRef` otherwise.
*
* @since 2.0.0
* @category getters
*/
<A>(self: FiberRefs, fiberRef: FiberRef.FiberRef<A>): A;
};
/**
* Joins this collection of fiber refs to the specified collection, as the
* specified fiber id. This will perform diffing and merging to ensure
* preservation of maximum information from both child and parent refs.
*
* @since 2.0.0
* @category utils
*/
export declare const joinAs: {
/**
* Joins this collection of fiber refs to the specified collection, as the
* specified fiber id. This will perform diffing and merging to ensure
* preservation of maximum information from both child and parent refs.
*
* @since 2.0.0
* @category utils
*/
(fiberId: FiberId.Single, that: FiberRefs): (self: FiberRefs) => FiberRefs;
/**
* Joins this collection of fiber refs to the specified collection, as the
* specified fiber id. This will perform diffing and merging to ensure
* preservation of maximum information from both child and parent refs.
*
* @since 2.0.0
* @category utils
*/
(self: FiberRefs, fiberId: FiberId.Single, that: FiberRefs): FiberRefs;
};
/**
* Set each ref to either its value or its default.
*
* @since 2.0.0
* @category utils
*/
export declare const setAll: (self: FiberRefs) => Effect.Effect<void>;
/**
* Updates the value of the specified `FiberRef` using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
export declare const updateAs: {
/**
* Updates the value of the specified `FiberRef` using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
<A>(options: {
readonly fiberId: FiberId.Single;
readonly fiberRef: FiberRef.FiberRef<A>;
readonly value: A;
}): (self: FiberRefs) => FiberRefs;
/**
* Updates the value of the specified `FiberRef` using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
<A>(self: FiberRefs, options: {
readonly fiberId: FiberId.Single;
readonly fiberRef: FiberRef.FiberRef<A>;
readonly value: A;
}): FiberRefs;
};
/**
* Updates the values of the specified `FiberRef` & value pairs using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
export declare const updateManyAs: {
/**
* Updates the values of the specified `FiberRef` & value pairs using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
(options: {
readonly forkAs?: FiberId.Single | undefined;
readonly entries: readonly [
readonly [
FiberRef.FiberRef<any>,
readonly [readonly [FiberId.Single, any], ...Array<readonly [FiberId.Single, any]>]
],
...Array<readonly [
FiberRef.FiberRef<any>,
readonly [readonly [FiberId.Single, any], ...Array<readonly [FiberId.Single, any]>]
]>
];
}): (self: FiberRefs) => FiberRefs;
/**
* Updates the values of the specified `FiberRef` & value pairs using the provided `FiberId`
*
* @since 2.0.0
* @category utils
*/
(self: FiberRefs, options: {
readonly forkAs?: FiberId.Single | undefined;
readonly entries: readonly [
readonly [
FiberRef.FiberRef<any>,
readonly [readonly [FiberId.Single, any], ...Array<readonly [FiberId.Single, any]>]
],
...Array<readonly [
FiberRef.FiberRef<any>,
readonly [readonly [FiberId.Single, any], ...Array<readonly [FiberId.Single, any]>]
]>
];
}): FiberRefs;
};
/**
* Note: it will not copy the provided Map, make sure to provide a fresh one.
*
* @since 2.0.0
* @category unsafe
*/
export declare const unsafeMake: (fiberRefLocals: Map<FiberRef.FiberRef<any>, Arr.NonEmptyReadonlyArray<readonly [FiberId.Single, any]>>) => FiberRefs;
/**
* The empty collection of `FiberRef` values.
*
* @category constructors
* @since 2.0.0
*/
export declare const empty: () => FiberRefs;
//# sourceMappingURL=FiberRefs.d.ts.map

1
_node_modules/effect/dist/dts/FiberR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AAC,GAAG,CAAC,EAAE,GAAG,CAAC,qBAAqB,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,KACnG,SAA+B,CAAA;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,SAA0B,CAAA"}

125
_node_modules/effect/dist/dts/FiberRefsPatch.d.ts generated vendored Normal file
View File

@@ -0,0 +1,125 @@
/**
* @since 2.0.0
*/
import type * as FiberId from "./FiberId.js";
import type * as FiberRef from "./FiberRef.js";
import type * as FiberRefs from "./FiberRefs.js";
/**
* A `FiberRefsPatch` captures the changes in `FiberRef` values made by a single
* fiber as a value. This allows fibers to apply the changes made by a workflow
* without inheriting all the `FiberRef` values of the fiber that executed the
* workflow.
*
* @since 2.0.0
* @category models
*/
export type FiberRefsPatch = Empty | Add | Remove | Update | AndThen;
/**
* @since 2.0.0
* @category models
*/
export interface Empty {
readonly _tag: "Empty";
}
/**
* @since 2.0.0
* @category models
*/
export interface Add {
readonly _tag: "Add";
readonly fiberRef: FiberRef.FiberRef<unknown>;
readonly value: unknown;
}
/**
* @since 2.0.0
* @category models
*/
export interface Remove {
readonly _tag: "Remove";
readonly fiberRef: FiberRef.FiberRef<unknown>;
}
/**
* @since 2.0.0
* @category models
*/
export interface Update {
readonly _tag: "Update";
readonly fiberRef: FiberRef.FiberRef<unknown>;
readonly patch: unknown;
}
/**
* @since 2.0.0
* @category models
*/
export interface AndThen {
readonly _tag: "AndThen";
readonly first: FiberRefsPatch;
readonly second: FiberRefsPatch;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const empty: FiberRefsPatch;
/**
* Constructs a patch that describes the changes between the specified
* collections of `FiberRef`
*
* @since 2.0.0
* @category constructors
*/
export declare const diff: (oldValue: FiberRefs.FiberRefs, newValue: FiberRefs.FiberRefs) => FiberRefsPatch;
/**
* Combines this patch and the specified patch to create a new patch that
* describes applying the changes from this patch and the specified patch
* sequentially.
*
* @since 2.0.0
* @category constructors
*/
export declare const combine: {
/**
* Combines this patch and the specified patch to create a new patch that
* describes applying the changes from this patch and the specified patch
* sequentially.
*
* @since 2.0.0
* @category constructors
*/
(that: FiberRefsPatch): (self: FiberRefsPatch) => FiberRefsPatch;
/**
* Combines this patch and the specified patch to create a new patch that
* describes applying the changes from this patch and the specified patch
* sequentially.
*
* @since 2.0.0
* @category constructors
*/
(self: FiberRefsPatch, that: FiberRefsPatch): FiberRefsPatch;
};
/**
* Applies the changes described by this patch to the specified collection
* of `FiberRef` values.
*
* @since 2.0.0
* @category destructors
*/
export declare const patch: {
/**
* Applies the changes described by this patch to the specified collection
* of `FiberRef` values.
*
* @since 2.0.0
* @category destructors
*/
(fiberId: FiberId.Runtime, oldValue: FiberRefs.FiberRefs): (self: FiberRefsPatch) => FiberRefs.FiberRefs;
/**
* Applies the changes described by this patch to the specified collection
* of `FiberRef` values.
*
* @since 2.0.0
* @category destructors
*/
(self: FiberRefsPatch, fiberId: FiberId.Runtime, oldValue: FiberRefs.FiberRefs): FiberRefs.FiberRefs;
};
//# sourceMappingURL=FiberRefsPatch.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FiberRefsPatch.d.ts","sourceRoot":"","sources":["../../src/FiberRefsPatch.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAGhD;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpE;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IACpB,QAAQ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AE,SAAS,CAAC,SAAS,GAAG,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC,SAAS,CAAA;IACxG;;;;;;OAMG;IACH,CACC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,QAAQ,EAAE,SAAS,CAAC,SAAS,GAC3B,SAAS,CAAC,SAAS,CAAA;CACN,CAAA"}

236
_node_modules/effect/dist/dts/FiberSet.d.ts generated vendored Normal file
View File

@@ -0,0 +1,236 @@
import * as Deferred from "./Deferred.js";
import * as Effect from "./Effect.js";
import * as Fiber from "./Fiber.js";
import * as FiberId from "./FiberId.js";
import * as Inspectable from "./Inspectable.js";
import { type Pipeable } from "./Pipeable.js";
import * as Runtime from "./Runtime.js";
import type * as Scope from "./Scope.js";
/**
* @since 2.0.0
* @categories type ids
*/
export declare const TypeId: unique symbol;
/**
* @since 2.0.0
* @categories type ids
*/
export type TypeId = typeof TypeId;
/**
* @since 2.0.0
* @categories models
*/
export interface FiberSet<out A = unknown, out E = unknown> extends Pipeable, Inspectable.Inspectable, Iterable<Fiber.RuntimeFiber<A, E>> {
readonly [TypeId]: TypeId;
readonly deferred: Deferred.Deferred<void, unknown>;
}
/**
* @since 2.0.0
* @categories refinements
*/
export declare const isFiberSet: (u: unknown) => u is FiberSet<unknown, unknown>;
/**
* A FiberSet can be used to store a collection of fibers.
* When the associated Scope is closed, all fibers in the set will be interrupted.
*
* You can add fibers to the set using `FiberSet.add` or `FiberSet.run`, and the fibers will
* be automatically removed from the FiberSet when they complete.
*
* @example
* ```ts
* import { Effect, FiberSet } from "effect"
*
* Effect.gen(function*() {
* const set = yield* FiberSet.make()
*
* // run some effects and add the fibers to the set
* yield* FiberSet.run(set, Effect.never)
* yield* FiberSet.run(set, Effect.never)
*
* yield* Effect.sleep(1000)
* }).pipe(
* Effect.scoped // The fibers will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories constructors
*/
export declare const make: <A = unknown, E = unknown>() => Effect.Effect<FiberSet<A, E>, never, Scope.Scope>;
/**
* Create an Effect run function that is backed by a FiberSet.
*
* @since 2.0.0
* @categories constructors
*/
export declare const makeRuntime: <R = never, A = unknown, E = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions | undefined) => Fiber.RuntimeFiber<XA, XE>), never, Scope.Scope | R>;
/**
* Create an Effect run function that is backed by a FiberSet.
*
* @since 3.13.0
* @categories constructors
*/
export declare const makeRuntimePromise: <R = never, A = unknown, E = unknown>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions | undefined) => Promise<XA>), never, Scope.Scope | R>;
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
export declare const unsafeAdd: {
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): (self: FiberSet<A, E>) => void;
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(self: FiberSet<A, E>, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly interruptAs?: FiberId.FiberId | undefined;
readonly propagateInterruption?: boolean | undefined;
} | undefined): void;
};
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
export declare const add: {
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly propagateInterruption?: boolean | undefined;
} | undefined): (self: FiberSet<A, E>) => Effect.Effect<void>;
/**
* Add a fiber to the FiberSet. When the fiber completes, it will be removed.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, XE extends E, XA extends A>(self: FiberSet<A, E>, fiber: Fiber.RuntimeFiber<XA, XE>, options?: {
readonly propagateInterruption?: boolean | undefined;
} | undefined): Effect.Effect<void>;
};
/**
* @since 2.0.0
* @categories combinators
*/
export declare const clear: <A, E>(self: FiberSet<A, E>) => Effect.Effect<void>;
/**
* Fork an Effect and add the forked fiber to the FiberSet.
* When the fiber completes, it will be removed from the FiberSet.
*
* @since 2.0.0
* @categories combinators
*/
export declare const run: {
/**
* Fork an Effect and add the forked fiber to the FiberSet.
* When the fiber completes, it will be removed from the FiberSet.
*
* @since 2.0.0
* @categories combinators
*/
<A, E>(self: FiberSet<A, E>, options?: {
readonly propagateInterruption?: boolean | undefined;
} | undefined): <R, XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>) => Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
/**
* Fork an Effect and add the forked fiber to the FiberSet.
* When the fiber completes, it will be removed from the FiberSet.
*
* @since 2.0.0
* @categories combinators
*/
<A, E, R, XE extends E, XA extends A>(self: FiberSet<A, E>, effect: Effect.Effect<XA, XE, R>, options?: {
readonly propagateInterruption?: boolean | undefined;
} | undefined): Effect.Effect<Fiber.RuntimeFiber<XA, XE>, never, R>;
};
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet.
*
* @example
* ```ts
* import { Context, Effect, FiberSet } from "effect"
*
* interface Users {
* readonly _: unique symbol
* }
* const Users = Context.GenericTag<Users, {
* getAll: Effect.Effect<Array<unknown>>
* }>("Users")
*
* Effect.gen(function*() {
* const set = yield* FiberSet.make()
* const run = yield* FiberSet.runtime(set)<Users>()
*
* // run some effects and add the fibers to the set
* run(Effect.andThen(Users, _ => _.getAll))
* }).pipe(
* Effect.scoped // The fibers will be interrupted when the scope is closed
* )
* ```
*
* @since 2.0.0
* @categories combinators
*/
export declare const runtime: <A, E>(self: FiberSet<A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: Runtime.RunForkOptions & {
readonly propagateInterruption?: boolean | undefined;
} | undefined) => Fiber.RuntimeFiber<XA, XE>), never, R>;
/**
* Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet.
*
* The returned run function will return Promise's.
*
* @since 3.13.0
* @categories combinators
*/
export declare const runtimePromise: <A, E>(self: FiberSet<A, E>) => <R = never>() => Effect.Effect<(<XE extends E, XA extends A>(effect: Effect.Effect<XA, XE, R>, options?: (Runtime.RunForkOptions & {
readonly propagateInterruption?: boolean | undefined;
}) | undefined) => Promise<XA>), never, R>;
/**
* @since 2.0.0
* @categories combinators
*/
export declare const size: <A, E>(self: FiberSet<A, E>) => Effect.Effect<number>;
/**
* Join all fibers in the FiberSet. If any of the Fiber's in the set terminate with a failure,
* the returned Effect will terminate with the first failure that occurred.
*
* @since 2.0.0
* @categories combinators
* @example
* ```ts
* import { Effect, FiberSet } from "effect";
*
* Effect.gen(function* (_) {
* const set = yield* _(FiberSet.make());
* yield* _(FiberSet.add(set, Effect.runFork(Effect.fail("error"))));
*
* // parent fiber will fail with "error"
* yield* _(FiberSet.join(set));
* });
* ```
*/
export declare const join: <A, E>(self: FiberSet<A, E>) => Effect.Effect<void, E>;
/**
* Wait until the fiber set is empty.
*
* @since 3.13.0
* @categories combinators
*/
export declare const awaitEmpty: <A, E>(self: FiberSet<A, E>) => Effect.Effect<void>;
//# sourceMappingURL=FiberSet.d.ts.map

1
_node_modules/effect/dist/dts/FiberSet.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

94
_node_modules/effect/dist/dts/FiberStatus.d.ts generated vendored Normal file
View File

@@ -0,0 +1,94 @@
/**
* @since 2.0.0
*/
import type * as Equal from "./Equal.js";
import type * as FiberId from "./FiberId.js";
import type * as RuntimeFlags from "./RuntimeFlags.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const FiberStatusTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type FiberStatusTypeId = typeof FiberStatusTypeId;
/**
* @since 2.0.0
* @category models
*/
export type FiberStatus = Done | Running | Suspended;
/**
* @since 2.0.0
* @category models
*/
export interface Done extends Equal.Equal {
readonly _tag: "Done";
readonly [FiberStatusTypeId]: FiberStatusTypeId;
}
/**
* @since 2.0.0
* @category models
*/
export interface Running extends Equal.Equal {
readonly _tag: "Running";
readonly [FiberStatusTypeId]: FiberStatusTypeId;
readonly runtimeFlags: RuntimeFlags.RuntimeFlags;
}
/**
* @since 2.0.0
* @category models
*/
export interface Suspended extends Equal.Equal {
readonly _tag: "Suspended";
readonly [FiberStatusTypeId]: FiberStatusTypeId;
readonly runtimeFlags: RuntimeFlags.RuntimeFlags;
readonly blockingOn: FiberId.FiberId;
}
/**
* @since 2.0.0
* @category constructors
*/
export declare const done: FiberStatus;
/**
* @since 2.0.0
* @category constructors
*/
export declare const running: (runtimeFlags: RuntimeFlags.RuntimeFlags) => FiberStatus;
/**
* @since 2.0.0
* @category constructors
*/
export declare const suspended: (runtimeFlags: RuntimeFlags.RuntimeFlags, blockingOn: FiberId.FiberId) => FiberStatus;
/**
* Returns `true` if the specified value is a `FiberStatus`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isFiberStatus: (u: unknown) => u is FiberStatus;
/**
* Returns `true` if the specified `FiberStatus` is `Done`, `false` otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isDone: (self: FiberStatus) => self is Done;
/**
* Returns `true` if the specified `FiberStatus` is `Running`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isRunning: (self: FiberStatus) => self is Running;
/**
* Returns `true` if the specified `FiberStatus` is `Suspended`, `false`
* otherwise.
*
* @since 2.0.0
* @category refinements
*/
export declare const isSuspended: (self: FiberStatus) => self is Suspended;
//# sourceMappingURL=FiberStatus.d.ts.map

1
_node_modules/effect/dist/dts/FiberStatus.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":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AC,YAAY,EAAE,YAAY,CAAC,YAAY,KAAK,WAA8B,CAAA;AAEjG;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,OAAO,KAAK,WAC9E,CAAA;AAEpB;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,WAAoC,CAAA;AAErF;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,IAAI,IAAsB,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,IAAI,OAA4B,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,IAAI,SAAgC,CAAA"}

660
_node_modules/effect/dist/dts/Function.d.ts generated vendored Normal file
View File

@@ -0,0 +1,660 @@
/**
* @since 2.0.0
*/
import type { TypeLambda } from "./HKT.js";
/**
* @category type lambdas
* @since 2.0.0
*/
export interface FunctionTypeLambda extends TypeLambda {
readonly type: (a: this["In"]) => this["Target"];
}
/**
* Tests if a value is a `function`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { isFunction } from "effect/Predicate"
*
* assert.deepStrictEqual(isFunction(isFunction), true)
* assert.deepStrictEqual(isFunction("function"), false)
* ```
*
* @category guards
* @since 2.0.0
*/
export declare const isFunction: (input: unknown) => input is Function;
/**
* Creates a function that can be used in a data-last (aka `pipe`able) or
* data-first style.
*
* The first parameter to `dual` is either the arity of the uncurried function
* or a predicate that determines if the function is being used in a data-first
* or data-last style.
*
* Using the arity is the most common use case, but there are some cases where
* you may want to use a predicate. For example, if you have a function that
* takes an optional argument, you can use a predicate to determine if the
* function is being used in a data-first or data-last style.
*
* You can pass either the arity of the uncurried function or a predicate
* which determines if the function is being used in a data-first or
* data-last style.
*
* **Example** (Using arity to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(2, (self, that) => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using call signatures to define the overloads)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum: {
* (that: number): (self: number) => number
* (self: number, that: number): number
* } = dual(2, (self: number, that: number): number => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using a predicate to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(
* (args) => args.length === 2,
* (self, that) => self + that
* )
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* @since 2.0.0
*/
export declare const dual: {
/**
* Creates a function that can be used in a data-last (aka `pipe`able) or
* data-first style.
*
* The first parameter to `dual` is either the arity of the uncurried function
* or a predicate that determines if the function is being used in a data-first
* or data-last style.
*
* Using the arity is the most common use case, but there are some cases where
* you may want to use a predicate. For example, if you have a function that
* takes an optional argument, you can use a predicate to determine if the
* function is being used in a data-first or data-last style.
*
* You can pass either the arity of the uncurried function or a predicate
* which determines if the function is being used in a data-first or
* data-last style.
*
* **Example** (Using arity to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(2, (self, that) => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using call signatures to define the overloads)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum: {
* (that: number): (self: number) => number
* (self: number, that: number): number
* } = dual(2, (self: number, that: number): number => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using a predicate to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(
* (args) => args.length === 2,
* (self, that) => self + that
* )
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* @since 2.0.0
*/
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(arity: Parameters<DataFirst>["length"], body: DataFirst): DataLast & DataFirst;
/**
* Creates a function that can be used in a data-last (aka `pipe`able) or
* data-first style.
*
* The first parameter to `dual` is either the arity of the uncurried function
* or a predicate that determines if the function is being used in a data-first
* or data-last style.
*
* Using the arity is the most common use case, but there are some cases where
* you may want to use a predicate. For example, if you have a function that
* takes an optional argument, you can use a predicate to determine if the
* function is being used in a data-first or data-last style.
*
* You can pass either the arity of the uncurried function or a predicate
* which determines if the function is being used in a data-first or
* data-last style.
*
* **Example** (Using arity to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(2, (self, that) => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using call signatures to define the overloads)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum: {
* (that: number): (self: number) => number
* (self: number, that: number): number
* } = dual(2, (self: number, that: number): number => self + that)
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* **Example** (Using a predicate to determine data-first or data-last style)
*
* ```ts
* import { dual, pipe } from "effect/Function"
*
* const sum = dual<
* (that: number) => (self: number) => number,
* (self: number, that: number) => number
* >(
* (args) => args.length === 2,
* (self, that) => self + that
* )
*
* console.log(sum(2, 3)) // 5
* console.log(pipe(2, sum(3))) // 5
* ```
*
* @since 2.0.0
*/
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(isDataFirst: (args: IArguments) => boolean, body: DataFirst): DataLast & DataFirst;
};
/**
* Apply a function to given values.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { pipe, apply } from "effect/Function"
* import { length } from "effect/String"
*
* assert.deepStrictEqual(pipe(length, apply("hello")), 5)
* ```
*
* @since 2.0.0
*/
export declare const apply: <A extends ReadonlyArray<unknown>>(...a: A) => <B>(self: (...a: A) => B) => B;
/**
* A lazy argument.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { LazyArg, constant } from "effect/Function"
*
* const constNull: LazyArg<null> = constant(null)
* ```
*
* @since 2.0.0
*/
export interface LazyArg<A> {
(): A;
}
/**
* @example
* ```ts
* import * as assert from "node:assert"
* import { FunctionN } from "effect/Function"
*
* const sum: FunctionN<[number, number], number> = (a, b) => a + b
* ```
*
* @since 2.0.0
*/
export interface FunctionN<A extends ReadonlyArray<unknown>, B> {
(...args: A): B;
}
/**
* The identity function, i.e. A function that returns its input argument.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { identity } from "effect/Function"
*
* assert.deepStrictEqual(identity(5), 5)
* ```
*
* @since 2.0.0
*/
export declare const identity: <A>(a: A) => A;
/**
* A function that ensures that the type of an expression matches some type,
* without changing the resulting type of that expression.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { satisfies } from "effect/Function"
*
* const test1 = satisfies<number>()(5 as const)
* //^? const test: 5
* // @ts-expect-error
* const test2 = satisfies<string>()(5)
* //^? Argument of type 'number' is not assignable to parameter of type 'string'
*
* assert.deepStrictEqual(satisfies<number>()(5), 5)
* ```
*
* @since 2.0.0
*/
export declare const satisfies: <A>() => <B extends A>(b: B) => B;
/**
* Casts the result to the specified type.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { unsafeCoerce, identity } from "effect/Function"
*
* assert.deepStrictEqual(unsafeCoerce, identity)
* ```
*
* @since 2.0.0
*/
export declare const unsafeCoerce: <A, B>(a: A) => B;
/**
* Creates a constant value that never changes.
*
* This is useful when you want to pass a value to a higher-order function (a function that takes another function as its argument)
* and want that inner function to always use the same value, no matter how many times it is called.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constant } from "effect/Function"
*
* const constNull = constant(null)
*
* assert.deepStrictEqual(constNull(), null)
* assert.deepStrictEqual(constNull(), null)
* ```
*
* @since 2.0.0
*/
export declare const constant: <A>(value: A) => LazyArg<A>;
/**
* A thunk that returns always `true`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constTrue } from "effect/Function"
*
* assert.deepStrictEqual(constTrue(), true)
* ```
*
* @since 2.0.0
*/
export declare const constTrue: LazyArg<boolean>;
/**
* A thunk that returns always `false`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constFalse } from "effect/Function"
*
* assert.deepStrictEqual(constFalse(), false)
* ```
*
* @since 2.0.0
*/
export declare const constFalse: LazyArg<boolean>;
/**
* A thunk that returns always `null`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constNull } from "effect/Function"
*
* assert.deepStrictEqual(constNull(), null)
* ```
*
* @since 2.0.0
*/
export declare const constNull: LazyArg<null>;
/**
* A thunk that returns always `undefined`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constUndefined } from "effect/Function"
*
* assert.deepStrictEqual(constUndefined(), undefined)
* ```
*
* @since 2.0.0
*/
export declare const constUndefined: LazyArg<undefined>;
/**
* A thunk that returns always `void`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { constVoid } from "effect/Function"
*
* assert.deepStrictEqual(constVoid(), undefined)
* ```
*
* @since 2.0.0
*/
export declare const constVoid: LazyArg<void>;
/**
* Reverses the order of arguments for a curried function.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { flip } from "effect/Function"
*
* const f = (a: number) => (b: string) => a - b.length
*
* assert.deepStrictEqual(flip(f)('aaa')(2), -1)
* ```
*
* @since 2.0.0
*/
export declare const flip: <A extends Array<unknown>, B extends Array<unknown>, C>(f: (...a: A) => (...b: B) => C) => (...b: B) => (...a: A) => C;
/**
* Composes two functions, `ab` and `bc` into a single function that takes in an argument `a` of type `A` and returns a result of type `C`.
* The result is obtained by first applying the `ab` function to `a` and then applying the `bc` function to the result of `ab`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { compose } from "effect/Function"
*
* const increment = (n: number) => n + 1;
* const square = (n: number) => n * n;
*
* assert.strictEqual(compose(increment, square)(2), 9);
* ```
*
* @since 2.0.0
*/
export declare const compose: {
/**
* Composes two functions, `ab` and `bc` into a single function that takes in an argument `a` of type `A` and returns a result of type `C`.
* The result is obtained by first applying the `ab` function to `a` and then applying the `bc` function to the result of `ab`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { compose } from "effect/Function"
*
* const increment = (n: number) => n + 1;
* const square = (n: number) => n * n;
*
* assert.strictEqual(compose(increment, square)(2), 9);
* ```
*
* @since 2.0.0
*/
<B, C>(bc: (b: B) => C): <A>(self: (a: A) => B) => (a: A) => C;
/**
* Composes two functions, `ab` and `bc` into a single function that takes in an argument `a` of type `A` and returns a result of type `C`.
* The result is obtained by first applying the `ab` function to `a` and then applying the `bc` function to the result of `ab`.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { compose } from "effect/Function"
*
* const increment = (n: number) => n + 1;
* const square = (n: number) => n * n;
*
* assert.strictEqual(compose(increment, square)(2), 9);
* ```
*
* @since 2.0.0
*/
<A, B, C>(self: (a: A) => B, bc: (b: B) => C): (a: A) => C;
};
/**
* The `absurd` function is a stub for cases where a value of type `never` is encountered in your code,
* meaning that it should be impossible for this code to be executed.
*
* This function is particularly useful when it's necessary to specify that certain cases are impossible.
*
* @since 2.0.0
*/
export declare const absurd: <A>(_: never) => A;
/**
* Creates a version of this function: instead of `n` arguments, it accepts a single tuple argument.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { tupled } from "effect/Function"
*
* const sumTupled = tupled((x: number, y: number): number => x + y)
*
* assert.deepStrictEqual(sumTupled([1, 2]), 3)
* ```
*
* @since 2.0.0
*/
export declare const tupled: <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => B) => (a: A) => B;
/**
* Inverse function of `tupled`
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { untupled } from "effect/Function"
*
* const getFirst = untupled(<A, B>(tuple: [A, B]): A => tuple[0])
*
* assert.deepStrictEqual(getFirst(1, 2), 1)
* ```
*
* @since 2.0.0
*/
export declare const untupled: <A extends ReadonlyArray<unknown>, B>(f: (a: A) => B) => (...a: A) => B;
/**
* Pipes the value of an expression into a pipeline of functions.
*
* **Details**
*
* The `pipe` function is a utility that allows us to compose functions in a
* readable and sequential manner. It takes the output of one function and
* passes it as the input to the next function in the pipeline. This enables us
* to build complex transformations by chaining multiple functions together.
*
* ```ts skip-type-checking
* import { pipe } from "effect"
*
* const result = pipe(input, func1, func2, ..., funcN)
* ```
*
* In this syntax, `input` is the initial value, and `func1`, `func2`, ...,
* `funcN` are the functions to be applied in sequence. The result of each
* function becomes the input for the next function, and the final result is
* returned.
*
* Here's an illustration of how `pipe` works:
*
* ```
* ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌────────┐
* │ input │───►│ func1 │───►│ func2 │───►│ ... │───►│ funcN │───►│ result │
* └───────┘ └───────┘ └───────┘ └───────┘ └───────┘ └────────┘
* ```
*
* It's important to note that functions passed to `pipe` must have a **single
* argument** because they are only called with a single argument.
*
* **When to Use**
*
* This is useful in combination with data-last functions as a simulation of
* methods:
*
* ```ts skip-type-checking
* as.map(f).filter(g)
* ```
*
* becomes:
*
* ```ts skip-type-checking
* import { pipe, Array } from "effect"
*
* pipe(as, Array.map(f), Array.filter(g))
* ```
*
* **Example** (Chaining Arithmetic Operations)
*
* ```ts
* import { pipe } from "effect"
*
* // Define simple arithmetic operations
* const increment = (x: number) => x + 1
* const double = (x: number) => x * 2
* const subtractTen = (x: number) => x - 10
*
* // Sequentially apply these operations using `pipe`
* const result = pipe(5, increment, double, subtractTen)
*
* console.log(result)
* // Output: 2
* ```
*
* @since 2.0.0
*/
export declare function pipe<A>(a: A): A;
export declare function pipe<A, B = never>(a: A, ab: (a: A) => B): B;
export declare function pipe<A, B = never, C = never>(a: A, ab: (a: A) => B, bc: (b: B) => C): C;
export declare function pipe<A, B = never, C = never, D = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D): D;
export declare function pipe<A, B = never, C = never, D = never, E = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E): E;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F): F;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G): G;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H): H;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I): I;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J): J;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K): K;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L): L;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M): M;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N): N;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O): O;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P): P;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q): Q;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R): R;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S): S;
export declare function pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T): T;
/**
* Performs left-to-right function composition. The first argument may have any arity, the remaining arguments must be unary.
*
* See also [`pipe`](#pipe).
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { flow } from "effect/Function"
*
* const len = (s: string): number => s.length
* const double = (n: number): number => n * 2
*
* const f = flow(len, double)
*
* assert.strictEqual(f('aaa'), 6)
* ```
*
* @since 2.0.0
*/
export declare function flow<A extends ReadonlyArray<unknown>, B = never>(ab: (...a: A) => B): (...a: A) => B;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never>(ab: (...a: A) => B, bc: (b: B) => C): (...a: A) => C;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D): (...a: A) => D;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E): (...a: A) => E;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never, F = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F): (...a: A) => F;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never, F = never, G = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G): (...a: A) => G;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H): (...a: A) => H;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I): (...a: A) => I;
export declare function flow<A extends ReadonlyArray<unknown>, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(ab: (...a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J): (...a: A) => J;
/**
* Type hole simulation.
*
* @since 2.0.0
*/
export declare const hole: <T>() => T;
/**
* The SK combinator, also known as the "S-K combinator" or "S-combinator", is a fundamental combinator in the
* lambda calculus and the SKI combinator calculus.
*
* This function is useful for discarding the first argument passed to it and returning the second argument.
*
* @example
* ```ts
* import * as assert from "node:assert"
* import { SK } from "effect/Function";
*
* assert.deepStrictEqual(SK(0, "hello"), "hello")
* ```
*
* @since 2.0.0
*/
export declare const SK: <A, B>(_: A, b: B) => B;
//# sourceMappingURL=Function.d.ts.map

1
_node_modules/effect/dist/dts/Function.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

25
_node_modules/effect/dist/dts/GlobalValue.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
/**
* Retrieves or computes a global value associated with the given `id`. If the value for this `id`
* has already been computed, it will be returned from the global store. If it does not exist yet,
* the provided `compute` function will be executed to compute the value, store it, and then return it.
*
* This ensures that even in cases where the module is imported multiple times (e.g., in mixed environments
* like CommonJS and ESM, or during hot-reloading in development), the value is computed only once and reused
* thereafter.
*
* @example
* ```ts
* import { globalValue } from "effect/GlobalValue"
*
* // This cache will persist as long as the module is running,
* // even if reloaded or imported elsewhere
* const myCache = globalValue(
* Symbol.for("myCache"),
* () => new WeakMap<object, number>()
* )
* ```
*
* @since 2.0.0
*/
export declare const globalValue: <A>(id: unknown, compute: () => A) => A;
//# sourceMappingURL=GlobalValue.d.ts.map

1
_node_modules/effect/dist/dts/GlobalValue.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"GlobalValue.d.ts","sourceRoot":"","sources":["../../src/GlobalValue.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,IAAI,OAAO,EAAE,SAAS,MAAM,CAAC,KAAG,CAW9D,CAAA"}

1652
_node_modules/effect/dist/dts/Graph.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
_node_modules/effect/dist/dts/Graph.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

125
_node_modules/effect/dist/dts/GroupBy.d.ts generated vendored Normal file
View File

@@ -0,0 +1,125 @@
import type { Pipeable } from "./Pipeable.js";
import type { Predicate } from "./Predicate.js";
import type * as Queue from "./Queue.js";
import type * as Stream from "./Stream.js";
import type * as Take from "./Take.js";
import type { Covariant, NoInfer } from "./Types.js";
/**
* @since 2.0.0
* @category symbols
*/
export declare const GroupByTypeId: unique symbol;
/**
* @since 2.0.0
* @category symbols
*/
export type GroupByTypeId = typeof GroupByTypeId;
/**
* Representation of a grouped stream. This allows to filter which groups will
* be processed. Once this is applied all groups will be processed in parallel
* and the results will be merged in arbitrary order.
*
* @since 2.0.0
* @category models
*/
export interface GroupBy<out K, out V, out E = never, out R = never> extends GroupBy.Variance<K, V, E, R>, Pipeable {
readonly grouped: Stream.Stream<readonly [K, Queue.Dequeue<Take.Take<V, E>>], E, R>;
}
/**
* @since 2.0.0
*/
export declare namespace GroupBy {
/**
* @since 2.0.0
* @category models
*/
interface Variance<out K, out V, out E, out R> {
readonly [GroupByTypeId]: {
readonly _K: Covariant<K>;
readonly _V: Covariant<V>;
readonly _E: Covariant<E>;
readonly _R: Covariant<R>;
};
}
}
/**
* Run the function across all groups, collecting the results in an
* arbitrary order.
*
* @since 2.0.0
* @category destructors
*/
export declare const evaluate: {
/**
* Run the function across all groups, collecting the results in an
* arbitrary order.
*
* @since 2.0.0
* @category destructors
*/
<K, V, E, A, E2, R2>(f: (key: K, stream: Stream.Stream<V, E, never>) => Stream.Stream<A, E2, R2>, options?: {
readonly bufferSize?: number | undefined;
} | undefined): <R>(self: GroupBy<K, V, E, R>) => Stream.Stream<A, E | E2, R2 | R>;
/**
* Run the function across all groups, collecting the results in an
* arbitrary order.
*
* @since 2.0.0
* @category destructors
*/
<K, V, E, R, A, E2, R2>(self: GroupBy<K, V, E, R>, f: (key: K, stream: Stream.Stream<V, E, never>) => Stream.Stream<A, E2, R2>, options?: {
readonly bufferSize?: number | undefined;
} | undefined): Stream.Stream<A, E | E2, R | R2>;
};
/**
* Filter the groups to be processed.
*
* @since 2.0.0
* @category utils
*/
export declare const filter: {
/**
* Filter the groups to be processed.
*
* @since 2.0.0
* @category utils
*/
<K>(predicate: Predicate<NoInfer<K>>): <V, E, R>(self: GroupBy<K, V, E, R>) => GroupBy<K, V, E, R>;
/**
* Filter the groups to be processed.
*
* @since 2.0.0
* @category utils
*/
<K, V, E, R>(self: GroupBy<K, V, E, R>, predicate: Predicate<K>): GroupBy<K, V, E, R>;
};
/**
* Only consider the first `n` groups found in the `Stream`.
*
* @since 2.0.0
* @category utils
*/
export declare const first: {
/**
* Only consider the first `n` groups found in the `Stream`.
*
* @since 2.0.0
* @category utils
*/
(n: number): <K, V, E, R>(self: GroupBy<K, V, E, R>) => GroupBy<K, V, E, R>;
/**
* Only consider the first `n` groups found in the `Stream`.
*
* @since 2.0.0
* @category utils
*/
<K, V, E, R>(self: GroupBy<K, V, E, R>, n: number): GroupBy<K, V, E, R>;
};
/**
* Constructs a `GroupBy` from a `Stream`.
*
* @since 2.0.0
* @category constructors
*/
export declare const make: <K, V, E, R>(grouped: Stream.Stream<readonly [K, Queue.Dequeue<Take.Take<V, E>>], E, R>) => GroupBy<K, V, E, R>;
//# sourceMappingURL=GroupBy.d.ts.map

1
_node_modules/effect/dist/dts/GroupBy.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1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AAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CACvD,CAAA;AAElB;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KACvE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAiB,CAAA"}

41
_node_modules/effect/dist/dts/HKT.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
/**
* @since 2.0.0
*/
import type * as Types from "./Types.js";
/**
* @since 2.0.0
*/
export declare const URI: unique symbol;
/**
* @since 2.0.0
*/
export interface TypeClass<F extends TypeLambda> {
readonly [URI]?: F;
}
/**
* @since 2.0.0
*/
export interface TypeLambda {
readonly In: unknown;
readonly Out2: unknown;
readonly Out1: unknown;
readonly Target: unknown;
}
/**
* @since 2.0.0
*/
export type Kind<F extends TypeLambda, In, Out2, Out1, Target> = F extends {
readonly type: unknown;
} ? (F & {
readonly In: In;
readonly Out2: Out2;
readonly Out1: Out1;
readonly Target: Target;
})["type"] : {
readonly F: F;
readonly In: Types.Contravariant<In>;
readonly Out2: Types.Covariant<Out2>;
readonly Out1: Types.Covariant<Out1>;
readonly Target: Types.Invariant<Target>;
};
//# sourceMappingURL=HKT.d.ts.map

1
_node_modules/effect/dist/dts/HKT.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"HKT.d.ts","sourceRoot":"","sources":["../../src/HKT.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH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dist/dts/Hash.d.ts generated vendored Normal file
View File

@@ -0,0 +1,79 @@
/**
* @since 2.0.0
* @category symbols
*/
export declare const symbol: unique symbol;
/**
* @since 2.0.0
* @category models
*/
export interface Hash {
[symbol](): number;
}
/**
* @since 2.0.0
* @category hashing
*/
export declare const hash: <A>(self: A) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const random: <A extends object>(self: A) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const combine: (b: number) => (self: number) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const optimize: (n: number) => number;
/**
* @since 2.0.0
* @category guards
*/
export declare const isHash: (u: unknown) => u is Hash;
/**
* @since 2.0.0
* @category hashing
*/
export declare const number: (n: number) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const string: (str: string) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const structureKeys: <A extends object>(o: A, keys: ReadonlyArray<keyof A>) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const structure: <A extends object>(o: A) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const array: <A>(arr: ReadonlyArray<A>) => number;
/**
* @since 2.0.0
* @category hashing
*/
export declare const cached: {
/**
* @since 2.0.0
* @category hashing
*/
(self: object): (hash: number) => number;
/**
* @since 2.0.0
* @category hashing
*/
(self: object, hash: number): number;
};
//# sourceMappingURL=Hash.d.ts.map

1
_node_modules/effect/dist/dts/Hash.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Hash.d.ts","sourceRoot":"","sources":["../../src/Hash.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAkC,CAAA;AAE9D;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,MAqClC,CAAA;AAED;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