Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #217 from launchdarkly/eb/ch108418/fix-caching-sto…
Browse files Browse the repository at this point in the history
…re-wrapper-intf

fix TS export of CachingStoreWrapper
  • Loading branch information
eli-darkly authored Jul 19, 2021
2 parents 393c631 + 042ecc1 commit ed7ddf3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
42 changes: 31 additions & 11 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1671,18 +1671,38 @@ declare module 'launchdarkly-node-server-sdk/requestor' {
import { PersistentDataStore, PersistentDataStoreNonAtomic } from 'launchdarkly-node-server-sdk/interfaces';

/**
* Creates a feature store implementation with standard caching behavior for a persistent store.
*
* @param storeImplementation internal implementation object for a specific database type
* @param ttl cache TTL in seconds, or 0 for no caching
* @param description name of the database
* @returns the decorated store implementation
* A base feature store implementation used by database integrations.
*/
export default function CachingStoreWrapper(
storeImplementation: PersistentDataStore | PersistentDataStoreNonAtomic,
ttl: number,
description: string
): LDFeatureStore;
class CachingStoreWrapper implements LDFeatureStore
{
/**
* Creates a feature store implementation with standard caching behavior for a persistent store.
*
* @param storeImplementation internal implementation object for a specific database type
* @param ttl cache TTL in seconds, or 0 for no caching
* @param description name of the database
*/
public constructor(
storeImplementation: PersistentDataStore | PersistentDataStoreNonAtomic,
ttl: number,
description: string
);

public get(kind: object, key: string, callback: (res: object) => void): void;

public all(kind: object, callback: (res: object) => void): void;

public init(allData: object, callback: () => void): void;

public delete(kind: object, key: string, version: string, callback: () => void): void;

public upsert(kind: object, data: object, callback: () => void): void;

public initialized(callback: (isInitialized: boolean) => void): void;

public close(): void;
}
export = CachingStoreWrapper;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "launchdarkly-node-server-sdk",
"version": "6.2.0-alpha.bigsegments.4",
"version": "6.2.0-alpha.bigsegments.5",
"description": "LaunchDarkly Server-Side SDK for Node.js",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ed7ddf3

Please sign in to comment.