effect overview
Effect entrypoint: idiomatic Effect API with TaggedError failures.
Added in v0.16.300
Table of contents
utils
ExtensionNotFoundError (class)
Error indicating that the resolved binary path does not exist.
Signature
export declare class ExtensionNotFoundError
Added in v0.16.300
ExtensionPath
Brand constructor for ExtensionPath.
Signature
export declare const ExtensionPath: Brand.Brand.Constructor<ExtensionPath>
Added in v0.16.300
ExtensionPath (type alias)
Branded absolute path to the cr-sqlite binary.
Signature
export type ExtensionPath = string & Brand.Brand<"ExtensionPath">
Added in v0.16.300
Platform (type alias)
Supported platform-arch identifiers.
Signature
export type Platform = _Platform
Added in v0.16.300
PlatformNotSupportedError (class)
Error indicating that a platform-arch combination is not supported.
Signature
export declare class PlatformNotSupportedError
Added in v0.16.300
SUPPORTED_PLATFORMS
List of supported platforms.
Signature
export declare const SUPPORTED_PLATFORMS: readonly _Platform[]
Added in v0.16.300
getCrSqliteExtensionPath
Effect-based absolute path resolution with idiomatic TaggedError failures.
- Succeeds with a branded
ExtensionPathstring. - Fails with
PlatformNotSupportedErrororExtensionNotFoundError.
Signature
export declare const getCrSqliteExtensionPath: (
platform?: Platform
) => Effect.Effect<ExtensionPath, PlatformNotSupportedError | ExtensionNotFoundError>
Example
import { getCrSqliteExtensionPath } from "@effect-native/libcrsql/effect"
import { Effect } from "effect"
const program = getCrSqliteExtensionPath()
Effect.runPromise(program)
Added in v0.16.300