Skip to content

createTossEvents — @gj-kit/toss-payments

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

import { createTossEvents } from '@gj-kit/toss-payments/server';
/**
* 이벤트 버스 생성 — 각 배선 지점(TossClientOptions.events 등)에 주입한다.
*
* ⚠ 발행은 createTossEvents 산출물에만 흐른다 — 구조적으로 흉내 낸 사용자 객체를 주입하면
* 구독 표면으로는 동작하지 않고 발행 지점이 조용히 no-op이 된다(내부 emit 계층 부재).
*/
declare function createTossEvents(options?: {
/** 핸들러 예외 통지. 기본 무시 — 이 콜백의 throw도 삼켜진다. */
readonly onHandlerError?: (info: {
readonly type: TossEventName;
readonly cause: unknown;
}) => void;
}): TossEvents;

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: ./server
  • Source: GitHub