Everything this package uses off a SecureFields instance, declared
structurally instead of re-exporting the SDK's own class type.
@gr4vy/secure-fields's exports map has no types condition, so naming
its type in an exported declaration makes tsup emit
import { SecureFields } from '@gr4vy/secure-fields' into
dist/index.d.ts — which is a hard TS7016 for any consumer on
moduleResolution: bundler with skipLibCheck: false, and a silent
degradation of instance to any with skipLibCheck: true (the Next
default). That hits every installer of this package, not only Secure Fields
users. The paths override in this package's tsconfig repairs our own
compile; it is monorepo-only and does not ship. Same approach as
ThreeDSecureInstance in threeDSecure.ts.
Members use method syntax deliberately: TypeScript checks method parameters
bivariantly, so the real class's narrower option and event types stay
assignable to the looser ones declared here.
Everything this package uses off a
SecureFieldsinstance, declared structurally instead of re-exporting the SDK's own class type.@gr4vy/secure-fields'sexportsmap has notypescondition, so naming its type in an exported declaration makes tsup emitimport { SecureFields } from '@gr4vy/secure-fields'intodist/index.d.ts— which is a hard TS7016 for any consumer onmoduleResolution: bundlerwithskipLibCheck: false, and a silent degradation ofinstancetoanywithskipLibCheck: true(the Next default). That hits every installer of this package, not only Secure Fields users. Thepathsoverride in this package's tsconfig repairs our own compile; it is monorepo-only and does not ship. Same approach asThreeDSecureInstanceinthreeDSecure.ts.Members use method syntax deliberately: TypeScript checks method parameters bivariantly, so the real class's narrower option and event types stay assignable to the looser ones declared here.