版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

42 satır
926 B

  1. /**
  2. * The `Bounded` type class represents totally ordered types that have an upper and lower boundary.
  3. *
  4. * Instances should satisfy the following law in addition to the `Ord` laws:
  5. *
  6. * - Bounded: `bottom <= a <= top`
  7. *
  8. * @since 2.0.0
  9. */
  10. import * as O from './Ord'
  11. import Ord = O.Ord
  12. /**
  13. * @category model
  14. * @since 2.0.0
  15. */
  16. export interface Bounded<A> extends Ord<A> {
  17. readonly top: A
  18. readonly bottom: A
  19. }
  20. /**
  21. * Clamp a value between bottom and top values.
  22. *
  23. * @category utils
  24. * @since 2.12.0
  25. */
  26. export declare const clamp: <A>(B: Bounded<A>) => (a: A) => A
  27. /**
  28. * Reverses the Ord of a bound and swaps top and bottom values.
  29. *
  30. * @category utils
  31. * @since 2.12.0
  32. */
  33. export declare const reverse: <A>(B: Bounded<A>) => Bounded<A>
  34. /**
  35. * Use [`Bounded`](./number.ts.html#bounded) instead.
  36. *
  37. * @category zone of death
  38. * @since 2.0.0
  39. * @deprecated
  40. */
  41. export declare const boundedNumber: Bounded<number>