object.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. function StatelessFunctionalComponent({
  2. isActive,
  3. onFiltersUpdated,
  4. onSelect,
  5. onSubmitAndDeselect,
  6. onCancel,
  7. searchFilters,
  8. title,
  9. items,
  10. }) {
  11. return <div />
  12. }
  13. function StatelessFunctionalComponent({
  14. isActive = true,
  15. onFiltersUpdated = () => null,
  16. onSelect = () => null,
  17. onSubmitAndDeselect = () => null,
  18. onCancel = () => null,
  19. searchFilters = null,
  20. title = '',
  21. items = [],
  22. } = {}) {
  23. return <div />
  24. }
  25. function StatelessFunctionalComponent(
  26. {
  27. isActive,
  28. onFiltersUpdated = () => null,
  29. onSelect = () => null,
  30. onSubmitAndDeselect = () => null,
  31. onCancel = () => null,
  32. searchFilters = null,
  33. title = '',
  34. items = [],
  35. } = {
  36. isActive: true
  37. }
  38. ) {
  39. return <div />
  40. }
  41. function StatelessFunctionalComponent({
  42. isActive,
  43. onFiltersUpdated,
  44. onSelect,
  45. onSubmitAndDeselect,
  46. onCancel,
  47. searchFilters,
  48. title,
  49. items,
  50. }: MyType | null | void) {
  51. return <div />
  52. }
  53. const StatelessFunctionalComponent = ({
  54. isActive,
  55. onFiltersUpdated,
  56. onSelect,
  57. onSubmitAndDeselect,
  58. onCancel,
  59. searchFilters,
  60. title,
  61. items,
  62. }: {
  63. isActive: number,
  64. onFiltersUpdated: number,
  65. onSelect: number,
  66. onSubmitAndDeselect: number,
  67. onCancel: number,
  68. searchFilters: number,
  69. title: number,
  70. items: number,
  71. }) => {
  72. return <div />
  73. };
  74. class C {
  75. StatelessFunctionalComponent({
  76. isActive,
  77. onFiltersUpdated,
  78. onSelect,
  79. onSubmitAndDeselect,
  80. onCancel,
  81. searchFilters,
  82. title,
  83. items,
  84. }) {
  85. return <div />
  86. }
  87. }
  88. type T = ({
  89. isActive: number,
  90. onFiltersUpdated: number,
  91. onSelect: number,
  92. onSubmitAndDeselect: number,
  93. onCancel: number,
  94. searchFilters: number,
  95. title: number,
  96. items: number,
  97. }) => void;
  98. const X = (props: {
  99. a: boolean,
  100. }) =>
  101. <A />;