UNPKG

@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.

42 lines (41 loc) 1.65 kB
/** * @module Lock */ import { type IEventBus } from "../../../../event-bus/contracts/_module.js"; import { type ILockAdapter, type LockAdapterVariants, type LockEventMap } from "../../../../lock/contracts/_module.js"; import { Lock, type ISerializedLock } from "../../../../lock/implementations/derivables/lock-provider/lock.js"; import { type Namespace } from "../../../../namespace/_module.js"; import { type ISerdeTransformer } from "../../../../serde/contracts/_module.js"; import { TimeSpan } from "../../../../time-span/implementations/_module.js"; import { type OneOrMore } from "../../../../utilities/_module.js"; /** * @internal */ export type LockSerdeTransformerSettings = { adapter: ILockAdapter; originalAdapter: LockAdapterVariants; namespace: Namespace; defaultBlockingInterval: TimeSpan; defaultBlockingTime: TimeSpan; defaultRefreshTime: TimeSpan; eventBus: IEventBus<LockEventMap>; serdeTransformerName: string; }; /** * @internal */ export declare class LockSerdeTransformer implements ISerdeTransformer<Lock, ISerializedLock> { private readonly adapter; private readonly originalAdapter; private readonly namespace; private readonly defaultBlockingInterval; private readonly defaultBlockingTime; private readonly defaultRefreshTime; private readonly eventBus; private readonly serdeTransformerName; constructor(settings: LockSerdeTransformerSettings); get name(): OneOrMore<string>; isApplicable(value: unknown): value is Lock; deserialize(serializedValue: ISerializedLock): Lock; serialize(deserializedValue: Lock): ISerializedLock; }