/** * @file Npm.Effect.Internal.ts * @author Gage Sorrell * @copyright (c) 2026 Gage Sorrell * @license MIT */ import type { Path as EffectPath, FileSystem } from "@effect/platform"; import type { PlatformError } from "@effect/platform/Error"; import { Effect } from "effect"; /** * Returns whether a given {@link Value} contains a `readonly` `string` `"code"`. * * @param Value - The value to test. * @returns {Value is { readonly code: string }} Whether {@link Value} is a * `{ readonly code: string }`. */ export declare function HasErrorCode(Value: unknown): Value is { readonly code: string; }; /** * Starting at {@link Directory}, traverse upward until the root directory of a NodeJS package is found, * then return the path to that directory. * * @param Fs - The {@link FileSystem.FileSystem} service. * @param Path - The {@link EffectPath.Path | Path} service. * @param Directory - The path of the directory from which this begins to search. * @returns {Effect.Effect} An {@link Effect.Effect | effect} which * finds the nearest package directory. */ export declare function FindNearestPackageDirectory(Fs: FileSystem.FileSystem, Path: EffectPath.Path, Directory: string): Effect.Effect; /** * Starting at {@link Directory} within a given `npm` package, traverse upward until * the `node_modules` directory containing the dependencies of the given `npm` package is found. * * @param Fs - The {@link FileSystem.FileSystem} service. * @param Path - The {@link EffectPath.Path | Path} service. * @param Directory - The path of the directory from which this begins to search. * @returns {Effect.Effect} An {@link Effect.Effect | effect} which * finds the nearest `node_modules` directory. */ export declare function FindNearestNodeModulesDirectory(Fs: FileSystem.FileSystem, Path: EffectPath.Path, Directory: string): Effect.Effect; /** * For a given {@link Path}, get the {@link FileSystem.File.Type | type} of the object at that path. * * @param Fs - The {@link FileSystem.FileSystem | FileSystem} service. * @param Path - The path whose type is returned by this. * @returns {Effect.Effect} An * {@link Effect.Effect | effect} that finds the {@link FileSystem.File.Type | type} of the * given {@link Path}. */ export declare function GetPathType(Fs: FileSystem.FileSystem, Path: string): Effect.Effect; /** * For a given {@link Directory}, if that directory has a parent directory, then return * the path to the parent directory, otherwise return `undefined`. * * @param Path - The {@link EffectPath.Path | Path} service. * @param Directory - The path of the directory whose parent path is found, if it exists. * @returns {string | undefined} The path of the parent directory of the given {@link Directory}, * if it has a parent directory (otherwise `undefined`). */ export declare function GetParentDirectory(Path: EffectPath.Path, Directory: string): string | undefined; //# sourceMappingURL=Npm.Effect.Internal.d.mts.map