<
const ScopeKey extends string | StoreScopeTag,
const C extends StoreContractValue
>(
scope: ScopeKey,
contract: C
): StandaloneStore<
{ readonly _tag: ScopeKeyOf<ScopeKey> },
`hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`,
ScopeKeyOf<ScopeKey>,
C,
ScopeKey extends StoreScopeTag ? ScopeKey : undefined
>Standalone store for one scope — class with layerMemory / layer({ filename? }) like
Service, but single-scope.
constructorsService
Source src/Store.ts:155423 lines
export const const scoped: <
const ScopeKey extends string | StoreScopeTag,
const C extends StoreContractValue
>(
scope: ScopeKey,
contract: C
) => StandaloneStore<
{
readonly _tag: ScopeKeyOf<ScopeKey>
},
`hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`,
ScopeKeyOf<ScopeKey>,
C,
ScopeKey extends StoreScopeTag
? ScopeKey
: undefined
>
Standalone store for one scope — class with layerMemory / layer({ filename? }) like
Service
, but single-scope.
scoped = <
const function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey extends string | import StoreScopeTagStoreScopeTag,
const function (type parameter) C in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
C extends import StoreContractValueStoreContractValue,
>(
scope: const ScopeKey extends string | StoreScopeTagscope: function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey,
contract: const C extends StoreContractValuecontract: function (type parameter) C in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
C,
): type StandaloneStore<
Self,
Id extends string,
K extends string = string,
C extends StoreContractValue = StoreContractValue,
Tag extends
| StoreScopeTag
| undefined = undefined
> = any
Standalone single-scope store class with attached
Storage
layers.
StandaloneStore<
{ readonly _tag: ScopeKeyOf<ScopeKey>_tag: import ScopeKeyOfScopeKeyOf<function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey> },
`hyperlink-ts/Store/scope/${import ScopeKeyOfScopeKeyOf<function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey>}`,
import ScopeKeyOfScopeKeyOf<function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey>,
function (type parameter) C in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
C,
function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey extends import StoreScopeTagStoreScopeTag ? function (type parameter) ScopeKey in <const ScopeKey extends string | StoreScopeTag, const C extends StoreContractValue>(scope: ScopeKey, contract: C): StandaloneStore<{
readonly _tag: ScopeKeyOf<ScopeKey>;
}, `hyperlink-ts/Store/scope/${ScopeKeyOf<ScopeKey>}`, ScopeKeyOf<ScopeKey>, C, ScopeKey extends StoreScopeTag ? ScopeKey : undefined>
ScopeKey : undefined
> => {
const const standaloneClass: anystandaloneClass = import defineStandaloneStoredefineStandaloneStore(scope: const ScopeKey extends string | StoreScopeTagscope, contract: const C extends StoreContractValuecontract);
const const registration: anyregistration = import buildStandaloneRegistrationbuildStandaloneRegistration(scope: const ScopeKey extends string | StoreScopeTagscope, contract: const C extends StoreContractValuecontract);
const const layerMemory: Layer.Layer<
any,
never,
never
>
const layerMemory: {
build: (memoMap: Layer.MemoMap, scope: Scope.Scope) => Effect.Effect<Context.Context<any>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
layerMemory = const buildStandaloneMemoryLayer: <
Self,
Id extends string,
C extends StoreContractValue
>(
tag: Context.ServiceClass<
Self,
Id,
StoreHandleFromContract<C>
>,
registration: NormalizedStoreRegistration
) => Layer.Layer<Self | Storage | LogRelay>
buildStandaloneMemoryLayer(const standaloneClass: anystandaloneClass, const registration: anyregistration);
const const layer: (
options: StoreLayerOptions
) => Layer.Layer<
any,
StoreSqliteConnectionError,
Scope.Scope
>
layer = (options: StoreLayerOptionsoptions: import StoreLayerOptionsStoreLayerOptions) =>
const buildStandaloneSqliteLayer: <
Self,
Id extends string,
C extends StoreContractValue
>(
tag: Context.ServiceClass<
Self,
Id,
StoreHandleFromContract<C>
>,
registration: NormalizedStoreRegistration,
filename: string
) => Layer.Layer<
Self | Storage | LogRelay,
StoreSqliteConnectionError,
Scope.Scope
>
buildStandaloneSqliteLayer(const standaloneClass: anystandaloneClass, const registration: anyregistration, options: StoreLayerOptionsoptions.filename);
return var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<any, {
layerMemory: Layer.Layer<any, never, never>;
layer: (options: StoreLayerOptions) => Layer.Layer<any, StoreSqliteConnectionError, Scope.Scope>;
}>(target: any, source: {
layerMemory: Layer.Layer<any, never, never>;
layer: (options: StoreLayerOptions) => Layer.Layer<any, StoreSqliteConnectionError, Scope.Scope>;
}): any (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(const standaloneClass: anystandaloneClass, {
layerMemory: Layer.Layer<any, never, never>(property) layerMemory: {
build: (memoMap: Layer.MemoMap, scope: Scope.Scope) => Effect.Effect<Context.Context<any>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
layerMemory,
layer: (
options: StoreLayerOptions
) => Layer.Layer<
any,
StoreSqliteConnectionError,
Scope.Scope
>
layer,
});
};