tasra-sdk/app/node
Generated from public TypeScript exports.
SDK reference · Task guides · Errors
Classes
Section titled “Classes”Clients, adapters and error classes.
Browse 1 classes
StoreLockedError
Section titled “StoreLockedError”A state lock is already held and requires reconciliation before manual removal.
Import: import {StoreLockedError} from 'tasra-sdk/app/node'
declare class StoreLockedError { constructor(key: string);}-
readonly key: string;— Store entry whose exclusive lock could not be acquired. -
readonly retryable: boolean;—falsewhen retrying the identical request cannot succeed. -
name: string; -
message: string; -
stack?: string; -
cause?: unknown;
Functions
Section titled “Functions”Operations you can import and call.
Browse 1 functions
createFileStore
Section titled “createFileStore”The directory is private, trusted application state, not an untrusted shared folder.
Import: import {createFileStore} from 'tasra-sdk/app/node'
declare function createFileStore(directory: string): ApplicationStore;| Parameter | Type | Description |
|---|---|---|
directory |
string |
Private application state directory owned by the current operating-system user. |
Returns: ApplicationStore.
Options, data structures and return types.
Browse 1 types
ApplicationStore
Section titled “ApplicationStore”Durable private state storage with exclusive locking for each named operation.
export interface ApplicationStore { load<T>(key: string): Promise<T | undefined>; save<T>(key: string, value: T): Promise<void>; withLock<T>(key: string, action: () => Promise<T>): Promise<T>;}Fields:
load: Load a saved value, or return undefined when the key does not exist.save: Atomically persist private state before resolving.withLock: Exclusively serialize work for the key across all participating processes or tabs.
