UNPKG

note

Version:
65 lines 2.29 kB
#!/usr/bin/env node /** * CLI entry point for the note command. * * @since 0.1.0 */ import * as Effect from "effect/Effect"; /** * CLI-specific errors with user-friendly messages. * * @since 0.1.0 * @category Errors */ export type NoteError = ExistingArgFile | FileAlreadyExists | WriteError; declare const ExistingArgFile_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "ExistingArgFile"; } & Readonly<A>; /** * Error when an argument matches an existing file in the current directory. * * @since 0.1.0 * @category Errors */ export declare class ExistingArgFile extends ExistingArgFile_base<{ readonly word: string; }> { get message(): string; } declare const FileAlreadyExists_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "FileAlreadyExists"; } & Readonly<A>; /** * Error when the target note file already exists. * * @since 0.1.0 * @category Errors */ export declare class FileAlreadyExists extends FileAlreadyExists_base<{ readonly filename: string; }> { get message(): string; } declare const WriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "WriteError"; } & Readonly<A>; /** * Error when file write fails. * * @since 0.1.0 * @category Errors */ export declare class WriteError extends WriteError_base<{ readonly filename: string; readonly cause: unknown; }> { get message(): string; } /** * Run the CLI with the given arguments. * * @since 0.1.0 */ export declare const run: (args: ReadonlyArray<string>) => Effect.Effect<void, import("@effect/platform/Error").PlatformError | import("@effect/cli/ValidationError").ValidationError, import("@effect/cli/CliApp").CliApp.Environment>; export {}; //# sourceMappingURL=bin.d.ts.map