版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

65 řádky
1.4 KiB

  1. import { ReadonlyRecord } from './ReadonlyRecord'
  2. /**
  3. * @category model
  4. * @since 2.0.0
  5. */
  6. export interface Show<A> {
  7. readonly show: (a: A) => string
  8. }
  9. /**
  10. * @since 2.10.0
  11. */
  12. export declare const struct: <A>(shows: { [K in keyof A]: Show<A[K]> }) => Show<{ readonly [K_1 in keyof A]: A[K_1] }>
  13. /**
  14. * @since 2.10.0
  15. */
  16. export declare const tuple: <A extends readonly unknown[]>(
  17. ...shows: { [K in keyof A]: Show<A[K]> }
  18. ) => Show<Readonly<A>>
  19. /**
  20. * Use [`tuple`](#tuple) instead.
  21. *
  22. * @category zone of death
  23. * @since 2.0.0
  24. * @deprecated
  25. */
  26. export declare const getTupleShow: <T extends ReadonlyArray<Show<any>>>(
  27. ...shows: T
  28. ) => Show<{
  29. [K in keyof T]: T[K] extends Show<infer A> ? A : never
  30. }>
  31. /**
  32. * Use [`struct`](#struct) instead.
  33. *
  34. * @category zone of death
  35. * @since 2.0.0
  36. * @deprecated
  37. */
  38. export declare const getStructShow: <O extends ReadonlyRecord<string, any>>(shows: {
  39. [K in keyof O]: Show<O[K]>
  40. }) => Show<O>
  41. /**
  42. * Use [`Show`](./boolean.ts.html#show) instead.
  43. *
  44. * @category zone of death
  45. * @since 2.0.0
  46. * @deprecated
  47. */
  48. export declare const showBoolean: Show<boolean>
  49. /**
  50. * Use [`Show`](./string.ts.html#show) instead.
  51. *
  52. * @category zone of death
  53. * @since 2.0.0
  54. * @deprecated
  55. */
  56. export declare const showString: Show<string>
  57. /**
  58. * Use [`Show`](./number.ts.html#show) instead.
  59. *
  60. * @category zone of death
  61. * @since 2.0.0
  62. * @deprecated
  63. */
  64. export declare const showNumber: Show<number>