@snap-pay/types
v1.0.0
Published
Shared TypeScript types for the SNAP client-side SDKs (@snap-pay/js, @snap-pay/elements, @snap-pay/react).
Readme
@snap-pay/types
Shared, dependency-free TypeScript definitions used by every SNAP client-side package (@snap-pay/js, @snap-pay/elements, @snap-pay/react).
You usually don't install this directly — it's a transitive dependency of the packages you actually consume. Import types straight from those packages:
import type { Appearance, PaymentResult } from "@snap-pay/js";Why a separate package
Isolating the wire shapes (PublicSession, PaymentResult, the postMessage protocol for the Card iframe, the discriminated SnapSelection union) in their own package means bumping a type shape doesn't force a rebuild of every downstream package that only re-exported it. Downstream consumers pin the same version transitively.
License
MIT
