Skip to content

TossPaymentsFor — @gj-kit/toss-payments-nestjs

A public type from @gj-kit/toss-payments-nestjs. The signature below is taken directly from the 0.4.4 release declaration.

import { TossPaymentsFor } from '@gj-kit/toss-payments-nestjs';
/**
* 앱이 조건부 파사드 타입을 보존하는 별칭 헬퍼 (설계 §4.3) — forRootAsync는 런타임
* 토큰 주입이라 kit 타입이 소실되므로, `defineTossPaymentsConfig`로 고정한 config의
* `typeof`에서 kit 타입을 복원한다. 배선 누락 플로우 접근은 주입부에서도 컴파일 에러.
*
* ```ts
* export const tossConfig = defineTossPaymentsConfig({ ... });
* export type AppToss = TossPaymentsFor<typeof tossConfig>;
* ```
*/
type TossPaymentsFor<C extends AnyTossPaymentsConfig> = C extends TossPaymentsApiConfig<infer E> ? TossPaymentsKit<E, 'api', C> : C extends TossPaymentsWidgetConfig<infer E> ? TossPaymentsKit<E, 'widget', C> : never;

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-nestjs
  • Version: 0.4.4
  • Public entry: .
  • Source: GitHub