{
  "version": 3,
  "sources": ["../Source/Effect/index.ts", "../Source/Effect/Effect.ts", "../Source/Effect/Platform/index.ts", "../Source/Effect/Platform/Platform.ts"],
  "sourcesContent": ["/**\n * Utilities for using `effect`.  In particular, for defining {@link Effect | effect types}.\n *\n * @module @sorrell/utilities/effect\n */\n/**\n * @file      index.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nimport type { Effect } from \"effect/Effect\";\nexport * from \"./Effect.ts\";\nexport * from \"./Effect.Types.ts\";\nexport * as Platform from \"./Platform/index.ts\";\n", "/**\n * @file      Effect.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\n/* eslint-disable jsdoc/require-example */\nimport type { AnyFunction } from \"../HigherKind/HigherKind.Types.ts\";\nimport { Effect } from \"effect\";\nimport type { TFunction } from \"../Functional/index.ts\";\n/**\n * Transform a given {@link InFunction:param} into a function of the same\n * {@link ArgumentVectorType | argument vector}, such that the transformed\n * function returns a call to {@link Effect.sync}, which calls the given\n * {@link InFunction:param} with the argument vector that is passed when called.\n *\n * @param InFunction - The given function that is called by {@link Effect.sync} when\n * the {@link Effect.Effect | effect} returned by *this* function is yielded.\n *\n * @template ArgumentVectorType - The type of the {@link ArgumentVector} that is used to call\n * the given {@link InFunction:param}.\n *\n * @template ReturnType - The type returned by the given {@link InFunction:param}, which is wrapped\n * into an {@link Effect.Effect | effect}.\n *\n * @returns {TFunction.Safe<ArgumentVectorType, Effect.Effect<ReturnType>>} An {@link Effect.Effect}\n * that returns the value of the original {@link InFunction:param}.  This effect never errors, and has\n * no requirements.\n */\nexport function MakeSyncCallback<ArgumentVectorType extends ReadonlyArray<unknown>, ReturnType>(InFunction: TFunction.Safe<ArgumentVectorType, ReturnType>): TFunction.Safe<ArgumentVectorType, Effect.Effect<ReturnType>>;\n/**\n * Transform a given {@link InFunction:param} into a function of the same argument vector,\n * such that the transformed function returns a call to {@link Effect.sync}, which calls the given\n * {@link InFunction:param} with the argument vector that is passed when called.\n *\n * @param InFunction - The given function that is called by {@link Effect.sync} when\n * the {@link Effect.Effect | effect} returned by *this* function is yielded.\n *\n * @template FunctionType - The type of the given {@link InFunction:param}.  This overload\n * allows you to determine this type (and therefore the type returned by this) via inferring,\n * or via the `typeof` operator with the given {@link InFunction:param}.\n *\n * @returns {TFunction.Safe<ArgumentVectorType, Effect.Effect<ReturnType>>} An {@link Effect.Effect}\n * that returns the value of the original {@link InFunction:param}.  This effect never errors, and has\n * no requirements.\n */\nexport function MakeSyncCallback<FunctionType extends TFunction.Safe<ReadonlyArray<unknown>, unknown>>(InFunction: FunctionType): TFunction.Safe<Parameters<typeof InFunction>, Effect.Effect<ReturnType<typeof InFunction>>>;\nexport function MakeSyncCallback<ArgumentVectorType extends ReadonlyArray<unknown>, ReturnType>(InFunction: TFunction.Safe<ArgumentVectorType, ReturnType>): TFunction.Safe<ArgumentVectorType, Effect.Effect<ReturnType>> {\n    return function (...ArgumentVector: ArgumentVectorType): Effect.Effect<ReturnType> {\n        return MakeSync(InFunction, ...ArgumentVector);\n    };\n}\n/**\n * Wrap a given {@link InFunction:param} with {@link Effect.sync} such that the function is\n * always called with the given {@link ArgumentVector}.\n *\n * @param InFunction - The function to call via {@link Effect.sync}.\n * @param ArgumentVector - The argument vector passed to the given {@link InFunction:param}.\n *\n * @template ArgumentVectorType - The type of the {@link ArgumentVector} that is used to call\n * the given {@link InFunction:param}.\n *\n * @template ReturnType - The type returned by the given {@link InFunction:param}, which is wrapped\n * into an {@link Effect.Effect | effect}.\n *\n * @returns {Effect.Effect<ReturnType>} An {@link Effect.Effect | effect} that returns the\n * result of calling the given {@link InFunction} with the given {@link ArgumentVector}.  It\n * never errors and has no requirements.\n */\nexport function MakeSync<ArgumentVectorType extends ReadonlyArray<unknown>, ReturnType>(InFunction: TFunction.Safe<ArgumentVectorType, ReturnType>, ...ArgumentVector: ArgumentVectorType): Effect.Effect<ReturnType>;\n/**\n * Wrap a given {@link InFunction:param} with {@link Effect.sync} such that the function is\n * always called with the given {@link ArgumentVector}.\n *\n * @param InFunction - The given function that is called by {@link Effect.sync} with the given\n * {@link ArgumentVector} when the {@link Effect.Effect | effect} returned by *this* function is yielded.\n *\n * @param ArgumentVector - The argument vector to pass to the given {@link InFunction | function} when\n * the {@link Effect.Effect | effect} returned by this is yielded.\n *\n * @template FunctionType - The type of the given {@link InFunction:param}.  This overload\n * allows you to determine this type (and therefore the type returned by this) via inferring,\n * or via the `typeof` operator with the given {@link InFunction:param}.\n *\n * @returns {TFunction.Safe<Parameters<typeof InFunction>, Effect.Effect<ReturnType<typeof InFunction>>>}\n * An {@link Effect.Effect}\n * that returns the value of the original {@link InFunction:param}.  This effect never errors, and has\n * no requirements.\n */\nexport function MakeSync<FunctionType extends TFunction.Safe<ReadonlyArray<unknown>, unknown>>(InFunction: FunctionType, ...ArgumentVector: Parameters<typeof InFunction>): Effect.Effect<ReturnType<typeof InFunction>>;\nexport function MakeSync(InFunction: AnyFunction, ...ArgumentVector: ReadonlyArray<unknown>): Effect.Effect<ReturnType<typeof InFunction>> {\n    return Effect.sync((): unknown => InFunction(...(ArgumentVector as Parameters<typeof InFunction>)));\n}\n", "/**\n * Utilities for using {@link https://effect-ts.github.io/effect/docs/platform | \\@effect/platform}.\n *\n * @module @sorrell/utilities/effect/platform\n */\n/**\n * @file      index.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\nexport * from \"./Platform.ts\";\n", "/**\n * @file      Platform.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\nimport { Data } from \"effect\";\nimport type { Kind } from \"../../FileSystem/FileSystem.Types.ts\";\n/**\n * An error in which a given {@link Kind | filesystem object} was expected to exist\n * at a given {@link Path}, but the object was not found.\n *\n * @property {string} Path - The path where an object of the given {@link Kind} was expected,\n * but was not found.\n *\n * @property {Kind} Kind - The kind of object that was expected at the given {@link Path},\n * but was not found.\n */\nexport class PathNotFoundError extends Data.TaggedError(\"PathNotFoundError\")<Readonly<{\n    Path: string;\n    Kind: Kind;\n}>> {\n}\n/**\n * An error in which a {@link Kind | filesystem object} meeting a given\n * {@link Criteria | set of criteria} could not be found.\n *\n * @property {string} LastSearchResult - The last path that was tested when searching for\n * a {@link Kind | filesystem object} of a given {@link Criteria | set of criteria}.\n * but was not found.\n *\n * @property {string} Criteria - A human-readable description of the criteria defining the search\n * from which an error of this type originated.\n *\n * @property {Kind} Kind - The kind of object that was expected at the given {@link Path},\n * but was not found.\n */\nexport class SearchExhaustedError extends Data.TaggedError(\"SearchExhaustedError\")<Readonly<{\n    LastSearchResult?: string;\n    Criteria: string;\n    Kind: Kind;\n}>> {\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACQA,oBAAuB;AAuChB,SAAS,iBAAgF,YAA2H;AACvN,SAAO,YAAa,gBAA+D;AAC/E,WAAO,SAAS,YAAY,GAAG,cAAc;AAAA,EACjD;AACJ;AAuCO,SAAS,SAAS,eAA4B,gBAAsF;AACvI,SAAO,qBAAO,KAAK,MAAe,WAAW,GAAI,cAAgD,CAAC;AACtG;;;AC5FA;AAAA;AAAA;AAAA;AAAA;;;ACMA,IAAAA,iBAAqB;AAYd,IAAM,oBAAN,cAAgC,oBAAK,YAAY,mBAAmB,EAGvE;AACJ;AAeO,IAAM,uBAAN,cAAmC,oBAAK,YAAY,sBAAsB,EAI7E;AACJ;",
  "names": ["import_effect"]
}
