Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license

This commit is contained in:
2026-09-05 13:26:46 +03:00
commit 03634b1ca3
11340 changed files with 3442369 additions and 0 deletions
@@ -0,0 +1,24 @@
/**
* Compile-time guard for BillingPaymentMethod.
*
* There is nothing to run here — the point is that `tsc` accepts this file.
* An earlier revision typed the fallback arm's `kind` as `string & {}`, which
* makes the discriminant non-literal and silently defeats narrowing for every
* arm: the `pm.brand` read below stops compiling. Keeping this file honest
* keeps `kind` narrowable.
*/
import type { BillingPaymentMethod } from './billing-types'
export function describePaymentMethod(pm: BillingPaymentMethod): string {
switch (pm.kind) {
case 'card':
return pm.wallet ? `${pm.wallet} ${pm.brand} ${pm.last4}` : `${pm.brand} ${pm.last4}`
case 'link':
return pm.email ?? 'Link'
case 'unknown':
return pm.raw_kind
}
}