@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
46 lines (45 loc) • 1.85 kB
TypeScript
/**
* @module Lock
*/
import { type IEventBus } from "../../../../event-bus/contracts/_module.js";
import { type IExecutionContext } from "../../../../execution-context/contracts/_module.js";
import { type ILockAdapter, type LockAdapterVariants, type LockEventMap } from "../../../../lock/contracts/_module.js";
import { Lock, type ISerializedLock } from "../../../../lock/implementations/derivables/lock-factory/lock.js";
import { type Use } from "../../../../middleware/contracts/_module.js";
import { type INamespace } from "../../../../namespace/contracts/_module.js";
import { type ISerdeTransformer } from "../../../../serde/contracts/_module.js";
import { TimeSpan } from "../../../../time-span/implementations/_module.js";
import { type OneOrMore, type WaitUntil } from "../../../../utilities/_module.js";
/**
* @internal
*/
export type LockSerdeTransformerSettings = {
adapter: ILockAdapter;
originalAdapter: LockAdapterVariants;
namespace: INamespace;
defaultRefreshTime: TimeSpan;
eventBus: IEventBus<LockEventMap>;
serdeTransformerName: string;
waitUntil: WaitUntil;
executionContext: IExecutionContext;
use: Use;
};
/**
* @internal
*/
export declare class LockSerdeTransformer implements ISerdeTransformer<Lock, ISerializedLock> {
private readonly adapter;
private readonly originalAdapter;
private readonly namespace;
private readonly defaultRefreshTime;
private readonly eventBus;
private readonly serdeTransformerName;
private readonly waitUntil;
private readonly executionContext;
private readonly use;
constructor(settings: LockSerdeTransformerSettings);
get name(): OneOrMore<string>;
isApplicable(value: unknown): value is Lock;
deserialize(serializedValue: ISerializedLock): Lock;
serialize(deserializedValue: Lock): ISerializedLock;
}