Skip to content

memoryDedupeStore — @gj-kit/toss-payments

A public function from @gj-kit/toss-payments/testing. The signature below is taken directly from the 0.6.1 release declaration.

import { memoryDedupeStore } from '@gj-kit/toss-payments/testing';
/**
* 인메모리 dedupe — 단일 프로세스 한정. 분산 환경은 Redis `SET NX` 등으로 대체할 것.
*
* `stateOf` answers "what state is this key in right now?" without the side effect a probing
* `claim()` has (a claim after `release` would re-occupy the key as `processing` and poison
* later assertions). `undefined` means the key is unknown or was released — i.e. claimable.
*/
declare function memoryDedupeStore(): WebhookDedupeStore & {
stateOf(dedupeKey: string): 'processing' | 'completed' | undefined;
};

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/toss-payments
  • Version: 0.6.1
  • Public entry: ./testing
  • Source: GitHub