money.ts 595 B

123456789101112131415161718
  1. export * as Money from "./money.js"
  2. import { Schema } from "effect"
  3. import { statics } from "./schema.js"
  4. export const USD = Schema.Finite.pipe(
  5. Schema.brand("Money.USD"),
  6. Schema.annotate({ identifier: "Money.USD" }),
  7. statics((schema) => ({ zero: schema.make(0) })),
  8. )
  9. export type USD = typeof USD.Type
  10. export const USDPerMillionTokens = Schema.Finite.pipe(
  11. Schema.brand("Money.USDPerMillionTokens"),
  12. Schema.annotate({ identifier: "Money.USDPerMillionTokens" }),
  13. statics((schema) => ({ zero: schema.make(0) })),
  14. )
  15. export type USDPerMillionTokens = typeof USDPerMillionTokens.Type