@magnetarjs/types
Version:
Magnetar shared types
36 lines (35 loc) • 1.69 kB
TypeScript
import { ModuleConfig } from './config.js';
export declare const MODULE_IDENTIFIER_SPLIT = " /// ";
/**
* Saved as enum, just to enforce usage of `getPathFilterIdentifier()`
*/
export declare enum PathFilterIdentifier {
'KEY' = "modulePath + JSON.stringify({ query, where, orderBy, startAfter, limit })"
}
/**
* Creates the `key` for the Maps used to cache certain values throughout the lifecycle of an instance.
* @returns `modulePath + ' /// ' + JSON.stringify({ query, where, orderBy, startAfter, limit })`
*/
export declare function getPathFilterIdentifier(modulePath: string, moduleConfig: ModuleConfig): PathFilterIdentifier;
/**
* Saved as enum, just to enforce usage of `getPathWhereOrderByIdentifier()`
*/
export declare enum PathWhereOrderByIdentifier {
'KEY' = "modulePath + JSON.stringify({ query, where, orderBy })"
}
/**
* Creates the `key` for the Maps used to cache the FetchMetaDataCollection throughout the lifecycle of an instance.
* @returns `modulePath + ' /// ' + JSON.stringify({ query, where, orderBy })`
*/
export declare function getPathWhereOrderByIdentifier(modulePath: string, moduleConfig: ModuleConfig): PathWhereOrderByIdentifier;
/**
* Saved as enum, just to enforce usage of `getPathWhereIdentifier()`
*/
export declare enum PathWhereIdentifier {
'KEY' = "modulePath + JSON.stringify({ query, where, orderBy })"
}
/**
* Creates the `key` for the Maps used to cache the FetchMetaDataCollection throughout the lifecycle of an instance.
* @returns `modulePath + ' /// ' + JSON.stringify({ query, where, orderBy })`
*/
export declare function getPathWhereIdentifier(modulePath: string, moduleConfig: ModuleConfig): PathWhereIdentifier;