alicezetion 1.8.6 → 1.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. package/.cache/nix/binary-cache-v6.sqlite +0 -0
  2. package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
  3. package/.cache/replit/modules/nodejs-20:v28-20240213-3f08513.res +1 -0
  4. package/.cache/replit/modules/replit:v5-20240209-9e3a339.res +1 -0
  5. package/.cache/replit/modules.stamp +0 -1
  6. package/.cache/replit/nix/env.json +1 -1
  7. package/.cache/typescript/5.3/node_modules/.package-lock.json +166 -0
  8. package/.cache/typescript/5.3/node_modules/@types/bluebird/LICENSE +21 -0
  9. package/.cache/typescript/5.3/node_modules/@types/bluebird/README.md +15 -0
  10. package/.cache/typescript/5.3/node_modules/@types/bluebird/index.d.ts +1365 -0
  11. package/.cache/typescript/5.3/node_modules/@types/bluebird/package.json +25 -0
  12. package/.cache/typescript/5.3/node_modules/@types/caseless/LICENSE +21 -0
  13. package/.cache/typescript/5.3/node_modules/@types/caseless/README.md +48 -0
  14. package/.cache/typescript/5.3/node_modules/@types/caseless/index.d.ts +29 -0
  15. package/.cache/typescript/5.3/node_modules/@types/caseless/package.json +35 -0
  16. package/.cache/typescript/5.3/node_modules/@types/cheerio/LICENSE +21 -0
  17. package/.cache/typescript/5.3/node_modules/@types/cheerio/README.md +15 -0
  18. package/.cache/typescript/5.3/node_modules/@types/cheerio/index.d.ts +318 -0
  19. package/.cache/typescript/5.3/node_modules/@types/cheerio/package.json +71 -0
  20. package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
  21. package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
  22. package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
  24. package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
  25. package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
  26. package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
  27. package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
  28. package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
  29. package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
  30. package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4487 -0
  31. package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +596 -0
  32. package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
  33. package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
  34. package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
  35. package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
  36. package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
  37. package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
  38. package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
  39. package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4311 -0
  40. package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +411 -0
  41. package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
  42. package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1887 -0
  43. package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
  44. package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
  45. package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
  46. package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
  47. package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +315 -0
  48. package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
  49. package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
  50. package/.cache/typescript/5.3/node_modules/@types/node/package.json +229 -0
  51. package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
  52. package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +645 -0
  53. package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1561 -0
  54. package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
  55. package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
  56. package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
  57. package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
  58. package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
  59. package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
  60. package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
  61. package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +366 -0
  62. package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
  63. package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
  64. package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1465 -0
  65. package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
  66. package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
  67. package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
  68. package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
  69. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  70. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
  71. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
  72. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
  73. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
  74. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
  75. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
  76. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
  77. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
  78. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
  79. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
  80. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
  81. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
  82. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
  83. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  84. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
  85. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
  86. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
  87. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
  88. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  89. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
  90. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
  91. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
  92. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  93. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
  94. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +315 -0
  95. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
  96. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
  97. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  98. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
  99. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
  100. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  101. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
  102. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
  103. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
  104. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
  105. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  106. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
  107. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
  108. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
  109. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  110. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
  111. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  112. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
  113. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
  114. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  115. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  116. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
  117. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
  118. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  119. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
  120. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
  121. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
  122. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  123. package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
  124. package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
  125. package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
  126. package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
  127. package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
  128. package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +179 -0
  129. package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
  130. package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
  131. package/.cache/typescript/5.3/node_modules/@types/npmlog/LICENSE +21 -0
  132. package/.cache/typescript/5.3/node_modules/@types/npmlog/README.md +15 -0
  133. package/.cache/typescript/5.3/node_modules/@types/npmlog/index.d.ts +84 -0
  134. package/.cache/typescript/5.3/node_modules/@types/npmlog/package.json +32 -0
  135. package/.cache/typescript/5.3/node_modules/@types/prop-types/LICENSE +21 -0
  136. package/.cache/typescript/5.3/node_modules/@types/prop-types/README.md +15 -0
  137. package/.cache/typescript/5.3/node_modules/@types/prop-types/index.d.ts +98 -0
  138. package/.cache/typescript/5.3/node_modules/@types/prop-types/package.json +35 -0
  139. package/.cache/typescript/5.3/node_modules/@types/react/LICENSE +21 -0
  140. package/.cache/typescript/5.3/node_modules/@types/react/README.md +15 -0
  141. package/.cache/typescript/5.3/node_modules/@types/react/canary.d.ts +112 -0
  142. package/.cache/typescript/5.3/node_modules/@types/react/experimental.d.ts +126 -0
  143. package/.cache/typescript/5.3/node_modules/@types/react/global.d.ts +158 -0
  144. package/.cache/typescript/5.3/node_modules/@types/react/index.d.ts +4351 -0
  145. package/.cache/typescript/5.3/node_modules/@types/react/jsx-dev-runtime.d.ts +13 -0
  146. package/.cache/typescript/5.3/node_modules/@types/react/jsx-runtime.d.ts +13 -0
  147. package/.cache/typescript/5.3/node_modules/@types/react/package.json +206 -0
  148. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/canary.d.ts +112 -0
  149. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/experimental.d.ts +126 -0
  150. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/global.d.ts +158 -0
  151. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/index.d.ts +4333 -0
  152. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +12 -0
  153. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +12 -0
  154. package/.cache/typescript/5.3/node_modules/@types/request/LICENSE +21 -0
  155. package/.cache/typescript/5.3/node_modules/@types/request/README.md +15 -0
  156. package/.cache/typescript/5.3/node_modules/@types/request/index.d.ts +395 -0
  157. package/.cache/typescript/5.3/node_modules/@types/request/package.json +70 -0
  158. package/.cache/typescript/5.3/node_modules/@types/scheduler/LICENSE +21 -0
  159. package/.cache/typescript/5.3/node_modules/@types/scheduler/README.md +15 -0
  160. package/.cache/typescript/5.3/node_modules/@types/scheduler/index.d.ts +30 -0
  161. package/.cache/typescript/5.3/node_modules/@types/scheduler/package.json +30 -0
  162. package/.cache/typescript/5.3/node_modules/@types/scheduler/tracing.d.ts +127 -0
  163. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/LICENSE +21 -0
  164. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/README.md +15 -0
  165. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/index.d.ts +321 -0
  166. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/package.json +35 -0
  167. package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
  168. package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
  169. package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
  170. package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
  171. package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
  172. package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
  173. package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
  174. package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
  175. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  176. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
  177. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
  178. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  179. package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
  180. package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
  181. package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
  182. package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
  183. package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
  184. package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
  185. package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
  186. package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
  187. package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
  188. package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
  189. package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
  190. package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
  191. package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
  192. package/.cache/typescript/5.3/node_modules/csstype/LICENSE +19 -0
  193. package/.cache/typescript/5.3/node_modules/csstype/README.md +277 -0
  194. package/.cache/typescript/5.3/node_modules/csstype/index.d.ts +21297 -0
  195. package/.cache/typescript/5.3/node_modules/csstype/index.js.flow +6612 -0
  196. package/.cache/typescript/5.3/node_modules/csstype/package.json +66 -0
  197. package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
  198. package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
  199. package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
  200. package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  201. package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
  202. package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
  203. package/.cache/typescript/5.3/node_modules/form-data/README.md +350 -0
  204. package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +350 -0
  205. package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +51 -0
  206. package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
  207. package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +483 -0
  208. package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
  209. package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
  210. package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
  211. package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
  212. package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
  213. package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
  214. package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
  215. package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
  216. package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
  217. package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
  218. package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
  219. package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
  220. package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
  221. package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
  222. package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
  223. package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
  224. package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
  225. package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
  226. package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
  227. package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
  228. package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
  229. package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
  230. package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
  231. package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
  232. package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
  233. package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  234. package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
  235. package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
  236. package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
  237. package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
  238. package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
  239. package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
  240. package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  241. package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
  242. package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
  243. package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
  244. package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
  245. package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
  246. package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
  247. package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
  248. package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
  249. package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  250. package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
  251. package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
  252. package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
  253. package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
  254. package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
  255. package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
  256. package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
  257. package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
  258. package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
  259. package/.cache/typescript/5.3/package-lock.json +179 -0
  260. package/.cache/typescript/5.3/package.json +1 -0
  261. package/.replit +1 -0
  262. package/index.js +1 -0
  263. package/leiamnash/edit.js +59 -0
  264. package/leiamnash/listenMqtt.js +827 -816
  265. package/package.json +1 -1
  266. package/.cache/replit/__replit_disk_meta.json +0 -1
  267. package/replit.nix +0 -6
@@ -0,0 +1,4333 @@
1
+ // NOTE: Users of the `experimental` builds of React should add a reference
2
+ // to 'react/experimental' in their project. See experimental.d.ts's top comment
3
+ // for reference and documentation on how exactly to do it.
4
+
5
+ /// <reference path="global.d.ts" />
6
+
7
+ import * as CSS from "csstype";
8
+ import * as PropTypes from "prop-types";
9
+ import { Interaction as SchedulerInteraction } from "scheduler/tracing";
10
+
11
+ type NativeAnimationEvent = AnimationEvent;
12
+ type NativeClipboardEvent = ClipboardEvent;
13
+ type NativeCompositionEvent = CompositionEvent;
14
+ type NativeDragEvent = DragEvent;
15
+ type NativeFocusEvent = FocusEvent;
16
+ type NativeKeyboardEvent = KeyboardEvent;
17
+ type NativeMouseEvent = MouseEvent;
18
+ type NativeTouchEvent = TouchEvent;
19
+ type NativePointerEvent = PointerEvent;
20
+ type NativeTransitionEvent = TransitionEvent;
21
+ type NativeUIEvent = UIEvent;
22
+ type NativeWheelEvent = WheelEvent;
23
+
24
+ /**
25
+ * Used to represent DOM API's where users can either pass
26
+ * true or false as a boolean or as its equivalent strings.
27
+ */
28
+ type Booleanish = boolean | "true" | "false";
29
+
30
+ /**
31
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin MDN}
32
+ */
33
+ type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined;
34
+
35
+ declare const UNDEFINED_VOID_ONLY: unique symbol;
36
+
37
+ /**
38
+ * The function returned from an effect passed to {@link React.useEffect useEffect},
39
+ * which can be used to clean up the effect when the component unmounts.
40
+ *
41
+ * @see {@link https://react.dev/reference/react/useEffect React Docs}
42
+ */
43
+ type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never };
44
+ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
45
+
46
+ // eslint-disable-next-line @definitelytyped/export-just-namespace
47
+ export = React;
48
+ export as namespace React;
49
+
50
+ declare namespace React {
51
+ //
52
+ // React Elements
53
+ // ----------------------------------------------------------------------
54
+
55
+ /**
56
+ * Used to retrieve the possible components which accept a given set of props.
57
+ *
58
+ * Can be passed no type parameters to get a union of all possible components
59
+ * and tags.
60
+ *
61
+ * Is a superset of {@link ComponentType}.
62
+ *
63
+ * @template P The props to match against. If not passed, defaults to any.
64
+ * @template Tag An optional tag to match against. If not passed, attempts to match against all possible tags.
65
+ *
66
+ * @example
67
+ *
68
+ * ```tsx
69
+ * // All components and tags (img, embed etc.)
70
+ * // which accept `src`
71
+ * type SrcComponents = ElementType<{ src: any }>;
72
+ * ```
73
+ *
74
+ * @example
75
+ *
76
+ * ```tsx
77
+ * // All components
78
+ * type AllComponents = ElementType;
79
+ * ```
80
+ *
81
+ * @example
82
+ *
83
+ * ```tsx
84
+ * // All custom components which match `src`, and tags which
85
+ * // match `src`, narrowed down to just `audio` and `embed`
86
+ * type SrcComponents = ElementType<{ src: any }, 'audio' | 'embed'>;
87
+ * ```
88
+ */
89
+ type ElementType<P = any, Tag extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements> =
90
+ | { [K in Tag]: P extends JSX.IntrinsicElements[K] ? K : never }[Tag]
91
+ | ComponentType<P>;
92
+
93
+ /**
94
+ * Represents any user-defined component, either as a function component or
95
+ * a class component.
96
+ *
97
+ * @template P The props the component accepts.
98
+ *
99
+ * @see {@link ComponentClass}
100
+ * @see {@link FunctionComponent}
101
+ */
102
+ type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
103
+
104
+ /**
105
+ * Represents any user-defined component, either as a function or a class.
106
+ *
107
+ * Similar to {@link ComponentType}, but without extra properties like
108
+ * {@link FunctionComponent.defaultProps defaultProps } and
109
+ * {@link ComponentClass.contextTypes contextTypes}.
110
+ *
111
+ * @template P The props the component accepts.
112
+ */
113
+ type JSXElementConstructor<P> =
114
+ | ((
115
+ props: P,
116
+ /**
117
+ * @deprecated
118
+ *
119
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-stateless-function-components React Docs}
120
+ */
121
+ deprecatedLegacyContext?: any,
122
+ ) => ReactElement<any, any> | null)
123
+ | (new(
124
+ props: P,
125
+ /**
126
+ * @deprecated
127
+ *
128
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods React Docs}
129
+ */
130
+ deprecatedLegacyContext?: any,
131
+ ) => Component<any, any>);
132
+
133
+ /**
134
+ * A readonly ref container where {@link current} cannot be mutated.
135
+ *
136
+ * Created by {@link createRef}, or {@link useRef} when passed `null`.
137
+ *
138
+ * @template T The type of the ref's value.
139
+ *
140
+ * @example
141
+ *
142
+ * ```tsx
143
+ * const ref = createRef<HTMLDivElement>();
144
+ *
145
+ * ref.current = document.createElement('div'); // Error
146
+ * ```
147
+ */
148
+ interface RefObject<T> {
149
+ /**
150
+ * The current value of the ref.
151
+ */
152
+ readonly current: T | null;
153
+ }
154
+
155
+ /**
156
+ * A callback fired whenever the ref's value changes.
157
+ *
158
+ * @template T The type of the ref's value.
159
+ *
160
+ * @see {@link https://react.dev/reference/react-dom/components/common#ref-callback React Docs}
161
+ *
162
+ * @example
163
+ *
164
+ * ```tsx
165
+ * <div ref={(node) => console.log(node)} />
166
+ * ```
167
+ */
168
+ type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
169
+
170
+ /**
171
+ * A union type of all possible shapes for React refs.
172
+ *
173
+ * @see {@link RefCallback}
174
+ * @see {@link RefObject}
175
+ */
176
+
177
+ type Ref<T> = RefCallback<T> | RefObject<T> | null;
178
+ /**
179
+ * A legacy implementation of refs where you can pass a string to a ref prop.
180
+ *
181
+ * @see {@link https://react.dev/reference/react/Component#refs React Docs}
182
+ *
183
+ * @example
184
+ *
185
+ * ```tsx
186
+ * <div ref="myRef" />
187
+ * ```
188
+ */
189
+ type LegacyRef<T> = string | Ref<T>;
190
+
191
+ /**
192
+ * Retrieves the type of the 'ref' prop for a given component type or tag name.
193
+ *
194
+ * @template C The component type.
195
+ *
196
+ * @example
197
+ *
198
+ * ```tsx
199
+ * type MyComponentRef = React.ElementRef<typeof MyComponent>;
200
+ * ```
201
+ *
202
+ * @example
203
+ *
204
+ * ```tsx
205
+ * type DivRef = React.ElementRef<'div'>;
206
+ * ```
207
+ */
208
+ type ElementRef<
209
+ C extends
210
+ | ForwardRefExoticComponent<any>
211
+ | { new(props: any): Component<any> }
212
+ | ((props: any, context?: any) => ReactElement | null)
213
+ | keyof JSX.IntrinsicElements,
214
+ > =
215
+ // need to check first if `ref` is a valid prop for ts@3.0
216
+ // otherwise it will infer `{}` instead of `never`
217
+ "ref" extends keyof ComponentPropsWithRef<C> ? NonNullable<ComponentPropsWithRef<C>["ref"]> extends Ref<
218
+ infer Instance
219
+ > ? Instance
220
+ : never
221
+ : never;
222
+
223
+ type ComponentState = any;
224
+
225
+ /**
226
+ * A value which uniquely identifies a node among items in an array.
227
+ *
228
+ * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs}
229
+ */
230
+ type Key = string | number | bigint;
231
+
232
+ /**
233
+ * @internal You shouldn't need to use this type since you never see these attributes
234
+ * inside your component or have to validate them.
235
+ */
236
+ interface Attributes {
237
+ key?: Key | null | undefined;
238
+ }
239
+ interface RefAttributes<T> extends Attributes {
240
+ /**
241
+ * Allows getting a ref to the component instance.
242
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
243
+ * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom}
244
+ */
245
+ ref?: Ref<T> | undefined;
246
+ }
247
+ /**
248
+ * Represents the built-in attributes available to class components.
249
+ */
250
+ interface ClassAttributes<T> extends Attributes {
251
+ /**
252
+ * Allows getting a ref to the component instance.
253
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
254
+ * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom}
255
+ */
256
+ ref?: LegacyRef<T> | undefined;
257
+ }
258
+
259
+ /**
260
+ * Represents a JSX element.
261
+ *
262
+ * Where {@link ReactNode} represents everything that can be rendered, `ReactElement`
263
+ * only represents JSX.
264
+ *
265
+ * @template P The type of the props object
266
+ * @template T The type of the component or tag
267
+ *
268
+ * @example
269
+ *
270
+ * ```tsx
271
+ * const element: ReactElement = <div />;
272
+ * ```
273
+ */
274
+ interface ReactElement<
275
+ P = any,
276
+ T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>,
277
+ > {
278
+ type: T;
279
+ props: P;
280
+ key: string | null;
281
+ }
282
+
283
+ interface ReactComponentElement<
284
+ T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>,
285
+ P = Pick<ComponentProps<T>, Exclude<keyof ComponentProps<T>, "key" | "ref">>,
286
+ > extends ReactElement<P, Exclude<T, number>> {}
287
+
288
+ interface FunctionComponentElement<P> extends ReactElement<P, FunctionComponent<P>> {
289
+ ref?: ("ref" extends keyof P ? P extends { ref?: infer R | undefined } ? R : never : never) | undefined;
290
+ }
291
+
292
+ type CElement<P, T extends Component<P, ComponentState>> = ComponentElement<P, T>;
293
+ interface ComponentElement<P, T extends Component<P, ComponentState>> extends ReactElement<P, ComponentClass<P>> {
294
+ ref?: LegacyRef<T> | undefined;
295
+ }
296
+
297
+ /**
298
+ * @deprecated Use `ComponentElement<P, ClassicComponent<P, any>>` instead.
299
+ */
300
+ type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
301
+
302
+ // string fallback for custom web-components
303
+ interface DOMElement<P extends HTMLAttributes<T> | SVGAttributes<T>, T extends Element>
304
+ extends ReactElement<P, string>
305
+ {
306
+ ref: LegacyRef<T>;
307
+ }
308
+
309
+ // ReactHTML for ReactHTMLElement
310
+ interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> {}
311
+
312
+ interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> {
313
+ type: keyof ReactHTML;
314
+ }
315
+
316
+ // ReactSVG for ReactSVGElement
317
+ interface ReactSVGElement extends DOMElement<SVGAttributes<SVGElement>, SVGElement> {
318
+ type: keyof ReactSVG;
319
+ }
320
+
321
+ interface ReactPortal extends ReactElement {
322
+ children: ReactNode;
323
+ }
324
+
325
+ //
326
+ // Factories
327
+ // ----------------------------------------------------------------------
328
+
329
+ type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
330
+
331
+ /**
332
+ * @deprecated Please use `FunctionComponentFactory`
333
+ */
334
+ type SFCFactory<P> = FunctionComponentFactory<P>;
335
+
336
+ type FunctionComponentFactory<P> = (
337
+ props?: Attributes & P,
338
+ ...children: ReactNode[]
339
+ ) => FunctionComponentElement<P>;
340
+
341
+ type ComponentFactory<P, T extends Component<P, ComponentState>> = (
342
+ props?: ClassAttributes<T> & P,
343
+ ...children: ReactNode[]
344
+ ) => CElement<P, T>;
345
+
346
+ type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
347
+ type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
348
+
349
+ type DOMFactory<P extends DOMAttributes<T>, T extends Element> = (
350
+ props?: ClassAttributes<T> & P | null,
351
+ ...children: ReactNode[]
352
+ ) => DOMElement<P, T>;
353
+
354
+ interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
355
+
356
+ interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
357
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
358
+ }
359
+
360
+ interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
361
+ (
362
+ props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null,
363
+ ...children: ReactNode[]
364
+ ): ReactSVGElement;
365
+ }
366
+
367
+ /**
368
+ * @deprecated - This type is not relevant when using React. Inline the type instead to make the intent clear.
369
+ */
370
+ type ReactText = string | number;
371
+ /**
372
+ * @deprecated - This type is not relevant when using React. Inline the type instead to make the intent clear.
373
+ */
374
+ type ReactChild = ReactElement | string | number;
375
+
376
+ /**
377
+ * @deprecated Use either `ReactNode[]` if you need an array or `Iterable<ReactNode>` if its passed to a host component.
378
+ */
379
+ interface ReactNodeArray extends ReadonlyArray<ReactNode> {}
380
+ /**
381
+ * WARNING: Not related to `React.Fragment`.
382
+ * @deprecated - This type is not relevant when using React. Inline the type instead to make the intent clear.
383
+ */
384
+ type ReactFragment = Iterable<ReactNode>;
385
+
386
+ /**
387
+ * For internal usage only.
388
+ * Different release channels declare additional types of ReactNode this particular release channel accepts.
389
+ * App or library types should never augment this interface.
390
+ */
391
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {}
392
+
393
+ /**
394
+ * Represents all of the things React can render.
395
+ *
396
+ * Where {@link ReactElement} only represents JSX, `ReactNode` represents everything that can be rendered.
397
+ *
398
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/reactnode/ React TypeScript Cheatsheet}
399
+ *
400
+ * @example
401
+ *
402
+ * ```tsx
403
+ * // Typing children
404
+ * type Props = { children: ReactNode }
405
+ *
406
+ * const Component = ({ children }: Props) => <div>{children}</div>
407
+ *
408
+ * <Component>hello</Component>
409
+ * ```
410
+ *
411
+ * @example
412
+ *
413
+ * ```tsx
414
+ * // Typing a custom element
415
+ * type Props = { customElement: ReactNode }
416
+ *
417
+ * const Component = ({ customElement }: Props) => <div>{customElement}</div>
418
+ *
419
+ * <Component customElement={<div>hello</div>} />
420
+ * ```
421
+ */
422
+ type ReactNode =
423
+ | ReactElement
424
+ | string
425
+ | number
426
+ | Iterable<ReactNode>
427
+ | ReactPortal
428
+ | boolean
429
+ | null
430
+ | undefined
431
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[
432
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES
433
+ ];
434
+
435
+ //
436
+ // Top Level API
437
+ // ----------------------------------------------------------------------
438
+
439
+ // DOM Elements
440
+ function createFactory<T extends HTMLElement>(
441
+ type: keyof ReactHTML,
442
+ ): HTMLFactory<T>;
443
+ function createFactory(
444
+ type: keyof ReactSVG,
445
+ ): SVGFactory;
446
+ function createFactory<P extends DOMAttributes<T>, T extends Element>(
447
+ type: string,
448
+ ): DOMFactory<P, T>;
449
+
450
+ // Custom components
451
+ function createFactory<P>(type: FunctionComponent<P>): FunctionComponentFactory<P>;
452
+ function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
453
+ type: ClassType<P, T, C>,
454
+ ): CFactory<P, T>;
455
+ function createFactory<P>(type: ComponentClass<P>): Factory<P>;
456
+
457
+ // DOM Elements
458
+ // TODO: generalize this to everything in `keyof ReactHTML`, not just "input"
459
+ function createElement(
460
+ type: "input",
461
+ props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement> | null,
462
+ ...children: ReactNode[]
463
+ ): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
464
+ function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
465
+ type: keyof ReactHTML,
466
+ props?: ClassAttributes<T> & P | null,
467
+ ...children: ReactNode[]
468
+ ): DetailedReactHTMLElement<P, T>;
469
+ function createElement<P extends SVGAttributes<T>, T extends SVGElement>(
470
+ type: keyof ReactSVG,
471
+ props?: ClassAttributes<T> & P | null,
472
+ ...children: ReactNode[]
473
+ ): ReactSVGElement;
474
+ function createElement<P extends DOMAttributes<T>, T extends Element>(
475
+ type: string,
476
+ props?: ClassAttributes<T> & P | null,
477
+ ...children: ReactNode[]
478
+ ): DOMElement<P, T>;
479
+
480
+ // Custom components
481
+
482
+ function createElement<P extends {}>(
483
+ type: FunctionComponent<P>,
484
+ props?: Attributes & P | null,
485
+ ...children: ReactNode[]
486
+ ): FunctionComponentElement<P>;
487
+ function createElement<P extends {}, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
488
+ type: ClassType<P, T, C>,
489
+ props?: ClassAttributes<T> & P | null,
490
+ ...children: ReactNode[]
491
+ ): CElement<P, T>;
492
+ function createElement<P extends {}>(
493
+ type: FunctionComponent<P> | ComponentClass<P> | string,
494
+ props?: Attributes & P | null,
495
+ ...children: ReactNode[]
496
+ ): ReactElement<P>;
497
+
498
+ // DOM Elements
499
+ // ReactHTMLElement
500
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
501
+ element: DetailedReactHTMLElement<P, T>,
502
+ props?: P,
503
+ ...children: ReactNode[]
504
+ ): DetailedReactHTMLElement<P, T>;
505
+ // ReactHTMLElement, less specific
506
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
507
+ element: ReactHTMLElement<T>,
508
+ props?: P,
509
+ ...children: ReactNode[]
510
+ ): ReactHTMLElement<T>;
511
+ // SVGElement
512
+ function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>(
513
+ element: ReactSVGElement,
514
+ props?: P,
515
+ ...children: ReactNode[]
516
+ ): ReactSVGElement;
517
+ // DOM Element (has to be the last, because type checking stops at first overload that fits)
518
+ function cloneElement<P extends DOMAttributes<T>, T extends Element>(
519
+ element: DOMElement<P, T>,
520
+ props?: DOMAttributes<T> & P,
521
+ ...children: ReactNode[]
522
+ ): DOMElement<P, T>;
523
+
524
+ // Custom components
525
+ function cloneElement<P>(
526
+ element: FunctionComponentElement<P>,
527
+ props?: Partial<P> & Attributes,
528
+ ...children: ReactNode[]
529
+ ): FunctionComponentElement<P>;
530
+ function cloneElement<P, T extends Component<P, ComponentState>>(
531
+ element: CElement<P, T>,
532
+ props?: Partial<P> & ClassAttributes<T>,
533
+ ...children: ReactNode[]
534
+ ): CElement<P, T>;
535
+ function cloneElement<P>(
536
+ element: ReactElement<P>,
537
+ props?: Partial<P> & Attributes,
538
+ ...children: ReactNode[]
539
+ ): ReactElement<P>;
540
+
541
+ /**
542
+ * Describes the props accepted by a Context {@link Provider}.
543
+ *
544
+ * @template T The type of the value the context provides.
545
+ */
546
+ interface ProviderProps<T> {
547
+ value: T;
548
+ children?: ReactNode | undefined;
549
+ }
550
+
551
+ /**
552
+ * Describes the props accepted by a Context {@link Consumer}.
553
+ *
554
+ * @template T The type of the value the context provides.
555
+ */
556
+ interface ConsumerProps<T> {
557
+ children: (value: T) => ReactNode;
558
+ }
559
+
560
+ /**
561
+ * An object masquerading as a component. These are created by functions
562
+ * like {@link forwardRef}, {@link memo}, and {@link createContext}.
563
+ *
564
+ * In order to make TypeScript work, we pretend that they are normal
565
+ * components.
566
+ *
567
+ * But they are, in fact, not callable - instead, they are objects which
568
+ * are treated specially by the renderer.
569
+ *
570
+ * @template P The props the component accepts.
571
+ */
572
+ interface ExoticComponent<P = {}> {
573
+ (props: P): ReactElement | null;
574
+ readonly $$typeof: symbol;
575
+ }
576
+
577
+ /**
578
+ * An {@link ExoticComponent} with a `displayName` property applied to it.
579
+ *
580
+ * @template P The props the component accepts.
581
+ */
582
+ interface NamedExoticComponent<P = {}> extends ExoticComponent<P> {
583
+ /**
584
+ * Used in debugging messages. You might want to set it
585
+ * explicitly if you want to display a different name for
586
+ * debugging purposes.
587
+ *
588
+ * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs}
589
+ */
590
+ displayName?: string | undefined;
591
+ }
592
+
593
+ /**
594
+ * An {@link ExoticComponent} with a `propTypes` property applied to it.
595
+ *
596
+ * @template P The props the component accepts.
597
+ */
598
+ interface ProviderExoticComponent<P> extends ExoticComponent<P> {
599
+ propTypes?: WeakValidationMap<P> | undefined;
600
+ }
601
+
602
+ /**
603
+ * Used to retrieve the type of a context object from a {@link Context}.
604
+ *
605
+ * @template C The context object.
606
+ *
607
+ * @example
608
+ *
609
+ * ```tsx
610
+ * import { createContext } from 'react';
611
+ *
612
+ * const MyContext = createContext({ foo: 'bar' });
613
+ *
614
+ * type ContextType = ContextType<typeof MyContext>;
615
+ * // ContextType = { foo: string }
616
+ * ```
617
+ */
618
+ type ContextType<C extends Context<any>> = C extends Context<infer T> ? T : never;
619
+
620
+ /**
621
+ * Wraps your components to specify the value of this context for all components inside.
622
+ *
623
+ * @see {@link https://react.dev/reference/react/createContext#provider React Docs}
624
+ *
625
+ * @example
626
+ *
627
+ * ```tsx
628
+ * import { createContext } from 'react';
629
+ *
630
+ * const ThemeContext = createContext('light');
631
+ *
632
+ * function App() {
633
+ * return (
634
+ * <ThemeContext.Provider value="dark">
635
+ * <Toolbar />
636
+ * </ThemeContext.Provider>
637
+ * );
638
+ * }
639
+ * ```
640
+ */
641
+ type Provider<T> = ProviderExoticComponent<ProviderProps<T>>;
642
+
643
+ /**
644
+ * The old way to read context, before {@link useContext} existed.
645
+ *
646
+ * @see {@link https://react.dev/reference/react/createContext#consumer React Docs}
647
+ *
648
+ * @example
649
+ *
650
+ * ```tsx
651
+ * import { UserContext } from './user-context';
652
+ *
653
+ * function Avatar() {
654
+ * return (
655
+ * <UserContext.Consumer>
656
+ * {user => <img src={user.profileImage} alt={user.name} />}
657
+ * </UserContext.Consumer>
658
+ * );
659
+ * }
660
+ * ```
661
+ */
662
+ type Consumer<T> = ExoticComponent<ConsumerProps<T>>;
663
+
664
+ /**
665
+ * Context lets components pass information deep down without explicitly
666
+ * passing props.
667
+ *
668
+ * Created from {@link createContext}
669
+ *
670
+ * @see {@link https://react.dev/learn/passing-data-deeply-with-context React Docs}
671
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet}
672
+ *
673
+ * @example
674
+ *
675
+ * ```tsx
676
+ * import { createContext } from 'react';
677
+ *
678
+ * const ThemeContext = createContext('light');
679
+ * ```
680
+ */
681
+ interface Context<T> {
682
+ Provider: Provider<T>;
683
+ Consumer: Consumer<T>;
684
+ /**
685
+ * Used in debugging messages. You might want to set it
686
+ * explicitly if you want to display a different name for
687
+ * debugging purposes.
688
+ *
689
+ * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs}
690
+ */
691
+ displayName?: string | undefined;
692
+ }
693
+
694
+ /**
695
+ * Lets you create a {@link Context} that components can provide or read.
696
+ *
697
+ * @param defaultValue The value you want the context to have when there is no matching
698
+ * {@link Provider} in the tree above the component reading the context. This is meant
699
+ * as a "last resort" fallback.
700
+ *
701
+ * @see {@link https://react.dev/reference/react/createContext#reference React Docs}
702
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet}
703
+ *
704
+ * @example
705
+ *
706
+ * ```tsx
707
+ * import { createContext } from 'react';
708
+ *
709
+ * const ThemeContext = createContext('light');
710
+ * ```
711
+ */
712
+ function createContext<T>(
713
+ // If you thought this should be optional, see
714
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
715
+ defaultValue: T,
716
+ ): Context<T>;
717
+
718
+ function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
719
+
720
+ /**
721
+ * Maintainer's note: Sync with {@link ReactChildren} until {@link ReactChildren} is removed.
722
+ */
723
+ const Children: {
724
+ map<T, C>(
725
+ children: C | readonly C[],
726
+ fn: (child: C, index: number) => T,
727
+ ): C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
728
+ forEach<C>(children: C | readonly C[], fn: (child: C, index: number) => void): void;
729
+ count(children: any): number;
730
+ only<C>(children: C): C extends any[] ? never : C;
731
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
732
+ };
733
+ /**
734
+ * Lets you group elements without a wrapper node.
735
+ *
736
+ * @see {@link https://react.dev/reference/react/Fragment React Docs}
737
+ *
738
+ * @example
739
+ *
740
+ * ```tsx
741
+ * import { Fragment } from 'react';
742
+ *
743
+ * <Fragment>
744
+ * <td>Hello</td>
745
+ * <td>World</td>
746
+ * </Fragment>
747
+ * ```
748
+ *
749
+ * @example
750
+ *
751
+ * ```tsx
752
+ * // Using the <></> shorthand syntax:
753
+ *
754
+ * <>
755
+ * <td>Hello</td>
756
+ * <td>World</td>
757
+ * </>
758
+ * ```
759
+ */
760
+ const Fragment: ExoticComponent<{ children?: ReactNode | undefined }>;
761
+
762
+ /**
763
+ * Lets you find common bugs in your components early during development.
764
+ *
765
+ * @see {@link https://react.dev/reference/react/StrictMode React Docs}
766
+ *
767
+ * @example
768
+ *
769
+ * ```tsx
770
+ * import { StrictMode } from 'react';
771
+ *
772
+ * <StrictMode>
773
+ * <App />
774
+ * </StrictMode>
775
+ * ```
776
+ */
777
+ const StrictMode: ExoticComponent<{ children?: ReactNode | undefined }>;
778
+
779
+ /**
780
+ * The props accepted by {@link Suspense}.
781
+ *
782
+ * @see {@link https://react.dev/reference/react/Suspense React Docs}
783
+ */
784
+ interface SuspenseProps {
785
+ children?: ReactNode | undefined;
786
+
787
+ /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */
788
+ fallback?: ReactNode;
789
+ }
790
+
791
+ /**
792
+ * Lets you display a fallback until its children have finished loading.
793
+ *
794
+ * @see {@link https://react.dev/reference/react/Suspense React Docs}
795
+ *
796
+ * @example
797
+ *
798
+ * ```tsx
799
+ * import { Suspense } from 'react';
800
+ *
801
+ * <Suspense fallback={<Loading />}>
802
+ * <ProfileDetails />
803
+ * </Suspense>
804
+ * ```
805
+ */
806
+ const Suspense: ExoticComponent<SuspenseProps>;
807
+ const version: string;
808
+
809
+ /**
810
+ * The callback passed to {@link ProfilerProps.onRender}.
811
+ *
812
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
813
+ */
814
+ type ProfilerOnRenderCallback = (
815
+ /**
816
+ * The string id prop of the {@link Profiler} tree that has just committed. This lets
817
+ * you identify which part of the tree was committed if you are using multiple
818
+ * profilers.
819
+ *
820
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
821
+ */
822
+ id: string,
823
+ /**
824
+ * This lets you know whether the tree has just been mounted for the first time
825
+ * or re-rendered due to a change in props, state, or hooks.
826
+ *
827
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
828
+ */
829
+ phase: "mount" | "update" | "nested-update",
830
+ /**
831
+ * The number of milliseconds spent rendering the {@link Profiler} and its descendants
832
+ * for the current update. This indicates how well the subtree makes use of
833
+ * memoization (e.g. {@link memo} and {@link useMemo}). Ideally this value should decrease
834
+ * significantly after the initial mount as many of the descendants will only need to
835
+ * re-render if their specific props change.
836
+ *
837
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
838
+ */
839
+ actualDuration: number,
840
+ /**
841
+ * The number of milliseconds estimating how much time it would take to re-render the entire
842
+ * {@link Profiler} subtree without any optimizations. It is calculated by summing up the most
843
+ * recent render durations of each component in the tree. This value estimates a worst-case
844
+ * cost of rendering (e.g. the initial mount or a tree with no memoization). Compare
845
+ * {@link actualDuration} against it to see if memoization is working.
846
+ *
847
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
848
+ */
849
+ baseDuration: number,
850
+ /**
851
+ * A numeric timestamp for when React began rendering the current update.
852
+ *
853
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
854
+ */
855
+ startTime: number,
856
+ /**
857
+ * A numeric timestamp for when React committed the current update. This value is shared
858
+ * between all profilers in a commit, enabling them to be grouped if desirable.
859
+ *
860
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
861
+ */
862
+ commitTime: number,
863
+ interactions: Set<SchedulerInteraction>,
864
+ ) => void;
865
+
866
+ /**
867
+ * The props accepted by {@link Profiler}.
868
+ *
869
+ * @see {@link https://react.dev/reference/react/Profiler React Docs}
870
+ */
871
+ interface ProfilerProps {
872
+ children?: ReactNode | undefined;
873
+ id: string;
874
+ onRender: ProfilerOnRenderCallback;
875
+ }
876
+
877
+ /**
878
+ * Lets you measure rendering performance of a React tree programmatically.
879
+ *
880
+ * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs}
881
+ *
882
+ * @example
883
+ *
884
+ * ```tsx
885
+ * <Profiler id="App" onRender={onRender}>
886
+ * <App />
887
+ * </Profiler>
888
+ * ```
889
+ */
890
+ const Profiler: ExoticComponent<ProfilerProps>;
891
+
892
+ //
893
+ // Component API
894
+ // ----------------------------------------------------------------------
895
+
896
+ type ReactInstance = Component<any> | Element;
897
+
898
+ // Base component for plain JS classes
899
+ interface Component<P = {}, S = {}, SS = any> extends ComponentLifecycle<P, S, SS> {}
900
+ class Component<P, S> {
901
+ // tslint won't let me format the sample code in a way that vscode likes it :(
902
+ /**
903
+ * If set, `this.context` will be set at runtime to the current value of the given Context.
904
+ *
905
+ * @example
906
+ *
907
+ * ```ts
908
+ * type MyContext = number
909
+ * const Ctx = React.createContext<MyContext>(0)
910
+ *
911
+ * class Foo extends React.Component {
912
+ * static contextType = Ctx
913
+ * context!: React.ContextType<typeof Ctx>
914
+ * render () {
915
+ * return <>My context's value: {this.context}</>;
916
+ * }
917
+ * }
918
+ * ```
919
+ *
920
+ * @see {@link https://react.dev/reference/react/Component#static-contexttype}
921
+ */
922
+ static contextType?: Context<any> | undefined;
923
+
924
+ /**
925
+ * If using the new style context, re-declare this in your class to be the
926
+ * `React.ContextType` of your `static contextType`.
927
+ * Should be used with type annotation or static contextType.
928
+ *
929
+ * @example
930
+ *
931
+ * ```ts
932
+ * static contextType = MyContext
933
+ * // For TS pre-3.7:
934
+ * context!: React.ContextType<typeof MyContext>
935
+ * // For TS 3.7 and above:
936
+ * declare context: React.ContextType<typeof MyContext>
937
+ * ```
938
+ *
939
+ * @see {@link https://react.dev/reference/react/Component#context}
940
+ */
941
+ context: unknown;
942
+
943
+ constructor(props: Readonly<P> | P);
944
+ /**
945
+ * @deprecated
946
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html}
947
+ */
948
+ constructor(props: P, context: any);
949
+
950
+ // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
951
+ // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
952
+ // Also, the ` | S` allows intellisense to not be dumbisense
953
+ setState<K extends keyof S>(
954
+ state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | S | null) | (Pick<S, K> | S | null),
955
+ callback?: () => void,
956
+ ): void;
957
+
958
+ forceUpdate(callback?: () => void): void;
959
+ render(): ReactNode;
960
+
961
+ readonly props: Readonly<P>;
962
+ state: Readonly<S>;
963
+ /**
964
+ * @deprecated
965
+ * https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
966
+ */
967
+ refs: {
968
+ [key: string]: ReactInstance;
969
+ };
970
+ }
971
+
972
+ class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> {}
973
+
974
+ /**
975
+ * @deprecated Use `ClassicComponent` from `create-react-class`
976
+ *
977
+ * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs}
978
+ * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm}
979
+ */
980
+ interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
981
+ replaceState(nextState: S, callback?: () => void): void;
982
+ isMounted(): boolean;
983
+ getInitialState?(): S;
984
+ }
985
+
986
+ interface ChildContextProvider<CC> {
987
+ getChildContext(): CC;
988
+ }
989
+
990
+ //
991
+ // Class Interfaces
992
+ // ----------------------------------------------------------------------
993
+
994
+ /**
995
+ * Represents the type of a function component. Can optionally
996
+ * receive a type argument that represents the props the component
997
+ * receives.
998
+ *
999
+ * @template P The props the component accepts.
1000
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet}
1001
+ * @alias for {@link FunctionComponent}
1002
+ *
1003
+ * @example
1004
+ *
1005
+ * ```tsx
1006
+ * // With props:
1007
+ * type Props = { name: string }
1008
+ *
1009
+ * const MyComponent: FC<Props> = (props) => {
1010
+ * return <div>{props.name}</div>
1011
+ * }
1012
+ * ```
1013
+ *
1014
+ * @example
1015
+ *
1016
+ * ```tsx
1017
+ * // Without props:
1018
+ * const MyComponentWithoutProps: FC = () => {
1019
+ * return <div>MyComponentWithoutProps</div>
1020
+ * }
1021
+ * ```
1022
+ */
1023
+ type FC<P = {}> = FunctionComponent<P>;
1024
+
1025
+ /**
1026
+ * Represents the type of a function component. Can optionally
1027
+ * receive a type argument that represents the props the component
1028
+ * accepts.
1029
+ *
1030
+ * @template P The props the component accepts.
1031
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet}
1032
+ *
1033
+ * @example
1034
+ *
1035
+ * ```tsx
1036
+ * // With props:
1037
+ * type Props = { name: string }
1038
+ *
1039
+ * const MyComponent: FunctionComponent<Props> = (props) => {
1040
+ * return <div>{props.name}</div>
1041
+ * }
1042
+ * ```
1043
+ *
1044
+ * @example
1045
+ *
1046
+ * ```tsx
1047
+ * // Without props:
1048
+ * const MyComponentWithoutProps: FunctionComponent = () => {
1049
+ * return <div>MyComponentWithoutProps</div>
1050
+ * }
1051
+ * ```
1052
+ */
1053
+ interface FunctionComponent<P = {}> {
1054
+ (props: P, context?: any): ReactElement<any, any> | null;
1055
+ /**
1056
+ * Used to declare the types of the props accepted by the
1057
+ * component. These types will be checked during rendering
1058
+ * and in development only.
1059
+ *
1060
+ * We recommend using TypeScript instead of checking prop
1061
+ * types at runtime.
1062
+ *
1063
+ * @see {@link https://react.dev/reference/react/Component#static-proptypes React Docs}
1064
+ */
1065
+ propTypes?: WeakValidationMap<P> | undefined;
1066
+ /**
1067
+ * @deprecated
1068
+ *
1069
+ * Lets you specify which legacy context is consumed by
1070
+ * this component.
1071
+ *
1072
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html Legacy React Docs}
1073
+ */
1074
+ contextTypes?: ValidationMap<any> | undefined;
1075
+ /**
1076
+ * Used to define default values for the props accepted by
1077
+ * the component.
1078
+ *
1079
+ * @see {@link https://react.dev/reference/react/Component#static-defaultprops React Docs}
1080
+ *
1081
+ * @example
1082
+ *
1083
+ * ```tsx
1084
+ * type Props = { name?: string }
1085
+ *
1086
+ * const MyComponent: FC<Props> = (props) => {
1087
+ * return <div>{props.name}</div>
1088
+ * }
1089
+ *
1090
+ * MyComponent.defaultProps = {
1091
+ * name: 'John Doe'
1092
+ * }
1093
+ * ```
1094
+ */
1095
+ defaultProps?: Partial<P> | undefined;
1096
+ /**
1097
+ * Used in debugging messages. You might want to set it
1098
+ * explicitly if you want to display a different name for
1099
+ * debugging purposes.
1100
+ *
1101
+ * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs}
1102
+ *
1103
+ * @example
1104
+ *
1105
+ * ```tsx
1106
+ *
1107
+ * const MyComponent: FC = () => {
1108
+ * return <div>Hello!</div>
1109
+ * }
1110
+ *
1111
+ * MyComponent.displayName = 'MyAwesomeComponent'
1112
+ * ```
1113
+ */
1114
+ displayName?: string | undefined;
1115
+ }
1116
+
1117
+ /**
1118
+ * @deprecated - Equivalent to {@link React.FunctionComponent}.
1119
+ *
1120
+ * @see {@link React.FunctionComponent}
1121
+ */
1122
+ type VFC<P = {}> = VoidFunctionComponent<P>;
1123
+
1124
+ /**
1125
+ * @deprecated - Equivalent to {@link React.FunctionComponent}.
1126
+ *
1127
+ * @see {@link React.FunctionComponent}
1128
+ */
1129
+ interface VoidFunctionComponent<P = {}> {
1130
+ (props: P, context?: any): ReactElement<any, any> | null;
1131
+ propTypes?: WeakValidationMap<P> | undefined;
1132
+ contextTypes?: ValidationMap<any> | undefined;
1133
+ defaultProps?: Partial<P> | undefined;
1134
+ displayName?: string | undefined;
1135
+ }
1136
+
1137
+ /**
1138
+ * The type of the ref received by a {@link ForwardRefRenderFunction}.
1139
+ *
1140
+ * @see {@link ForwardRefRenderFunction}
1141
+ */
1142
+ type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;
1143
+
1144
+ /**
1145
+ * The type of the function passed to {@link forwardRef}. This is considered different
1146
+ * to a normal {@link FunctionComponent} because it receives an additional argument,
1147
+ *
1148
+ * @param props Props passed to the component, if any.
1149
+ * @param ref A ref forwarded to the component of type {@link ForwardedRef}.
1150
+ *
1151
+ * @template T The type of the forwarded ref.
1152
+ * @template P The type of the props the component accepts.
1153
+ *
1154
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet}
1155
+ * @see {@link forwardRef}
1156
+ */
1157
+ interface ForwardRefRenderFunction<T, P = {}> {
1158
+ (props: P, ref: ForwardedRef<T>): ReactElement | null;
1159
+ /**
1160
+ * Used in debugging messages. You might want to set it
1161
+ * explicitly if you want to display a different name for
1162
+ * debugging purposes.
1163
+ *
1164
+ * Will show `ForwardRef(${Component.displayName || Component.name})`
1165
+ * in devtools by default, but can be given its own specific name.
1166
+ *
1167
+ * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs}
1168
+ */
1169
+ displayName?: string | undefined;
1170
+ /**
1171
+ * defaultProps are not supported on render functions passed to forwardRef.
1172
+ *
1173
+ * @see {@link https://github.com/microsoft/TypeScript/issues/36826 linked GitHub issue} for context
1174
+ * @see {@link https://react.dev/reference/react/Component#static-defaultprops React Docs}
1175
+ */
1176
+ defaultProps?: never | undefined;
1177
+ /**
1178
+ * propTypes are not supported on render functions passed to forwardRef.
1179
+ *
1180
+ * @see {@link https://github.com/microsoft/TypeScript/issues/36826 linked GitHub issue} for context
1181
+ * @see {@link https://react.dev/reference/react/Component#static-proptypes React Docs}
1182
+ */
1183
+ propTypes?: never | undefined;
1184
+ }
1185
+
1186
+ /**
1187
+ * Represents a component class in React.
1188
+ *
1189
+ * @template P The props the component accepts.
1190
+ * @template S The internal state of the component.
1191
+ */
1192
+ interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> {
1193
+ new(props: P, context?: any): Component<P, S>;
1194
+ /**
1195
+ * Used to declare the types of the props accepted by the
1196
+ * component. These types will be checked during rendering
1197
+ * and in development only.
1198
+ *
1199
+ * We recommend using TypeScript instead of checking prop
1200
+ * types at runtime.
1201
+ *
1202
+ * @see {@link https://react.dev/reference/react/Component#static-proptypes React Docs}
1203
+ */
1204
+ propTypes?: WeakValidationMap<P> | undefined;
1205
+ contextType?: Context<any> | undefined;
1206
+ /**
1207
+ * @deprecated use {@link ComponentClass.contextType} instead
1208
+ *
1209
+ * Lets you specify which legacy context is consumed by
1210
+ * this component.
1211
+ *
1212
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html Legacy React Docs}
1213
+ */
1214
+ contextTypes?: ValidationMap<any> | undefined;
1215
+ /**
1216
+ * @deprecated
1217
+ *
1218
+ * @see {@link https://legacy.reactjs.org/docs/legacy-context.html#how-to-use-context Legacy React Docs}
1219
+ */
1220
+ childContextTypes?: ValidationMap<any> | undefined;
1221
+ /**
1222
+ * Used to define default values for the props accepted by
1223
+ * the component.
1224
+ *
1225
+ * @see {@link https://react.dev/reference/react/Component#static-defaultprops React Docs}
1226
+ */
1227
+ defaultProps?: Partial<P> | undefined;
1228
+ /**
1229
+ * Used in debugging messages. You might want to set it
1230
+ * explicitly if you want to display a different name for
1231
+ * debugging purposes.
1232
+ *
1233
+ * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs}
1234
+ */
1235
+ displayName?: string | undefined;
1236
+ }
1237
+
1238
+ /**
1239
+ * @deprecated Use `ClassicComponentClass` from `create-react-class`
1240
+ *
1241
+ * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs}
1242
+ * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm}
1243
+ */
1244
+ interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
1245
+ new(props: P, context?: any): ClassicComponent<P, ComponentState>;
1246
+ getDefaultProps?(): P;
1247
+ }
1248
+
1249
+ /**
1250
+ * Used in {@link createElement} and {@link createFactory} to represent
1251
+ * a class.
1252
+ *
1253
+ * An intersection type is used to infer multiple type parameters from
1254
+ * a single argument, which is useful for many top-level API defs.
1255
+ * See {@link https://github.com/Microsoft/TypeScript/issues/7234 this GitHub issue}
1256
+ * for more info.
1257
+ */
1258
+ type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> =
1259
+ & C
1260
+ & (new(props: P, context?: any) => T);
1261
+
1262
+ //
1263
+ // Component Specs and Lifecycle
1264
+ // ----------------------------------------------------------------------
1265
+
1266
+ // This should actually be something like `Lifecycle<P, S> | DeprecatedLifecycle<P, S>`,
1267
+ // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle
1268
+ // methods are present.
1269
+ interface ComponentLifecycle<P, S, SS = any> extends NewLifecycle<P, S, SS>, DeprecatedLifecycle<P, S> {
1270
+ /**
1271
+ * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
1272
+ */
1273
+ componentDidMount?(): void;
1274
+ /**
1275
+ * Called to determine whether the change in props and state should trigger a re-render.
1276
+ *
1277
+ * `Component` always returns true.
1278
+ * `PureComponent` implements a shallow comparison on props and state and returns true if any
1279
+ * props or states have changed.
1280
+ *
1281
+ * If false is returned, {@link Component.render}, `componentWillUpdate`
1282
+ * and `componentDidUpdate` will not be called.
1283
+ */
1284
+ shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;
1285
+ /**
1286
+ * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
1287
+ * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
1288
+ */
1289
+ componentWillUnmount?(): void;
1290
+ /**
1291
+ * Catches exceptions generated in descendant components. Unhandled exceptions will cause
1292
+ * the entire component tree to unmount.
1293
+ */
1294
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
1295
+ }
1296
+
1297
+ // Unfortunately, we have no way of declaring that the component constructor must implement this
1298
+ interface StaticLifecycle<P, S> {
1299
+ getDerivedStateFromProps?: GetDerivedStateFromProps<P, S> | undefined;
1300
+ getDerivedStateFromError?: GetDerivedStateFromError<P, S> | undefined;
1301
+ }
1302
+
1303
+ type GetDerivedStateFromProps<P, S> =
1304
+ /**
1305
+ * Returns an update to a component's state based on its new props and old state.
1306
+ *
1307
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
1308
+ */
1309
+ (nextProps: Readonly<P>, prevState: S) => Partial<S> | null;
1310
+
1311
+ type GetDerivedStateFromError<P, S> =
1312
+ /**
1313
+ * This lifecycle is invoked after an error has been thrown by a descendant component.
1314
+ * It receives the error that was thrown as a parameter and should return a value to update state.
1315
+ *
1316
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
1317
+ */
1318
+ (error: any) => Partial<S> | null;
1319
+
1320
+ // This should be "infer SS" but can't use it yet
1321
+ interface NewLifecycle<P, S, SS> {
1322
+ /**
1323
+ * Runs before React applies the result of {@link Component.render render} to the document, and
1324
+ * returns an object to be given to {@link componentDidUpdate}. Useful for saving
1325
+ * things such as scroll position before {@link Component.render render} causes changes to it.
1326
+ *
1327
+ * Note: the presence of this method prevents any of the deprecated
1328
+ * lifecycle events from running.
1329
+ */
1330
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): SS | null;
1331
+ /**
1332
+ * Called immediately after updating occurs. Not called for the initial render.
1333
+ *
1334
+ * The snapshot is only present if {@link getSnapshotBeforeUpdate} is present and returns non-null.
1335
+ */
1336
+ componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot?: SS): void;
1337
+ }
1338
+
1339
+ interface DeprecatedLifecycle<P, S> {
1340
+ /**
1341
+ * Called immediately before mounting occurs, and before {@link Component.render}.
1342
+ * Avoid introducing any side-effects or subscriptions in this method.
1343
+ *
1344
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1345
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1346
+ * this from being invoked.
1347
+ *
1348
+ * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17
1349
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state}
1350
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1351
+ */
1352
+ componentWillMount?(): void;
1353
+ /**
1354
+ * Called immediately before mounting occurs, and before {@link Component.render}.
1355
+ * Avoid introducing any side-effects or subscriptions in this method.
1356
+ *
1357
+ * This method will not stop working in React 17.
1358
+ *
1359
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1360
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1361
+ * this from being invoked.
1362
+ *
1363
+ * @deprecated 16.3, use componentDidMount or the constructor instead
1364
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state}
1365
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1366
+ */
1367
+ UNSAFE_componentWillMount?(): void;
1368
+ /**
1369
+ * Called when the component may be receiving new props.
1370
+ * React may call this even if props have not changed, so be sure to compare new and existing
1371
+ * props if you only want to handle changes.
1372
+ *
1373
+ * Calling {@link Component.setState} generally does not trigger this method.
1374
+ *
1375
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1376
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1377
+ * this from being invoked.
1378
+ *
1379
+ * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17
1380
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props}
1381
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1382
+ */
1383
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
1384
+ /**
1385
+ * Called when the component may be receiving new props.
1386
+ * React may call this even if props have not changed, so be sure to compare new and existing
1387
+ * props if you only want to handle changes.
1388
+ *
1389
+ * Calling {@link Component.setState} generally does not trigger this method.
1390
+ *
1391
+ * This method will not stop working in React 17.
1392
+ *
1393
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1394
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1395
+ * this from being invoked.
1396
+ *
1397
+ * @deprecated 16.3, use static getDerivedStateFromProps instead
1398
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props}
1399
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1400
+ */
1401
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
1402
+ /**
1403
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
1404
+ *
1405
+ * Note: You cannot call {@link Component.setState} here.
1406
+ *
1407
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1408
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1409
+ * this from being invoked.
1410
+ *
1411
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
1412
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update}
1413
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1414
+ */
1415
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
1416
+ /**
1417
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
1418
+ *
1419
+ * Note: You cannot call {@link Component.setState} here.
1420
+ *
1421
+ * This method will not stop working in React 17.
1422
+ *
1423
+ * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate}
1424
+ * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents
1425
+ * this from being invoked.
1426
+ *
1427
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead
1428
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update}
1429
+ * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path}
1430
+ */
1431
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
1432
+ }
1433
+
1434
+ /**
1435
+ * @deprecated https://legacy.reactjs.org/blog/2016/07/13/mixins-considered-harmful.html
1436
+ */
1437
+ interface Mixin<P, S> extends ComponentLifecycle<P, S> {
1438
+ mixins?: Array<Mixin<P, S>> | undefined;
1439
+ statics?: {
1440
+ [key: string]: any;
1441
+ } | undefined;
1442
+
1443
+ displayName?: string | undefined;
1444
+ propTypes?: ValidationMap<any> | undefined;
1445
+ contextTypes?: ValidationMap<any> | undefined;
1446
+ childContextTypes?: ValidationMap<any> | undefined;
1447
+
1448
+ getDefaultProps?(): P;
1449
+ getInitialState?(): S;
1450
+ }
1451
+
1452
+ /**
1453
+ * @deprecated
1454
+ *
1455
+ * @see {@link https://legacy.reactjs.org/blog/2016/07/13/mixins-considered-harmful.html Mixins Considered Harmful}
1456
+ */
1457
+ interface ComponentSpec<P, S> extends Mixin<P, S> {
1458
+ render(): ReactNode;
1459
+
1460
+ [propertyName: string]: any;
1461
+ }
1462
+
1463
+ function createRef<T>(): RefObject<T>;
1464
+
1465
+ /**
1466
+ * The type of the component returned from {@link forwardRef}.
1467
+ *
1468
+ * @template P The props the component accepts, if any.
1469
+ *
1470
+ * @see {@link ExoticComponent}
1471
+ */
1472
+ interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> {
1473
+ defaultProps?: Partial<P> | undefined;
1474
+ propTypes?: WeakValidationMap<P> | undefined;
1475
+ }
1476
+
1477
+ /**
1478
+ * Lets your component expose a DOM node to a parent component
1479
+ * using a ref.
1480
+ *
1481
+ * @see {@link https://react.dev/reference/react/forwardRef React Docs}
1482
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet}
1483
+ *
1484
+ * @param render See the {@link ForwardRefRenderFunction}.
1485
+ *
1486
+ * @template T The type of the DOM node.
1487
+ * @template P The props the component accepts, if any.
1488
+ *
1489
+ * @example
1490
+ *
1491
+ * ```tsx
1492
+ * interface Props {
1493
+ * children?: ReactNode;
1494
+ * type: "submit" | "button";
1495
+ * }
1496
+ *
1497
+ * export const FancyButton = forwardRef<HTMLButtonElement, Props>((props, ref) => (
1498
+ * <button ref={ref} className="MyClassName" type={props.type}>
1499
+ * {props.children}
1500
+ * </button>
1501
+ * ));
1502
+ * ```
1503
+ */
1504
+ function forwardRef<T, P = {}>(
1505
+ render: ForwardRefRenderFunction<T, P>,
1506
+ ): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
1507
+
1508
+ /**
1509
+ * Omits the 'ref' attribute from the given props object.
1510
+ *
1511
+ * @template P The props object type.
1512
+ */
1513
+ type PropsWithoutRef<P> =
1514
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
1515
+ // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
1516
+ // https://github.com/Microsoft/TypeScript/issues/28339
1517
+ P extends any ? ("ref" extends keyof P ? Omit<P, "ref"> : P) : P;
1518
+ /** Ensures that the props do not include string ref, which cannot be forwarded */
1519
+ type PropsWithRef<P> =
1520
+ // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
1521
+ "ref" extends keyof P
1522
+ ? P extends { ref?: infer R | undefined }
1523
+ ? string extends R ? PropsWithoutRef<P> & { ref?: Exclude<R, string> | undefined }
1524
+ : P
1525
+ : P
1526
+ : P;
1527
+
1528
+ type PropsWithChildren<P = unknown> = P & { children?: ReactNode | undefined };
1529
+
1530
+ /**
1531
+ * Used to retrieve the props a component accepts. Can either be passed a string,
1532
+ * indicating a DOM element (e.g. 'div', 'span', etc.) or the type of a React
1533
+ * component.
1534
+ *
1535
+ * It's usually better to use {@link ComponentPropsWithRef} or {@link ComponentPropsWithoutRef}
1536
+ * instead of this type, as they let you be explicit about whether or not to include
1537
+ * the `ref` prop.
1538
+ *
1539
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet}
1540
+ *
1541
+ * @example
1542
+ *
1543
+ * ```tsx
1544
+ * // Retrieves the props an 'input' element accepts
1545
+ * type InputProps = React.ComponentProps<'input'>;
1546
+ * ```
1547
+ *
1548
+ * @example
1549
+ *
1550
+ * ```tsx
1551
+ * const MyComponent = (props: { foo: number, bar: string }) => <div />;
1552
+ *
1553
+ * // Retrieves the props 'MyComponent' accepts
1554
+ * type MyComponentProps = React.ComponentProps<typeof MyComponent>;
1555
+ * ```
1556
+ */
1557
+ type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = T extends
1558
+ JSXElementConstructor<infer P> ? P
1559
+ : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T]
1560
+ : {};
1561
+
1562
+ /**
1563
+ * Used to retrieve the props a component accepts with its ref. Can either be
1564
+ * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the
1565
+ * type of a React component.
1566
+ *
1567
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet}
1568
+ *
1569
+ * @example
1570
+ *
1571
+ * ```tsx
1572
+ * // Retrieves the props an 'input' element accepts
1573
+ * type InputProps = React.ComponentPropsWithRef<'input'>;
1574
+ * ```
1575
+ *
1576
+ * @example
1577
+ *
1578
+ * ```tsx
1579
+ * const MyComponent = (props: { foo: number, bar: string }) => <div />;
1580
+ *
1581
+ * // Retrieves the props 'MyComponent' accepts
1582
+ * type MyComponentPropsWithRef = React.ComponentPropsWithRef<typeof MyComponent>;
1583
+ * ```
1584
+ */
1585
+ type ComponentPropsWithRef<T extends ElementType> = T extends (new(props: infer P) => Component<any, any>)
1586
+ ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
1587
+ : PropsWithRef<ComponentProps<T>>;
1588
+ /**
1589
+ * Used to retrieve the props a custom component accepts with its ref.
1590
+ *
1591
+ * Unlike {@link ComponentPropsWithRef}, this only works with custom
1592
+ * components, i.e. components you define yourself. This is to improve
1593
+ * type-checking performance.
1594
+ *
1595
+ * @example
1596
+ *
1597
+ * ```tsx
1598
+ * const MyComponent = (props: { foo: number, bar: string }) => <div />;
1599
+ *
1600
+ * // Retrieves the props 'MyComponent' accepts
1601
+ * type MyComponentPropsWithRef = React.CustomComponentPropsWithRef<typeof MyComponent>;
1602
+ * ```
1603
+ */
1604
+ type CustomComponentPropsWithRef<T extends ComponentType> = T extends (new(props: infer P) => Component<any, any>)
1605
+ ? (PropsWithoutRef<P> & RefAttributes<InstanceType<T>>)
1606
+ : T extends ((props: infer P, legacyContext?: any) => ReactNode) ? PropsWithRef<P>
1607
+ : never;
1608
+
1609
+ /**
1610
+ * Used to retrieve the props a component accepts without its ref. Can either be
1611
+ * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the
1612
+ * type of a React component.
1613
+ *
1614
+ * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet}
1615
+ *
1616
+ * @example
1617
+ *
1618
+ * ```tsx
1619
+ * // Retrieves the props an 'input' element accepts
1620
+ * type InputProps = React.ComponentPropsWithoutRef<'input'>;
1621
+ * ```
1622
+ *
1623
+ * @example
1624
+ *
1625
+ * ```tsx
1626
+ * const MyComponent = (props: { foo: number, bar: string }) => <div />;
1627
+ *
1628
+ * // Retrieves the props 'MyComponent' accepts
1629
+ * type MyComponentPropsWithoutRef = React.ComponentPropsWithoutRef<typeof MyComponent>;
1630
+ * ```
1631
+ */
1632
+ type ComponentPropsWithoutRef<T extends ElementType> = PropsWithoutRef<ComponentProps<T>>;
1633
+
1634
+ type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<
1635
+ ComponentPropsWithoutRef<T> & RefAttributes<infer Method>
1636
+ > ? Method
1637
+ : ComponentPropsWithRef<T> extends RefAttributes<infer Method> ? Method
1638
+ : never;
1639
+
1640
+ // will show `Memo(${Component.displayName || Component.name})` in devtools by default,
1641
+ // but can be given its own specific name
1642
+ type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<CustomComponentPropsWithRef<T>> & {
1643
+ readonly type: T;
1644
+ };
1645
+
1646
+ /**
1647
+ * Lets you skip re-rendering a component when its props are unchanged.
1648
+ *
1649
+ * @see {@link https://react.dev/reference/react/memo React Docs}
1650
+ *
1651
+ * @param Component The component to memoize.
1652
+ * @param propsAreEqual A function that will be used to determine if the props have changed.
1653
+ *
1654
+ * @example
1655
+ *
1656
+ * ```tsx
1657
+ * import { memo } from 'react';
1658
+ *
1659
+ * const SomeComponent = memo(function SomeComponent(props: { foo: string }) {
1660
+ * // ...
1661
+ * });
1662
+ * ```
1663
+ */
1664
+ function memo<P extends object>(
1665
+ Component: FunctionComponent<P>,
1666
+ propsAreEqual?: (prevProps: Readonly<P>, nextProps: Readonly<P>) => boolean,
1667
+ ): NamedExoticComponent<P>;
1668
+ function memo<T extends ComponentType<any>>(
1669
+ Component: T,
1670
+ propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean,
1671
+ ): MemoExoticComponent<T>;
1672
+
1673
+ type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<CustomComponentPropsWithRef<T>> & {
1674
+ readonly _result: T;
1675
+ };
1676
+
1677
+ /**
1678
+ * Lets you defer loading a component’s code until it is rendered for the first time.
1679
+ *
1680
+ * @see {@link https://react.dev/reference/react/lazy React Docs}
1681
+ *
1682
+ * @param load A function that returns a `Promise` or another thenable (a `Promise`-like object with a
1683
+ * then method). React will not call `load` until the first time you attempt to render the returned
1684
+ * component. After React first calls load, it will wait for it to resolve, and then render the
1685
+ * resolved value’s `.default` as a React component. Both the returned `Promise` and the `Promise`’s
1686
+ * resolved value will be cached, so React will not call load more than once. If the `Promise` rejects,
1687
+ * React will throw the rejection reason for the nearest Error Boundary to handle.
1688
+ *
1689
+ * @example
1690
+ *
1691
+ * ```tsx
1692
+ * import { lazy } from 'react';
1693
+ *
1694
+ * const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
1695
+ * ```
1696
+ */
1697
+ function lazy<T extends ComponentType<any>>(
1698
+ load: () => Promise<{ default: T }>,
1699
+ ): LazyExoticComponent<T>;
1700
+
1701
+ //
1702
+ // React Hooks
1703
+ // ----------------------------------------------------------------------
1704
+
1705
+ // based on the code in https://github.com/facebook/react/pull/13968
1706
+
1707
+ /**
1708
+ * The instruction passed to a {@link Dispatch} function in {@link useState}
1709
+ * to tell React what the next value of the {@link useState} should be.
1710
+ *
1711
+ * Often found wrapped in {@link Dispatch}.
1712
+ *
1713
+ * @template S The type of the state.
1714
+ *
1715
+ * @example
1716
+ *
1717
+ * ```tsx
1718
+ * // This return type correctly represents the type of
1719
+ * // `setCount` in the example below.
1720
+ * const useCustomState = (): Dispatch<SetStateAction<number>> => {
1721
+ * const [count, setCount] = useState(0);
1722
+ *
1723
+ * return setCount;
1724
+ * }
1725
+ * ```
1726
+ */
1727
+ type SetStateAction<S> = S | ((prevState: S) => S);
1728
+
1729
+ /**
1730
+ * A function that can be used to update the state of a {@link useState}
1731
+ * or {@link useReducer} hook.
1732
+ */
1733
+ type Dispatch<A> = (value: A) => void;
1734
+ /**
1735
+ * A {@link Dispatch} function can sometimes be called without any arguments.
1736
+ */
1737
+ type DispatchWithoutAction = () => void;
1738
+ // Unlike redux, the actions _can_ be anything
1739
+ type Reducer<S, A> = (prevState: S, action: A) => S;
1740
+ // If useReducer accepts a reducer without action, dispatch may be called without any parameters.
1741
+ type ReducerWithoutAction<S> = (prevState: S) => S;
1742
+ // types used to try and prevent the compiler from reducing S
1743
+ // to a supertype common with the second argument to useReducer()
1744
+ type ReducerState<R extends Reducer<any, any>> = R extends Reducer<infer S, any> ? S : never;
1745
+ type ReducerAction<R extends Reducer<any, any>> = R extends Reducer<any, infer A> ? A : never;
1746
+ // The identity check is done with the SameValue algorithm (Object.is), which is stricter than ===
1747
+ type ReducerStateWithoutAction<R extends ReducerWithoutAction<any>> = R extends ReducerWithoutAction<infer S> ? S
1748
+ : never;
1749
+ type DependencyList = readonly unknown[];
1750
+
1751
+ // NOTE: callbacks are _only_ allowed to return either void, or a destructor.
1752
+ type EffectCallback = () => void | Destructor;
1753
+
1754
+ interface MutableRefObject<T> {
1755
+ current: T;
1756
+ }
1757
+
1758
+ // This will technically work if you give a Consumer<T> or Provider<T> but it's deprecated and warns
1759
+ /**
1760
+ * Accepts a context object (the value returned from `React.createContext`) and returns the current
1761
+ * context value, as given by the nearest context provider for the given context.
1762
+ *
1763
+ * @version 16.8.0
1764
+ * @see {@link https://react.dev/reference/react/useContext}
1765
+ */
1766
+ function useContext<T>(context: Context<T> /*, (not public API) observedBits?: number|boolean */): T;
1767
+ /**
1768
+ * Returns a stateful value, and a function to update it.
1769
+ *
1770
+ * @version 16.8.0
1771
+ * @see {@link https://react.dev/reference/react/useState}
1772
+ */
1773
+ function useState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
1774
+ // convenience overload when first argument is omitted
1775
+ /**
1776
+ * Returns a stateful value, and a function to update it.
1777
+ *
1778
+ * @version 16.8.0
1779
+ * @see {@link https://react.dev/reference/react/useState}
1780
+ */
1781
+ function useState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
1782
+ /**
1783
+ * An alternative to `useState`.
1784
+ *
1785
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
1786
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1787
+ * updates because you can pass `dispatch` down instead of callbacks.
1788
+ *
1789
+ * @version 16.8.0
1790
+ * @see {@link https://react.dev/reference/react/useReducer}
1791
+ */
1792
+ // overload where dispatch could accept 0 arguments.
1793
+ function useReducer<R extends ReducerWithoutAction<any>, I>(
1794
+ reducer: R,
1795
+ initializerArg: I,
1796
+ initializer: (arg: I) => ReducerStateWithoutAction<R>,
1797
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
1798
+ /**
1799
+ * An alternative to `useState`.
1800
+ *
1801
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
1802
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1803
+ * updates because you can pass `dispatch` down instead of callbacks.
1804
+ *
1805
+ * @version 16.8.0
1806
+ * @see {@link https://react.dev/reference/react/useReducer}
1807
+ */
1808
+ // overload where dispatch could accept 0 arguments.
1809
+ function useReducer<R extends ReducerWithoutAction<any>>(
1810
+ reducer: R,
1811
+ initializerArg: ReducerStateWithoutAction<R>,
1812
+ initializer?: undefined,
1813
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
1814
+ /**
1815
+ * An alternative to `useState`.
1816
+ *
1817
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
1818
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1819
+ * updates because you can pass `dispatch` down instead of callbacks.
1820
+ *
1821
+ * @version 16.8.0
1822
+ * @see {@link https://react.dev/reference/react/useReducer}
1823
+ */
1824
+ // overload where "I" may be a subset of ReducerState<R>; used to provide autocompletion.
1825
+ // If "I" matches ReducerState<R> exactly then the last overload will allow initializer to be omitted.
1826
+ // the last overload effectively behaves as if the identity function (x => x) is the initializer.
1827
+ function useReducer<R extends Reducer<any, any>, I>(
1828
+ reducer: R,
1829
+ initializerArg: I & ReducerState<R>,
1830
+ initializer: (arg: I & ReducerState<R>) => ReducerState<R>,
1831
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
1832
+ /**
1833
+ * An alternative to `useState`.
1834
+ *
1835
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
1836
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1837
+ * updates because you can pass `dispatch` down instead of callbacks.
1838
+ *
1839
+ * @version 16.8.0
1840
+ * @see {@link https://react.dev/reference/react/useReducer}
1841
+ */
1842
+ // overload for free "I"; all goes as long as initializer converts it into "ReducerState<R>".
1843
+ function useReducer<R extends Reducer<any, any>, I>(
1844
+ reducer: R,
1845
+ initializerArg: I,
1846
+ initializer: (arg: I) => ReducerState<R>,
1847
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
1848
+ /**
1849
+ * An alternative to `useState`.
1850
+ *
1851
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
1852
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1853
+ * updates because you can pass `dispatch` down instead of callbacks.
1854
+ *
1855
+ * @version 16.8.0
1856
+ * @see {@link https://react.dev/reference/react/useReducer}
1857
+ */
1858
+
1859
+ // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.
1860
+ // The Flow types do have an overload for 3-ary invocation with undefined initializer.
1861
+
1862
+ // NOTE: without the ReducerState indirection, TypeScript would reduce S to be the most common
1863
+ // supertype between the reducer's return type and the initialState (or the initializer's return type),
1864
+ // which would prevent autocompletion from ever working.
1865
+
1866
+ // TODO: double-check if this weird overload logic is necessary. It is possible it's either a bug
1867
+ // in older versions, or a regression in newer versions of the typescript completion service.
1868
+ function useReducer<R extends Reducer<any, any>>(
1869
+ reducer: R,
1870
+ initialState: ReducerState<R>,
1871
+ initializer?: undefined,
1872
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
1873
+ /**
1874
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1875
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1876
+ *
1877
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1878
+ * value around similar to how you’d use instance fields in classes.
1879
+ *
1880
+ * @version 16.8.0
1881
+ * @see {@link https://react.dev/reference/react/useRef}
1882
+ */
1883
+ function useRef<T>(initialValue: T): MutableRefObject<T>;
1884
+ // convenience overload for refs given as a ref prop as they typically start with a null value
1885
+ /**
1886
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1887
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1888
+ *
1889
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1890
+ * value around similar to how you’d use instance fields in classes.
1891
+ *
1892
+ * Usage note: if you need the result of useRef to be directly mutable, include `| null` in the type
1893
+ * of the generic argument.
1894
+ *
1895
+ * @version 16.8.0
1896
+ * @see {@link https://react.dev/reference/react/useRef}
1897
+ */
1898
+ function useRef<T>(initialValue: T | null): RefObject<T>;
1899
+ // convenience overload for potentially undefined initialValue / call with 0 arguments
1900
+ // has a default to stop it from defaulting to {} instead
1901
+ /**
1902
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1903
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1904
+ *
1905
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1906
+ * value around similar to how you’d use instance fields in classes.
1907
+ *
1908
+ * @version 16.8.0
1909
+ * @see {@link https://react.dev/reference/react/useRef}
1910
+ */
1911
+ function useRef<T = undefined>(): MutableRefObject<T | undefined>;
1912
+ /**
1913
+ * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
1914
+ * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
1915
+ * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
1916
+ *
1917
+ * Prefer the standard `useEffect` when possible to avoid blocking visual updates.
1918
+ *
1919
+ * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as
1920
+ * `componentDidMount` and `componentDidUpdate`.
1921
+ *
1922
+ * @version 16.8.0
1923
+ * @see {@link https://react.dev/reference/react/useLayoutEffect}
1924
+ */
1925
+ function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
1926
+ /**
1927
+ * Accepts a function that contains imperative, possibly effectful code.
1928
+ *
1929
+ * @param effect Imperative function that can return a cleanup function
1930
+ * @param deps If present, effect will only activate if the values in the list change.
1931
+ *
1932
+ * @version 16.8.0
1933
+ * @see {@link https://react.dev/reference/react/useEffect}
1934
+ */
1935
+ function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1936
+ // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
1937
+ /**
1938
+ * `useImperativeHandle` customizes the instance value that is exposed to parent components when using
1939
+ * `ref`. As always, imperative code using refs should be avoided in most cases.
1940
+ *
1941
+ * `useImperativeHandle` should be used with `React.forwardRef`.
1942
+ *
1943
+ * @version 16.8.0
1944
+ * @see {@link https://react.dev/reference/react/useImperativeHandle}
1945
+ */
1946
+ function useImperativeHandle<T, R extends T>(ref: Ref<T> | undefined, init: () => R, deps?: DependencyList): void;
1947
+ // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key
1948
+ // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y.
1949
+ /**
1950
+ * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
1951
+ * has changed.
1952
+ *
1953
+ * @version 16.8.0
1954
+ * @see {@link https://react.dev/reference/react/useCallback}
1955
+ */
1956
+ // A specific function type would not trigger implicit any.
1957
+ // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types.
1958
+ // eslint-disable-next-line @typescript-eslint/ban-types
1959
+ function useCallback<T extends Function>(callback: T, deps: DependencyList): T;
1960
+ /**
1961
+ * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1962
+ *
1963
+ * @version 16.8.0
1964
+ * @see {@link https://react.dev/reference/react/useMemo}
1965
+ */
1966
+ // allow undefined, but don't make it optional as that is very likely a mistake
1967
+ function useMemo<T>(factory: () => T, deps: DependencyList): T;
1968
+ /**
1969
+ * `useDebugValue` can be used to display a label for custom hooks in React DevTools.
1970
+ *
1971
+ * NOTE: We don’t recommend adding debug values to every custom hook.
1972
+ * It’s most valuable for custom hooks that are part of shared libraries.
1973
+ *
1974
+ * @version 16.8.0
1975
+ * @see {@link https://react.dev/reference/react/useDebugValue}
1976
+ */
1977
+ // the name of the custom hook is itself derived from the function name at runtime:
1978
+ // it's just the function name without the "use" prefix.
1979
+ function useDebugValue<T>(value: T, format?: (value: T) => any): void;
1980
+
1981
+ // must be synchronous
1982
+ export type TransitionFunction = () => VoidOrUndefinedOnly;
1983
+ // strange definition to allow vscode to show documentation on the invocation
1984
+ export interface TransitionStartFunction {
1985
+ /**
1986
+ * State updates caused inside the callback are allowed to be deferred.
1987
+ *
1988
+ * **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
1989
+ *
1990
+ * @param callback A _synchronous_ function which causes state updates that can be deferred.
1991
+ */
1992
+ (callback: TransitionFunction): void;
1993
+ }
1994
+
1995
+ /**
1996
+ * Returns a deferred version of the value that may “lag behind” it.
1997
+ *
1998
+ * This is commonly used to keep the interface responsive when you have something that renders immediately
1999
+ * based on user input and something that needs to wait for a data fetch.
2000
+ *
2001
+ * A good example of this is a text input.
2002
+ *
2003
+ * @param value The value that is going to be deferred
2004
+ *
2005
+ * @see {@link https://react.dev/reference/react/useDeferredValue}
2006
+ */
2007
+ export function useDeferredValue<T>(value: T): T;
2008
+
2009
+ /**
2010
+ * Allows components to avoid undesirable loading states by waiting for content to load
2011
+ * before transitioning to the next screen. It also allows components to defer slower,
2012
+ * data fetching updates until subsequent renders so that more crucial updates can be
2013
+ * rendered immediately.
2014
+ *
2015
+ * The `useTransition` hook returns two values in an array.
2016
+ *
2017
+ * The first is a boolean, React’s way of informing us whether we’re waiting for the transition to finish.
2018
+ * The second is a function that takes a callback. We can use it to tell React which state we want to defer.
2019
+ *
2020
+ * **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
2021
+ *
2022
+ * @see {@link https://react.dev/reference/react/useTransition}
2023
+ */
2024
+ export function useTransition(): [boolean, TransitionStartFunction];
2025
+
2026
+ /**
2027
+ * Similar to `useTransition` but allows uses where hooks are not available.
2028
+ *
2029
+ * @param callback A _synchronous_ function which causes state updates that can be deferred.
2030
+ */
2031
+ export function startTransition(scope: TransitionFunction): void;
2032
+
2033
+ export function useId(): string;
2034
+
2035
+ /**
2036
+ * @param effect Imperative function that can return a cleanup function
2037
+ * @param deps If present, effect will only activate if the values in the list change.
2038
+ *
2039
+ * @see {@link https://github.com/facebook/react/pull/21913}
2040
+ */
2041
+ export function useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void;
2042
+
2043
+ /**
2044
+ * @param subscribe
2045
+ * @param getSnapshot
2046
+ *
2047
+ * @see {@link https://github.com/reactwg/react-18/discussions/86}
2048
+ */
2049
+ // keep in sync with `useSyncExternalStore` from `use-sync-external-store`
2050
+ export function useSyncExternalStore<Snapshot>(
2051
+ subscribe: (onStoreChange: () => void) => () => void,
2052
+ getSnapshot: () => Snapshot,
2053
+ getServerSnapshot?: () => Snapshot,
2054
+ ): Snapshot;
2055
+
2056
+ //
2057
+ // Event System
2058
+ // ----------------------------------------------------------------------
2059
+ // TODO: change any to unknown when moving to TS v3
2060
+ interface BaseSyntheticEvent<E = object, C = any, T = any> {
2061
+ nativeEvent: E;
2062
+ currentTarget: C;
2063
+ target: T;
2064
+ bubbles: boolean;
2065
+ cancelable: boolean;
2066
+ defaultPrevented: boolean;
2067
+ eventPhase: number;
2068
+ isTrusted: boolean;
2069
+ preventDefault(): void;
2070
+ isDefaultPrevented(): boolean;
2071
+ stopPropagation(): void;
2072
+ isPropagationStopped(): boolean;
2073
+ persist(): void;
2074
+ timeStamp: number;
2075
+ type: string;
2076
+ }
2077
+
2078
+ /**
2079
+ * currentTarget - a reference to the element on which the event listener is registered.
2080
+ *
2081
+ * target - a reference to the element from which the event was originally dispatched.
2082
+ * This might be a child element to the element on which the event listener is registered.
2083
+ * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
2084
+ */
2085
+ interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {}
2086
+
2087
+ interface ClipboardEvent<T = Element> extends SyntheticEvent<T, NativeClipboardEvent> {
2088
+ clipboardData: DataTransfer;
2089
+ }
2090
+
2091
+ interface CompositionEvent<T = Element> extends SyntheticEvent<T, NativeCompositionEvent> {
2092
+ data: string;
2093
+ }
2094
+
2095
+ interface DragEvent<T = Element> extends MouseEvent<T, NativeDragEvent> {
2096
+ dataTransfer: DataTransfer;
2097
+ }
2098
+
2099
+ interface PointerEvent<T = Element> extends MouseEvent<T, NativePointerEvent> {
2100
+ pointerId: number;
2101
+ pressure: number;
2102
+ tangentialPressure: number;
2103
+ tiltX: number;
2104
+ tiltY: number;
2105
+ twist: number;
2106
+ width: number;
2107
+ height: number;
2108
+ pointerType: "mouse" | "pen" | "touch";
2109
+ isPrimary: boolean;
2110
+ }
2111
+
2112
+ interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, NativeFocusEvent> {
2113
+ relatedTarget: (EventTarget & RelatedTarget) | null;
2114
+ target: EventTarget & Target;
2115
+ }
2116
+
2117
+ interface FormEvent<T = Element> extends SyntheticEvent<T> {
2118
+ }
2119
+
2120
+ interface InvalidEvent<T = Element> extends SyntheticEvent<T> {
2121
+ target: EventTarget & T;
2122
+ }
2123
+
2124
+ interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
2125
+ target: EventTarget & T;
2126
+ }
2127
+
2128
+ export type ModifierKey =
2129
+ | "Alt"
2130
+ | "AltGraph"
2131
+ | "CapsLock"
2132
+ | "Control"
2133
+ | "Fn"
2134
+ | "FnLock"
2135
+ | "Hyper"
2136
+ | "Meta"
2137
+ | "NumLock"
2138
+ | "ScrollLock"
2139
+ | "Shift"
2140
+ | "Super"
2141
+ | "Symbol"
2142
+ | "SymbolLock";
2143
+
2144
+ interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
2145
+ altKey: boolean;
2146
+ /** @deprecated */
2147
+ charCode: number;
2148
+ ctrlKey: boolean;
2149
+ code: string;
2150
+ /**
2151
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
2152
+ */
2153
+ getModifierState(key: ModifierKey): boolean;
2154
+ /**
2155
+ * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
2156
+ */
2157
+ key: string;
2158
+ /** @deprecated */
2159
+ keyCode: number;
2160
+ locale: string;
2161
+ location: number;
2162
+ metaKey: boolean;
2163
+ repeat: boolean;
2164
+ shiftKey: boolean;
2165
+ /** @deprecated */
2166
+ which: number;
2167
+ }
2168
+
2169
+ interface MouseEvent<T = Element, E = NativeMouseEvent> extends UIEvent<T, E> {
2170
+ altKey: boolean;
2171
+ button: number;
2172
+ buttons: number;
2173
+ clientX: number;
2174
+ clientY: number;
2175
+ ctrlKey: boolean;
2176
+ /**
2177
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
2178
+ */
2179
+ getModifierState(key: ModifierKey): boolean;
2180
+ metaKey: boolean;
2181
+ movementX: number;
2182
+ movementY: number;
2183
+ pageX: number;
2184
+ pageY: number;
2185
+ relatedTarget: EventTarget | null;
2186
+ screenX: number;
2187
+ screenY: number;
2188
+ shiftKey: boolean;
2189
+ }
2190
+
2191
+ interface TouchEvent<T = Element> extends UIEvent<T, NativeTouchEvent> {
2192
+ altKey: boolean;
2193
+ changedTouches: TouchList;
2194
+ ctrlKey: boolean;
2195
+ /**
2196
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
2197
+ */
2198
+ getModifierState(key: ModifierKey): boolean;
2199
+ metaKey: boolean;
2200
+ shiftKey: boolean;
2201
+ targetTouches: TouchList;
2202
+ touches: TouchList;
2203
+ }
2204
+
2205
+ interface UIEvent<T = Element, E = NativeUIEvent> extends SyntheticEvent<T, E> {
2206
+ detail: number;
2207
+ view: AbstractView;
2208
+ }
2209
+
2210
+ interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
2211
+ deltaMode: number;
2212
+ deltaX: number;
2213
+ deltaY: number;
2214
+ deltaZ: number;
2215
+ }
2216
+
2217
+ interface AnimationEvent<T = Element> extends SyntheticEvent<T, NativeAnimationEvent> {
2218
+ animationName: string;
2219
+ elapsedTime: number;
2220
+ pseudoElement: string;
2221
+ }
2222
+
2223
+ interface TransitionEvent<T = Element> extends SyntheticEvent<T, NativeTransitionEvent> {
2224
+ elapsedTime: number;
2225
+ propertyName: string;
2226
+ pseudoElement: string;
2227
+ }
2228
+
2229
+ //
2230
+ // Event Handler Types
2231
+ // ----------------------------------------------------------------------
2232
+
2233
+ type EventHandler<E extends SyntheticEvent<any>> = { bivarianceHack(event: E): void }["bivarianceHack"];
2234
+
2235
+ type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
2236
+
2237
+ type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
2238
+ type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
2239
+ type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
2240
+ type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
2241
+ type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
2242
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
2243
+ type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
2244
+ type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
2245
+ type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
2246
+ type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
2247
+ type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
2248
+ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
2249
+ type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
2250
+ type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
2251
+
2252
+ //
2253
+ // Props / DOM Attributes
2254
+ // ----------------------------------------------------------------------
2255
+
2256
+ interface HTMLProps<T> extends AllHTMLAttributes<T>, ClassAttributes<T> {
2257
+ }
2258
+
2259
+ type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = ClassAttributes<T> & E;
2260
+
2261
+ interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
2262
+ }
2263
+
2264
+ interface SVGLineElementAttributes<T> extends SVGProps<T> {}
2265
+ interface SVGTextElementAttributes<T> extends SVGProps<T> {}
2266
+
2267
+ interface DOMAttributes<T> {
2268
+ children?: ReactNode | undefined;
2269
+ dangerouslySetInnerHTML?: {
2270
+ // Should be InnerHTML['innerHTML'].
2271
+ // But unfortunately we're mixing renderer-specific type declarations.
2272
+ __html: string | TrustedHTML;
2273
+ } | undefined;
2274
+
2275
+ // Clipboard Events
2276
+ onCopy?: ClipboardEventHandler<T> | undefined;
2277
+ onCopyCapture?: ClipboardEventHandler<T> | undefined;
2278
+ onCut?: ClipboardEventHandler<T> | undefined;
2279
+ onCutCapture?: ClipboardEventHandler<T> | undefined;
2280
+ onPaste?: ClipboardEventHandler<T> | undefined;
2281
+ onPasteCapture?: ClipboardEventHandler<T> | undefined;
2282
+
2283
+ // Composition Events
2284
+ onCompositionEnd?: CompositionEventHandler<T> | undefined;
2285
+ onCompositionEndCapture?: CompositionEventHandler<T> | undefined;
2286
+ onCompositionStart?: CompositionEventHandler<T> | undefined;
2287
+ onCompositionStartCapture?: CompositionEventHandler<T> | undefined;
2288
+ onCompositionUpdate?: CompositionEventHandler<T> | undefined;
2289
+ onCompositionUpdateCapture?: CompositionEventHandler<T> | undefined;
2290
+
2291
+ // Focus Events
2292
+ onFocus?: FocusEventHandler<T> | undefined;
2293
+ onFocusCapture?: FocusEventHandler<T> | undefined;
2294
+ onBlur?: FocusEventHandler<T> | undefined;
2295
+ onBlurCapture?: FocusEventHandler<T> | undefined;
2296
+
2297
+ // Form Events
2298
+ onChange?: FormEventHandler<T> | undefined;
2299
+ onChangeCapture?: FormEventHandler<T> | undefined;
2300
+ onBeforeInput?: FormEventHandler<T> | undefined;
2301
+ onBeforeInputCapture?: FormEventHandler<T> | undefined;
2302
+ onInput?: FormEventHandler<T> | undefined;
2303
+ onInputCapture?: FormEventHandler<T> | undefined;
2304
+ onReset?: FormEventHandler<T> | undefined;
2305
+ onResetCapture?: FormEventHandler<T> | undefined;
2306
+ onSubmit?: FormEventHandler<T> | undefined;
2307
+ onSubmitCapture?: FormEventHandler<T> | undefined;
2308
+ onInvalid?: FormEventHandler<T> | undefined;
2309
+ onInvalidCapture?: FormEventHandler<T> | undefined;
2310
+
2311
+ // Image Events
2312
+ onLoad?: ReactEventHandler<T> | undefined;
2313
+ onLoadCapture?: ReactEventHandler<T> | undefined;
2314
+ onError?: ReactEventHandler<T> | undefined; // also a Media Event
2315
+ onErrorCapture?: ReactEventHandler<T> | undefined; // also a Media Event
2316
+
2317
+ // Keyboard Events
2318
+ onKeyDown?: KeyboardEventHandler<T> | undefined;
2319
+ onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
2320
+ /** @deprecated */
2321
+ onKeyPress?: KeyboardEventHandler<T> | undefined;
2322
+ /** @deprecated */
2323
+ onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
2324
+ onKeyUp?: KeyboardEventHandler<T> | undefined;
2325
+ onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
2326
+
2327
+ // Media Events
2328
+ onAbort?: ReactEventHandler<T> | undefined;
2329
+ onAbortCapture?: ReactEventHandler<T> | undefined;
2330
+ onCanPlay?: ReactEventHandler<T> | undefined;
2331
+ onCanPlayCapture?: ReactEventHandler<T> | undefined;
2332
+ onCanPlayThrough?: ReactEventHandler<T> | undefined;
2333
+ onCanPlayThroughCapture?: ReactEventHandler<T> | undefined;
2334
+ onDurationChange?: ReactEventHandler<T> | undefined;
2335
+ onDurationChangeCapture?: ReactEventHandler<T> | undefined;
2336
+ onEmptied?: ReactEventHandler<T> | undefined;
2337
+ onEmptiedCapture?: ReactEventHandler<T> | undefined;
2338
+ onEncrypted?: ReactEventHandler<T> | undefined;
2339
+ onEncryptedCapture?: ReactEventHandler<T> | undefined;
2340
+ onEnded?: ReactEventHandler<T> | undefined;
2341
+ onEndedCapture?: ReactEventHandler<T> | undefined;
2342
+ onLoadedData?: ReactEventHandler<T> | undefined;
2343
+ onLoadedDataCapture?: ReactEventHandler<T> | undefined;
2344
+ onLoadedMetadata?: ReactEventHandler<T> | undefined;
2345
+ onLoadedMetadataCapture?: ReactEventHandler<T> | undefined;
2346
+ onLoadStart?: ReactEventHandler<T> | undefined;
2347
+ onLoadStartCapture?: ReactEventHandler<T> | undefined;
2348
+ onPause?: ReactEventHandler<T> | undefined;
2349
+ onPauseCapture?: ReactEventHandler<T> | undefined;
2350
+ onPlay?: ReactEventHandler<T> | undefined;
2351
+ onPlayCapture?: ReactEventHandler<T> | undefined;
2352
+ onPlaying?: ReactEventHandler<T> | undefined;
2353
+ onPlayingCapture?: ReactEventHandler<T> | undefined;
2354
+ onProgress?: ReactEventHandler<T> | undefined;
2355
+ onProgressCapture?: ReactEventHandler<T> | undefined;
2356
+ onRateChange?: ReactEventHandler<T> | undefined;
2357
+ onRateChangeCapture?: ReactEventHandler<T> | undefined;
2358
+ onResize?: ReactEventHandler<T> | undefined;
2359
+ onResizeCapture?: ReactEventHandler<T> | undefined;
2360
+ onSeeked?: ReactEventHandler<T> | undefined;
2361
+ onSeekedCapture?: ReactEventHandler<T> | undefined;
2362
+ onSeeking?: ReactEventHandler<T> | undefined;
2363
+ onSeekingCapture?: ReactEventHandler<T> | undefined;
2364
+ onStalled?: ReactEventHandler<T> | undefined;
2365
+ onStalledCapture?: ReactEventHandler<T> | undefined;
2366
+ onSuspend?: ReactEventHandler<T> | undefined;
2367
+ onSuspendCapture?: ReactEventHandler<T> | undefined;
2368
+ onTimeUpdate?: ReactEventHandler<T> | undefined;
2369
+ onTimeUpdateCapture?: ReactEventHandler<T> | undefined;
2370
+ onVolumeChange?: ReactEventHandler<T> | undefined;
2371
+ onVolumeChangeCapture?: ReactEventHandler<T> | undefined;
2372
+ onWaiting?: ReactEventHandler<T> | undefined;
2373
+ onWaitingCapture?: ReactEventHandler<T> | undefined;
2374
+
2375
+ // MouseEvents
2376
+ onAuxClick?: MouseEventHandler<T> | undefined;
2377
+ onAuxClickCapture?: MouseEventHandler<T> | undefined;
2378
+ onClick?: MouseEventHandler<T> | undefined;
2379
+ onClickCapture?: MouseEventHandler<T> | undefined;
2380
+ onContextMenu?: MouseEventHandler<T> | undefined;
2381
+ onContextMenuCapture?: MouseEventHandler<T> | undefined;
2382
+ onDoubleClick?: MouseEventHandler<T> | undefined;
2383
+ onDoubleClickCapture?: MouseEventHandler<T> | undefined;
2384
+ onDrag?: DragEventHandler<T> | undefined;
2385
+ onDragCapture?: DragEventHandler<T> | undefined;
2386
+ onDragEnd?: DragEventHandler<T> | undefined;
2387
+ onDragEndCapture?: DragEventHandler<T> | undefined;
2388
+ onDragEnter?: DragEventHandler<T> | undefined;
2389
+ onDragEnterCapture?: DragEventHandler<T> | undefined;
2390
+ onDragExit?: DragEventHandler<T> | undefined;
2391
+ onDragExitCapture?: DragEventHandler<T> | undefined;
2392
+ onDragLeave?: DragEventHandler<T> | undefined;
2393
+ onDragLeaveCapture?: DragEventHandler<T> | undefined;
2394
+ onDragOver?: DragEventHandler<T> | undefined;
2395
+ onDragOverCapture?: DragEventHandler<T> | undefined;
2396
+ onDragStart?: DragEventHandler<T> | undefined;
2397
+ onDragStartCapture?: DragEventHandler<T> | undefined;
2398
+ onDrop?: DragEventHandler<T> | undefined;
2399
+ onDropCapture?: DragEventHandler<T> | undefined;
2400
+ onMouseDown?: MouseEventHandler<T> | undefined;
2401
+ onMouseDownCapture?: MouseEventHandler<T> | undefined;
2402
+ onMouseEnter?: MouseEventHandler<T> | undefined;
2403
+ onMouseLeave?: MouseEventHandler<T> | undefined;
2404
+ onMouseMove?: MouseEventHandler<T> | undefined;
2405
+ onMouseMoveCapture?: MouseEventHandler<T> | undefined;
2406
+ onMouseOut?: MouseEventHandler<T> | undefined;
2407
+ onMouseOutCapture?: MouseEventHandler<T> | undefined;
2408
+ onMouseOver?: MouseEventHandler<T> | undefined;
2409
+ onMouseOverCapture?: MouseEventHandler<T> | undefined;
2410
+ onMouseUp?: MouseEventHandler<T> | undefined;
2411
+ onMouseUpCapture?: MouseEventHandler<T> | undefined;
2412
+
2413
+ // Selection Events
2414
+ onSelect?: ReactEventHandler<T> | undefined;
2415
+ onSelectCapture?: ReactEventHandler<T> | undefined;
2416
+
2417
+ // Touch Events
2418
+ onTouchCancel?: TouchEventHandler<T> | undefined;
2419
+ onTouchCancelCapture?: TouchEventHandler<T> | undefined;
2420
+ onTouchEnd?: TouchEventHandler<T> | undefined;
2421
+ onTouchEndCapture?: TouchEventHandler<T> | undefined;
2422
+ onTouchMove?: TouchEventHandler<T> | undefined;
2423
+ onTouchMoveCapture?: TouchEventHandler<T> | undefined;
2424
+ onTouchStart?: TouchEventHandler<T> | undefined;
2425
+ onTouchStartCapture?: TouchEventHandler<T> | undefined;
2426
+
2427
+ // Pointer Events
2428
+ onPointerDown?: PointerEventHandler<T> | undefined;
2429
+ onPointerDownCapture?: PointerEventHandler<T> | undefined;
2430
+ onPointerMove?: PointerEventHandler<T> | undefined;
2431
+ onPointerMoveCapture?: PointerEventHandler<T> | undefined;
2432
+ onPointerUp?: PointerEventHandler<T> | undefined;
2433
+ onPointerUpCapture?: PointerEventHandler<T> | undefined;
2434
+ onPointerCancel?: PointerEventHandler<T> | undefined;
2435
+ onPointerCancelCapture?: PointerEventHandler<T> | undefined;
2436
+ onPointerEnter?: PointerEventHandler<T> | undefined;
2437
+ onPointerEnterCapture?: PointerEventHandler<T> | undefined;
2438
+ onPointerLeave?: PointerEventHandler<T> | undefined;
2439
+ onPointerLeaveCapture?: PointerEventHandler<T> | undefined;
2440
+ onPointerOver?: PointerEventHandler<T> | undefined;
2441
+ onPointerOverCapture?: PointerEventHandler<T> | undefined;
2442
+ onPointerOut?: PointerEventHandler<T> | undefined;
2443
+ onPointerOutCapture?: PointerEventHandler<T> | undefined;
2444
+ onGotPointerCapture?: PointerEventHandler<T> | undefined;
2445
+ onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined;
2446
+ onLostPointerCapture?: PointerEventHandler<T> | undefined;
2447
+ onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined;
2448
+
2449
+ // UI Events
2450
+ onScroll?: UIEventHandler<T> | undefined;
2451
+ onScrollCapture?: UIEventHandler<T> | undefined;
2452
+
2453
+ // Wheel Events
2454
+ onWheel?: WheelEventHandler<T> | undefined;
2455
+ onWheelCapture?: WheelEventHandler<T> | undefined;
2456
+
2457
+ // Animation Events
2458
+ onAnimationStart?: AnimationEventHandler<T> | undefined;
2459
+ onAnimationStartCapture?: AnimationEventHandler<T> | undefined;
2460
+ onAnimationEnd?: AnimationEventHandler<T> | undefined;
2461
+ onAnimationEndCapture?: AnimationEventHandler<T> | undefined;
2462
+ onAnimationIteration?: AnimationEventHandler<T> | undefined;
2463
+ onAnimationIterationCapture?: AnimationEventHandler<T> | undefined;
2464
+
2465
+ // Transition Events
2466
+ onTransitionEnd?: TransitionEventHandler<T> | undefined;
2467
+ onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
2468
+ }
2469
+
2470
+ export interface CSSProperties extends CSS.Properties<string | number> {
2471
+ /**
2472
+ * The index signature was removed to enable closed typing for style
2473
+ * using CSSType. You're able to use type assertion or module augmentation
2474
+ * to add properties or an index signature of your own.
2475
+ *
2476
+ * For examples and more information, visit:
2477
+ * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
2478
+ */
2479
+ }
2480
+
2481
+ // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
2482
+ interface AriaAttributes {
2483
+ /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
2484
+ "aria-activedescendant"?: string | undefined;
2485
+ /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
2486
+ "aria-atomic"?: Booleanish | undefined;
2487
+ /**
2488
+ * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
2489
+ * presented if they are made.
2490
+ */
2491
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
2492
+ /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
2493
+ /**
2494
+ * Defines a string value that labels the current element, which is intended to be converted into Braille.
2495
+ * @see aria-label.
2496
+ */
2497
+ "aria-braillelabel"?: string | undefined;
2498
+ /**
2499
+ * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
2500
+ * @see aria-roledescription.
2501
+ */
2502
+ "aria-brailleroledescription"?: string | undefined;
2503
+ "aria-busy"?: Booleanish | undefined;
2504
+ /**
2505
+ * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
2506
+ * @see aria-pressed @see aria-selected.
2507
+ */
2508
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
2509
+ /**
2510
+ * Defines the total number of columns in a table, grid, or treegrid.
2511
+ * @see aria-colindex.
2512
+ */
2513
+ "aria-colcount"?: number | undefined;
2514
+ /**
2515
+ * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
2516
+ * @see aria-colcount @see aria-colspan.
2517
+ */
2518
+ "aria-colindex"?: number | undefined;
2519
+ /**
2520
+ * Defines a human readable text alternative of aria-colindex.
2521
+ * @see aria-rowindextext.
2522
+ */
2523
+ "aria-colindextext"?: string | undefined;
2524
+ /**
2525
+ * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
2526
+ * @see aria-colindex @see aria-rowspan.
2527
+ */
2528
+ "aria-colspan"?: number | undefined;
2529
+ /**
2530
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
2531
+ * @see aria-owns.
2532
+ */
2533
+ "aria-controls"?: string | undefined;
2534
+ /** Indicates the element that represents the current item within a container or set of related elements. */
2535
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
2536
+ /**
2537
+ * Identifies the element (or elements) that describes the object.
2538
+ * @see aria-labelledby
2539
+ */
2540
+ "aria-describedby"?: string | undefined;
2541
+ /**
2542
+ * Defines a string value that describes or annotates the current element.
2543
+ * @see related aria-describedby.
2544
+ */
2545
+ "aria-description"?: string | undefined;
2546
+ /**
2547
+ * Identifies the element that provides a detailed, extended description for the object.
2548
+ * @see aria-describedby.
2549
+ */
2550
+ "aria-details"?: string | undefined;
2551
+ /**
2552
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
2553
+ * @see aria-hidden @see aria-readonly.
2554
+ */
2555
+ "aria-disabled"?: Booleanish | undefined;
2556
+ /**
2557
+ * Indicates what functions can be performed when a dragged object is released on the drop target.
2558
+ * @deprecated in ARIA 1.1
2559
+ */
2560
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
2561
+ /**
2562
+ * Identifies the element that provides an error message for the object.
2563
+ * @see aria-invalid @see aria-describedby.
2564
+ */
2565
+ "aria-errormessage"?: string | undefined;
2566
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
2567
+ "aria-expanded"?: Booleanish | undefined;
2568
+ /**
2569
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
2570
+ * allows assistive technology to override the general default of reading in document source order.
2571
+ */
2572
+ "aria-flowto"?: string | undefined;
2573
+ /**
2574
+ * Indicates an element's "grabbed" state in a drag-and-drop operation.
2575
+ * @deprecated in ARIA 1.1
2576
+ */
2577
+ "aria-grabbed"?: Booleanish | undefined;
2578
+ /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
2579
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
2580
+ /**
2581
+ * Indicates whether the element is exposed to an accessibility API.
2582
+ * @see aria-disabled.
2583
+ */
2584
+ "aria-hidden"?: Booleanish | undefined;
2585
+ /**
2586
+ * Indicates the entered value does not conform to the format expected by the application.
2587
+ * @see aria-errormessage.
2588
+ */
2589
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
2590
+ /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
2591
+ "aria-keyshortcuts"?: string | undefined;
2592
+ /**
2593
+ * Defines a string value that labels the current element.
2594
+ * @see aria-labelledby.
2595
+ */
2596
+ "aria-label"?: string | undefined;
2597
+ /**
2598
+ * Identifies the element (or elements) that labels the current element.
2599
+ * @see aria-describedby.
2600
+ */
2601
+ "aria-labelledby"?: string | undefined;
2602
+ /** Defines the hierarchical level of an element within a structure. */
2603
+ "aria-level"?: number | undefined;
2604
+ /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
2605
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
2606
+ /** Indicates whether an element is modal when displayed. */
2607
+ "aria-modal"?: Booleanish | undefined;
2608
+ /** Indicates whether a text box accepts multiple lines of input or only a single line. */
2609
+ "aria-multiline"?: Booleanish | undefined;
2610
+ /** Indicates that the user may select more than one item from the current selectable descendants. */
2611
+ "aria-multiselectable"?: Booleanish | undefined;
2612
+ /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
2613
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
2614
+ /**
2615
+ * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
2616
+ * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
2617
+ * @see aria-controls.
2618
+ */
2619
+ "aria-owns"?: string | undefined;
2620
+ /**
2621
+ * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
2622
+ * A hint could be a sample value or a brief description of the expected format.
2623
+ */
2624
+ "aria-placeholder"?: string | undefined;
2625
+ /**
2626
+ * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
2627
+ * @see aria-setsize.
2628
+ */
2629
+ "aria-posinset"?: number | undefined;
2630
+ /**
2631
+ * Indicates the current "pressed" state of toggle buttons.
2632
+ * @see aria-checked @see aria-selected.
2633
+ */
2634
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
2635
+ /**
2636
+ * Indicates that the element is not editable, but is otherwise operable.
2637
+ * @see aria-disabled.
2638
+ */
2639
+ "aria-readonly"?: Booleanish | undefined;
2640
+ /**
2641
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
2642
+ * @see aria-atomic.
2643
+ */
2644
+ "aria-relevant"?:
2645
+ | "additions"
2646
+ | "additions removals"
2647
+ | "additions text"
2648
+ | "all"
2649
+ | "removals"
2650
+ | "removals additions"
2651
+ | "removals text"
2652
+ | "text"
2653
+ | "text additions"
2654
+ | "text removals"
2655
+ | undefined;
2656
+ /** Indicates that user input is required on the element before a form may be submitted. */
2657
+ "aria-required"?: Booleanish | undefined;
2658
+ /** Defines a human-readable, author-localized description for the role of an element. */
2659
+ "aria-roledescription"?: string | undefined;
2660
+ /**
2661
+ * Defines the total number of rows in a table, grid, or treegrid.
2662
+ * @see aria-rowindex.
2663
+ */
2664
+ "aria-rowcount"?: number | undefined;
2665
+ /**
2666
+ * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
2667
+ * @see aria-rowcount @see aria-rowspan.
2668
+ */
2669
+ "aria-rowindex"?: number | undefined;
2670
+ /**
2671
+ * Defines a human readable text alternative of aria-rowindex.
2672
+ * @see aria-colindextext.
2673
+ */
2674
+ "aria-rowindextext"?: string | undefined;
2675
+ /**
2676
+ * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
2677
+ * @see aria-rowindex @see aria-colspan.
2678
+ */
2679
+ "aria-rowspan"?: number | undefined;
2680
+ /**
2681
+ * Indicates the current "selected" state of various widgets.
2682
+ * @see aria-checked @see aria-pressed.
2683
+ */
2684
+ "aria-selected"?: Booleanish | undefined;
2685
+ /**
2686
+ * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
2687
+ * @see aria-posinset.
2688
+ */
2689
+ "aria-setsize"?: number | undefined;
2690
+ /** Indicates if items in a table or grid are sorted in ascending or descending order. */
2691
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
2692
+ /** Defines the maximum allowed value for a range widget. */
2693
+ "aria-valuemax"?: number | undefined;
2694
+ /** Defines the minimum allowed value for a range widget. */
2695
+ "aria-valuemin"?: number | undefined;
2696
+ /**
2697
+ * Defines the current value for a range widget.
2698
+ * @see aria-valuetext.
2699
+ */
2700
+ "aria-valuenow"?: number | undefined;
2701
+ /** Defines the human readable text alternative of aria-valuenow for a range widget. */
2702
+ "aria-valuetext"?: string | undefined;
2703
+ }
2704
+
2705
+ // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
2706
+ type AriaRole =
2707
+ | "alert"
2708
+ | "alertdialog"
2709
+ | "application"
2710
+ | "article"
2711
+ | "banner"
2712
+ | "button"
2713
+ | "cell"
2714
+ | "checkbox"
2715
+ | "columnheader"
2716
+ | "combobox"
2717
+ | "complementary"
2718
+ | "contentinfo"
2719
+ | "definition"
2720
+ | "dialog"
2721
+ | "directory"
2722
+ | "document"
2723
+ | "feed"
2724
+ | "figure"
2725
+ | "form"
2726
+ | "grid"
2727
+ | "gridcell"
2728
+ | "group"
2729
+ | "heading"
2730
+ | "img"
2731
+ | "link"
2732
+ | "list"
2733
+ | "listbox"
2734
+ | "listitem"
2735
+ | "log"
2736
+ | "main"
2737
+ | "marquee"
2738
+ | "math"
2739
+ | "menu"
2740
+ | "menubar"
2741
+ | "menuitem"
2742
+ | "menuitemcheckbox"
2743
+ | "menuitemradio"
2744
+ | "navigation"
2745
+ | "none"
2746
+ | "note"
2747
+ | "option"
2748
+ | "presentation"
2749
+ | "progressbar"
2750
+ | "radio"
2751
+ | "radiogroup"
2752
+ | "region"
2753
+ | "row"
2754
+ | "rowgroup"
2755
+ | "rowheader"
2756
+ | "scrollbar"
2757
+ | "search"
2758
+ | "searchbox"
2759
+ | "separator"
2760
+ | "slider"
2761
+ | "spinbutton"
2762
+ | "status"
2763
+ | "switch"
2764
+ | "tab"
2765
+ | "table"
2766
+ | "tablist"
2767
+ | "tabpanel"
2768
+ | "term"
2769
+ | "textbox"
2770
+ | "timer"
2771
+ | "toolbar"
2772
+ | "tooltip"
2773
+ | "tree"
2774
+ | "treegrid"
2775
+ | "treeitem"
2776
+ | (string & {});
2777
+
2778
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
2779
+ // React-specific Attributes
2780
+ defaultChecked?: boolean | undefined;
2781
+ defaultValue?: string | number | readonly string[] | undefined;
2782
+ suppressContentEditableWarning?: boolean | undefined;
2783
+ suppressHydrationWarning?: boolean | undefined;
2784
+
2785
+ // Standard HTML Attributes
2786
+ accessKey?: string | undefined;
2787
+ autoFocus?: boolean | undefined;
2788
+ className?: string | undefined;
2789
+ contentEditable?: Booleanish | "inherit" | "plaintext-only" | undefined;
2790
+ contextMenu?: string | undefined;
2791
+ dir?: string | undefined;
2792
+ draggable?: Booleanish | undefined;
2793
+ hidden?: boolean | undefined;
2794
+ id?: string | undefined;
2795
+ lang?: string | undefined;
2796
+ nonce?: string | undefined;
2797
+ slot?: string | undefined;
2798
+ spellCheck?: Booleanish | undefined;
2799
+ style?: CSSProperties | undefined;
2800
+ tabIndex?: number | undefined;
2801
+ title?: string | undefined;
2802
+ translate?: "yes" | "no" | undefined;
2803
+
2804
+ // Unknown
2805
+ radioGroup?: string | undefined; // <command>, <menuitem>
2806
+
2807
+ // WAI-ARIA
2808
+ role?: AriaRole | undefined;
2809
+
2810
+ // RDFa Attributes
2811
+ about?: string | undefined;
2812
+ content?: string | undefined;
2813
+ datatype?: string | undefined;
2814
+ inlist?: any;
2815
+ prefix?: string | undefined;
2816
+ property?: string | undefined;
2817
+ rel?: string | undefined;
2818
+ resource?: string | undefined;
2819
+ rev?: string | undefined;
2820
+ typeof?: string | undefined;
2821
+ vocab?: string | undefined;
2822
+
2823
+ // Non-standard Attributes
2824
+ autoCapitalize?: string | undefined;
2825
+ autoCorrect?: string | undefined;
2826
+ autoSave?: string | undefined;
2827
+ color?: string | undefined;
2828
+ itemProp?: string | undefined;
2829
+ itemScope?: boolean | undefined;
2830
+ itemType?: string | undefined;
2831
+ itemID?: string | undefined;
2832
+ itemRef?: string | undefined;
2833
+ results?: number | undefined;
2834
+ security?: string | undefined;
2835
+ unselectable?: "on" | "off" | undefined;
2836
+
2837
+ // Living Standard
2838
+ /**
2839
+ * Hints at the type of data that might be entered by the user while editing the element or its contents
2840
+ * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute}
2841
+ */
2842
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
2843
+ /**
2844
+ * Specify that a standard HTML element should behave like a defined custom built-in element
2845
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is}
2846
+ */
2847
+ is?: string | undefined;
2848
+ }
2849
+
2850
+ /**
2851
+ * For internal usage only.
2852
+ * Different release channels declare additional types of ReactNode this particular release channel accepts.
2853
+ * App or library types should never augment this interface.
2854
+ */
2855
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {}
2856
+
2857
+ interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
2858
+ // Standard HTML Attributes
2859
+ accept?: string | undefined;
2860
+ acceptCharset?: string | undefined;
2861
+ action?:
2862
+ | string
2863
+ | undefined
2864
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[
2865
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS
2866
+ ];
2867
+ allowFullScreen?: boolean | undefined;
2868
+ allowTransparency?: boolean | undefined;
2869
+ alt?: string | undefined;
2870
+ as?: string | undefined;
2871
+ async?: boolean | undefined;
2872
+ autoComplete?: string | undefined;
2873
+ autoPlay?: boolean | undefined;
2874
+ capture?: boolean | "user" | "environment" | undefined;
2875
+ cellPadding?: number | string | undefined;
2876
+ cellSpacing?: number | string | undefined;
2877
+ charSet?: string | undefined;
2878
+ challenge?: string | undefined;
2879
+ checked?: boolean | undefined;
2880
+ cite?: string | undefined;
2881
+ classID?: string | undefined;
2882
+ cols?: number | undefined;
2883
+ colSpan?: number | undefined;
2884
+ controls?: boolean | undefined;
2885
+ coords?: string | undefined;
2886
+ crossOrigin?: CrossOrigin;
2887
+ data?: string | undefined;
2888
+ dateTime?: string | undefined;
2889
+ default?: boolean | undefined;
2890
+ defer?: boolean | undefined;
2891
+ disabled?: boolean | undefined;
2892
+ download?: any;
2893
+ encType?: string | undefined;
2894
+ form?: string | undefined;
2895
+ formAction?:
2896
+ | string
2897
+ | undefined
2898
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[
2899
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS
2900
+ ];
2901
+ formEncType?: string | undefined;
2902
+ formMethod?: string | undefined;
2903
+ formNoValidate?: boolean | undefined;
2904
+ formTarget?: string | undefined;
2905
+ frameBorder?: number | string | undefined;
2906
+ headers?: string | undefined;
2907
+ height?: number | string | undefined;
2908
+ high?: number | undefined;
2909
+ href?: string | undefined;
2910
+ hrefLang?: string | undefined;
2911
+ htmlFor?: string | undefined;
2912
+ httpEquiv?: string | undefined;
2913
+ integrity?: string | undefined;
2914
+ keyParams?: string | undefined;
2915
+ keyType?: string | undefined;
2916
+ kind?: string | undefined;
2917
+ label?: string | undefined;
2918
+ list?: string | undefined;
2919
+ loop?: boolean | undefined;
2920
+ low?: number | undefined;
2921
+ manifest?: string | undefined;
2922
+ marginHeight?: number | undefined;
2923
+ marginWidth?: number | undefined;
2924
+ max?: number | string | undefined;
2925
+ maxLength?: number | undefined;
2926
+ media?: string | undefined;
2927
+ mediaGroup?: string | undefined;
2928
+ method?: string | undefined;
2929
+ min?: number | string | undefined;
2930
+ minLength?: number | undefined;
2931
+ multiple?: boolean | undefined;
2932
+ muted?: boolean | undefined;
2933
+ name?: string | undefined;
2934
+ noValidate?: boolean | undefined;
2935
+ open?: boolean | undefined;
2936
+ optimum?: number | undefined;
2937
+ pattern?: string | undefined;
2938
+ placeholder?: string | undefined;
2939
+ playsInline?: boolean | undefined;
2940
+ poster?: string | undefined;
2941
+ preload?: string | undefined;
2942
+ readOnly?: boolean | undefined;
2943
+ required?: boolean | undefined;
2944
+ reversed?: boolean | undefined;
2945
+ rows?: number | undefined;
2946
+ rowSpan?: number | undefined;
2947
+ sandbox?: string | undefined;
2948
+ scope?: string | undefined;
2949
+ scoped?: boolean | undefined;
2950
+ scrolling?: string | undefined;
2951
+ seamless?: boolean | undefined;
2952
+ selected?: boolean | undefined;
2953
+ shape?: string | undefined;
2954
+ size?: number | undefined;
2955
+ sizes?: string | undefined;
2956
+ span?: number | undefined;
2957
+ src?: string | undefined;
2958
+ srcDoc?: string | undefined;
2959
+ srcLang?: string | undefined;
2960
+ srcSet?: string | undefined;
2961
+ start?: number | undefined;
2962
+ step?: number | string | undefined;
2963
+ summary?: string | undefined;
2964
+ target?: string | undefined;
2965
+ type?: string | undefined;
2966
+ useMap?: string | undefined;
2967
+ value?: string | readonly string[] | number | undefined;
2968
+ width?: number | string | undefined;
2969
+ wmode?: string | undefined;
2970
+ wrap?: string | undefined;
2971
+ }
2972
+
2973
+ type HTMLAttributeReferrerPolicy =
2974
+ | ""
2975
+ | "no-referrer"
2976
+ | "no-referrer-when-downgrade"
2977
+ | "origin"
2978
+ | "origin-when-cross-origin"
2979
+ | "same-origin"
2980
+ | "strict-origin"
2981
+ | "strict-origin-when-cross-origin"
2982
+ | "unsafe-url";
2983
+
2984
+ type HTMLAttributeAnchorTarget =
2985
+ | "_self"
2986
+ | "_blank"
2987
+ | "_parent"
2988
+ | "_top"
2989
+ | (string & {});
2990
+
2991
+ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
2992
+ download?: any;
2993
+ href?: string | undefined;
2994
+ hrefLang?: string | undefined;
2995
+ media?: string | undefined;
2996
+ ping?: string | undefined;
2997
+ target?: HTMLAttributeAnchorTarget | undefined;
2998
+ type?: string | undefined;
2999
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3000
+ }
3001
+
3002
+ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
3003
+
3004
+ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
3005
+ alt?: string | undefined;
3006
+ coords?: string | undefined;
3007
+ download?: any;
3008
+ href?: string | undefined;
3009
+ hrefLang?: string | undefined;
3010
+ media?: string | undefined;
3011
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3012
+ shape?: string | undefined;
3013
+ target?: string | undefined;
3014
+ }
3015
+
3016
+ interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
3017
+ href?: string | undefined;
3018
+ target?: string | undefined;
3019
+ }
3020
+
3021
+ interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
3022
+ cite?: string | undefined;
3023
+ }
3024
+
3025
+ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
3026
+ disabled?: boolean | undefined;
3027
+ form?: string | undefined;
3028
+ formAction?:
3029
+ | string
3030
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[
3031
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS
3032
+ ]
3033
+ | undefined;
3034
+ formEncType?: string | undefined;
3035
+ formMethod?: string | undefined;
3036
+ formNoValidate?: boolean | undefined;
3037
+ formTarget?: string | undefined;
3038
+ name?: string | undefined;
3039
+ type?: "submit" | "reset" | "button" | undefined;
3040
+ value?: string | readonly string[] | number | undefined;
3041
+ }
3042
+
3043
+ interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
3044
+ height?: number | string | undefined;
3045
+ width?: number | string | undefined;
3046
+ }
3047
+
3048
+ interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
3049
+ span?: number | undefined;
3050
+ width?: number | string | undefined;
3051
+ }
3052
+
3053
+ interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
3054
+ span?: number | undefined;
3055
+ }
3056
+
3057
+ interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
3058
+ value?: string | readonly string[] | number | undefined;
3059
+ }
3060
+
3061
+ interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
3062
+ open?: boolean | undefined;
3063
+ onToggle?: ReactEventHandler<T> | undefined;
3064
+ name?: string | undefined;
3065
+ }
3066
+
3067
+ interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
3068
+ cite?: string | undefined;
3069
+ dateTime?: string | undefined;
3070
+ }
3071
+
3072
+ interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
3073
+ onCancel?: ReactEventHandler<T> | undefined;
3074
+ onClose?: ReactEventHandler<T> | undefined;
3075
+ open?: boolean | undefined;
3076
+ }
3077
+
3078
+ interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
3079
+ height?: number | string | undefined;
3080
+ src?: string | undefined;
3081
+ type?: string | undefined;
3082
+ width?: number | string | undefined;
3083
+ }
3084
+
3085
+ interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
3086
+ disabled?: boolean | undefined;
3087
+ form?: string | undefined;
3088
+ name?: string | undefined;
3089
+ }
3090
+
3091
+ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
3092
+ acceptCharset?: string | undefined;
3093
+ action?:
3094
+ | string
3095
+ | undefined
3096
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[
3097
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS
3098
+ ];
3099
+ autoComplete?: string | undefined;
3100
+ encType?: string | undefined;
3101
+ method?: string | undefined;
3102
+ name?: string | undefined;
3103
+ noValidate?: boolean | undefined;
3104
+ target?: string | undefined;
3105
+ }
3106
+
3107
+ interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
3108
+ manifest?: string | undefined;
3109
+ }
3110
+
3111
+ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
3112
+ allow?: string | undefined;
3113
+ allowFullScreen?: boolean | undefined;
3114
+ allowTransparency?: boolean | undefined;
3115
+ /** @deprecated */
3116
+ frameBorder?: number | string | undefined;
3117
+ height?: number | string | undefined;
3118
+ loading?: "eager" | "lazy" | undefined;
3119
+ /** @deprecated */
3120
+ marginHeight?: number | undefined;
3121
+ /** @deprecated */
3122
+ marginWidth?: number | undefined;
3123
+ name?: string | undefined;
3124
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3125
+ sandbox?: string | undefined;
3126
+ /** @deprecated */
3127
+ scrolling?: string | undefined;
3128
+ seamless?: boolean | undefined;
3129
+ src?: string | undefined;
3130
+ srcDoc?: string | undefined;
3131
+ width?: number | string | undefined;
3132
+ }
3133
+
3134
+ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
3135
+ alt?: string | undefined;
3136
+ crossOrigin?: CrossOrigin;
3137
+ decoding?: "async" | "auto" | "sync" | undefined;
3138
+ height?: number | string | undefined;
3139
+ loading?: "eager" | "lazy" | undefined;
3140
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3141
+ sizes?: string | undefined;
3142
+ src?: string | undefined;
3143
+ srcSet?: string | undefined;
3144
+ useMap?: string | undefined;
3145
+ width?: number | string | undefined;
3146
+ }
3147
+
3148
+ interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
3149
+ cite?: string | undefined;
3150
+ dateTime?: string | undefined;
3151
+ }
3152
+
3153
+ type HTMLInputTypeAttribute =
3154
+ | "button"
3155
+ | "checkbox"
3156
+ | "color"
3157
+ | "date"
3158
+ | "datetime-local"
3159
+ | "email"
3160
+ | "file"
3161
+ | "hidden"
3162
+ | "image"
3163
+ | "month"
3164
+ | "number"
3165
+ | "password"
3166
+ | "radio"
3167
+ | "range"
3168
+ | "reset"
3169
+ | "search"
3170
+ | "submit"
3171
+ | "tel"
3172
+ | "text"
3173
+ | "time"
3174
+ | "url"
3175
+ | "week"
3176
+ | (string & {});
3177
+
3178
+ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
3179
+ accept?: string | undefined;
3180
+ alt?: string | undefined;
3181
+ autoComplete?: string | undefined;
3182
+ capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
3183
+ checked?: boolean | undefined;
3184
+ disabled?: boolean | undefined;
3185
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
3186
+ form?: string | undefined;
3187
+ formAction?:
3188
+ | string
3189
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[
3190
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS
3191
+ ]
3192
+ | undefined;
3193
+ formEncType?: string | undefined;
3194
+ formMethod?: string | undefined;
3195
+ formNoValidate?: boolean | undefined;
3196
+ formTarget?: string | undefined;
3197
+ height?: number | string | undefined;
3198
+ list?: string | undefined;
3199
+ max?: number | string | undefined;
3200
+ maxLength?: number | undefined;
3201
+ min?: number | string | undefined;
3202
+ minLength?: number | undefined;
3203
+ multiple?: boolean | undefined;
3204
+ name?: string | undefined;
3205
+ pattern?: string | undefined;
3206
+ placeholder?: string | undefined;
3207
+ readOnly?: boolean | undefined;
3208
+ required?: boolean | undefined;
3209
+ size?: number | undefined;
3210
+ src?: string | undefined;
3211
+ step?: number | string | undefined;
3212
+ type?: HTMLInputTypeAttribute | undefined;
3213
+ value?: string | readonly string[] | number | undefined;
3214
+ width?: number | string | undefined;
3215
+
3216
+ onChange?: ChangeEventHandler<T> | undefined;
3217
+ }
3218
+
3219
+ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
3220
+ challenge?: string | undefined;
3221
+ disabled?: boolean | undefined;
3222
+ form?: string | undefined;
3223
+ keyType?: string | undefined;
3224
+ keyParams?: string | undefined;
3225
+ name?: string | undefined;
3226
+ }
3227
+
3228
+ interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
3229
+ form?: string | undefined;
3230
+ htmlFor?: string | undefined;
3231
+ }
3232
+
3233
+ interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
3234
+ value?: string | readonly string[] | number | undefined;
3235
+ }
3236
+
3237
+ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
3238
+ as?: string | undefined;
3239
+ crossOrigin?: CrossOrigin;
3240
+ fetchPriority?: "high" | "low" | "auto";
3241
+ href?: string | undefined;
3242
+ hrefLang?: string | undefined;
3243
+ integrity?: string | undefined;
3244
+ media?: string | undefined;
3245
+ imageSrcSet?: string | undefined;
3246
+ imageSizes?: string | undefined;
3247
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3248
+ sizes?: string | undefined;
3249
+ type?: string | undefined;
3250
+ charSet?: string | undefined;
3251
+ }
3252
+
3253
+ interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
3254
+ name?: string | undefined;
3255
+ }
3256
+
3257
+ interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
3258
+ type?: string | undefined;
3259
+ }
3260
+
3261
+ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
3262
+ autoPlay?: boolean | undefined;
3263
+ controls?: boolean | undefined;
3264
+ controlsList?: string | undefined;
3265
+ crossOrigin?: CrossOrigin;
3266
+ loop?: boolean | undefined;
3267
+ mediaGroup?: string | undefined;
3268
+ muted?: boolean | undefined;
3269
+ playsInline?: boolean | undefined;
3270
+ preload?: string | undefined;
3271
+ src?: string | undefined;
3272
+ }
3273
+
3274
+ interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
3275
+ charSet?: string | undefined;
3276
+ content?: string | undefined;
3277
+ httpEquiv?: string | undefined;
3278
+ media?: string | undefined;
3279
+ name?: string | undefined;
3280
+ }
3281
+
3282
+ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
3283
+ form?: string | undefined;
3284
+ high?: number | undefined;
3285
+ low?: number | undefined;
3286
+ max?: number | string | undefined;
3287
+ min?: number | string | undefined;
3288
+ optimum?: number | undefined;
3289
+ value?: string | readonly string[] | number | undefined;
3290
+ }
3291
+
3292
+ interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
3293
+ cite?: string | undefined;
3294
+ }
3295
+
3296
+ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
3297
+ classID?: string | undefined;
3298
+ data?: string | undefined;
3299
+ form?: string | undefined;
3300
+ height?: number | string | undefined;
3301
+ name?: string | undefined;
3302
+ type?: string | undefined;
3303
+ useMap?: string | undefined;
3304
+ width?: number | string | undefined;
3305
+ wmode?: string | undefined;
3306
+ }
3307
+
3308
+ interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
3309
+ reversed?: boolean | undefined;
3310
+ start?: number | undefined;
3311
+ type?: "1" | "a" | "A" | "i" | "I" | undefined;
3312
+ }
3313
+
3314
+ interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
3315
+ disabled?: boolean | undefined;
3316
+ label?: string | undefined;
3317
+ }
3318
+
3319
+ interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
3320
+ disabled?: boolean | undefined;
3321
+ label?: string | undefined;
3322
+ selected?: boolean | undefined;
3323
+ value?: string | readonly string[] | number | undefined;
3324
+ }
3325
+
3326
+ interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
3327
+ form?: string | undefined;
3328
+ htmlFor?: string | undefined;
3329
+ name?: string | undefined;
3330
+ }
3331
+
3332
+ interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
3333
+ name?: string | undefined;
3334
+ value?: string | readonly string[] | number | undefined;
3335
+ }
3336
+
3337
+ interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
3338
+ max?: number | string | undefined;
3339
+ value?: string | readonly string[] | number | undefined;
3340
+ }
3341
+
3342
+ interface SlotHTMLAttributes<T> extends HTMLAttributes<T> {
3343
+ name?: string | undefined;
3344
+ }
3345
+
3346
+ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
3347
+ async?: boolean | undefined;
3348
+ /** @deprecated */
3349
+ charSet?: string | undefined;
3350
+ crossOrigin?: CrossOrigin;
3351
+ defer?: boolean | undefined;
3352
+ integrity?: string | undefined;
3353
+ noModule?: boolean | undefined;
3354
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3355
+ src?: string | undefined;
3356
+ type?: string | undefined;
3357
+ }
3358
+
3359
+ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
3360
+ autoComplete?: string | undefined;
3361
+ disabled?: boolean | undefined;
3362
+ form?: string | undefined;
3363
+ multiple?: boolean | undefined;
3364
+ name?: string | undefined;
3365
+ required?: boolean | undefined;
3366
+ size?: number | undefined;
3367
+ value?: string | readonly string[] | number | undefined;
3368
+ onChange?: ChangeEventHandler<T> | undefined;
3369
+ }
3370
+
3371
+ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
3372
+ height?: number | string | undefined;
3373
+ media?: string | undefined;
3374
+ sizes?: string | undefined;
3375
+ src?: string | undefined;
3376
+ srcSet?: string | undefined;
3377
+ type?: string | undefined;
3378
+ width?: number | string | undefined;
3379
+ }
3380
+
3381
+ interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
3382
+ media?: string | undefined;
3383
+ scoped?: boolean | undefined;
3384
+ type?: string | undefined;
3385
+ }
3386
+
3387
+ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
3388
+ align?: "left" | "center" | "right" | undefined;
3389
+ bgcolor?: string | undefined;
3390
+ border?: number | undefined;
3391
+ cellPadding?: number | string | undefined;
3392
+ cellSpacing?: number | string | undefined;
3393
+ frame?: boolean | undefined;
3394
+ rules?: "none" | "groups" | "rows" | "columns" | "all" | undefined;
3395
+ summary?: string | undefined;
3396
+ width?: number | string | undefined;
3397
+ }
3398
+
3399
+ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
3400
+ autoComplete?: string | undefined;
3401
+ cols?: number | undefined;
3402
+ dirName?: string | undefined;
3403
+ disabled?: boolean | undefined;
3404
+ form?: string | undefined;
3405
+ maxLength?: number | undefined;
3406
+ minLength?: number | undefined;
3407
+ name?: string | undefined;
3408
+ placeholder?: string | undefined;
3409
+ readOnly?: boolean | undefined;
3410
+ required?: boolean | undefined;
3411
+ rows?: number | undefined;
3412
+ value?: string | readonly string[] | number | undefined;
3413
+ wrap?: string | undefined;
3414
+
3415
+ onChange?: ChangeEventHandler<T> | undefined;
3416
+ }
3417
+
3418
+ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
3419
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
3420
+ colSpan?: number | undefined;
3421
+ headers?: string | undefined;
3422
+ rowSpan?: number | undefined;
3423
+ scope?: string | undefined;
3424
+ abbr?: string | undefined;
3425
+ height?: number | string | undefined;
3426
+ width?: number | string | undefined;
3427
+ valign?: "top" | "middle" | "bottom" | "baseline" | undefined;
3428
+ }
3429
+
3430
+ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
3431
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
3432
+ colSpan?: number | undefined;
3433
+ headers?: string | undefined;
3434
+ rowSpan?: number | undefined;
3435
+ scope?: string | undefined;
3436
+ abbr?: string | undefined;
3437
+ }
3438
+
3439
+ interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
3440
+ dateTime?: string | undefined;
3441
+ }
3442
+
3443
+ interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
3444
+ default?: boolean | undefined;
3445
+ kind?: string | undefined;
3446
+ label?: string | undefined;
3447
+ src?: string | undefined;
3448
+ srcLang?: string | undefined;
3449
+ }
3450
+
3451
+ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
3452
+ height?: number | string | undefined;
3453
+ playsInline?: boolean | undefined;
3454
+ poster?: string | undefined;
3455
+ width?: number | string | undefined;
3456
+ disablePictureInPicture?: boolean | undefined;
3457
+ disableRemotePlayback?: boolean | undefined;
3458
+ }
3459
+
3460
+ // this list is "complete" in that it contains every SVG attribute
3461
+ // that React supports, but the types can be improved.
3462
+ // Full list here: https://facebook.github.io/react/docs/dom-elements.html
3463
+ //
3464
+ // The three broad type categories are (in order of restrictiveness):
3465
+ // - "number | string"
3466
+ // - "string"
3467
+ // - union of string literals
3468
+ interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
3469
+ // React-specific Attributes
3470
+ suppressHydrationWarning?: boolean | undefined;
3471
+
3472
+ // Attributes which also defined in HTMLAttributes
3473
+ // See comment in SVGDOMPropertyConfig.js
3474
+ className?: string | undefined;
3475
+ color?: string | undefined;
3476
+ height?: number | string | undefined;
3477
+ id?: string | undefined;
3478
+ lang?: string | undefined;
3479
+ max?: number | string | undefined;
3480
+ media?: string | undefined;
3481
+ method?: string | undefined;
3482
+ min?: number | string | undefined;
3483
+ name?: string | undefined;
3484
+ style?: CSSProperties | undefined;
3485
+ target?: string | undefined;
3486
+ type?: string | undefined;
3487
+ width?: number | string | undefined;
3488
+
3489
+ // Other HTML properties supported by SVG elements in browsers
3490
+ role?: AriaRole | undefined;
3491
+ tabIndex?: number | undefined;
3492
+ crossOrigin?: CrossOrigin;
3493
+
3494
+ // SVG Specific attributes
3495
+ accentHeight?: number | string | undefined;
3496
+ accumulate?: "none" | "sum" | undefined;
3497
+ additive?: "replace" | "sum" | undefined;
3498
+ alignmentBaseline?:
3499
+ | "auto"
3500
+ | "baseline"
3501
+ | "before-edge"
3502
+ | "text-before-edge"
3503
+ | "middle"
3504
+ | "central"
3505
+ | "after-edge"
3506
+ | "text-after-edge"
3507
+ | "ideographic"
3508
+ | "alphabetic"
3509
+ | "hanging"
3510
+ | "mathematical"
3511
+ | "inherit"
3512
+ | undefined;
3513
+ allowReorder?: "no" | "yes" | undefined;
3514
+ alphabetic?: number | string | undefined;
3515
+ amplitude?: number | string | undefined;
3516
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined;
3517
+ ascent?: number | string | undefined;
3518
+ attributeName?: string | undefined;
3519
+ attributeType?: string | undefined;
3520
+ autoReverse?: Booleanish | undefined;
3521
+ azimuth?: number | string | undefined;
3522
+ baseFrequency?: number | string | undefined;
3523
+ baselineShift?: number | string | undefined;
3524
+ baseProfile?: number | string | undefined;
3525
+ bbox?: number | string | undefined;
3526
+ begin?: number | string | undefined;
3527
+ bias?: number | string | undefined;
3528
+ by?: number | string | undefined;
3529
+ calcMode?: number | string | undefined;
3530
+ capHeight?: number | string | undefined;
3531
+ clip?: number | string | undefined;
3532
+ clipPath?: string | undefined;
3533
+ clipPathUnits?: number | string | undefined;
3534
+ clipRule?: number | string | undefined;
3535
+ colorInterpolation?: number | string | undefined;
3536
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined;
3537
+ colorProfile?: number | string | undefined;
3538
+ colorRendering?: number | string | undefined;
3539
+ contentScriptType?: number | string | undefined;
3540
+ contentStyleType?: number | string | undefined;
3541
+ cursor?: number | string | undefined;
3542
+ cx?: number | string | undefined;
3543
+ cy?: number | string | undefined;
3544
+ d?: string | undefined;
3545
+ decelerate?: number | string | undefined;
3546
+ descent?: number | string | undefined;
3547
+ diffuseConstant?: number | string | undefined;
3548
+ direction?: number | string | undefined;
3549
+ display?: number | string | undefined;
3550
+ divisor?: number | string | undefined;
3551
+ dominantBaseline?: number | string | undefined;
3552
+ dur?: number | string | undefined;
3553
+ dx?: number | string | undefined;
3554
+ dy?: number | string | undefined;
3555
+ edgeMode?: number | string | undefined;
3556
+ elevation?: number | string | undefined;
3557
+ enableBackground?: number | string | undefined;
3558
+ end?: number | string | undefined;
3559
+ exponent?: number | string | undefined;
3560
+ externalResourcesRequired?: Booleanish | undefined;
3561
+ fill?: string | undefined;
3562
+ fillOpacity?: number | string | undefined;
3563
+ fillRule?: "nonzero" | "evenodd" | "inherit" | undefined;
3564
+ filter?: string | undefined;
3565
+ filterRes?: number | string | undefined;
3566
+ filterUnits?: number | string | undefined;
3567
+ floodColor?: number | string | undefined;
3568
+ floodOpacity?: number | string | undefined;
3569
+ focusable?: Booleanish | "auto" | undefined;
3570
+ fontFamily?: string | undefined;
3571
+ fontSize?: number | string | undefined;
3572
+ fontSizeAdjust?: number | string | undefined;
3573
+ fontStretch?: number | string | undefined;
3574
+ fontStyle?: number | string | undefined;
3575
+ fontVariant?: number | string | undefined;
3576
+ fontWeight?: number | string | undefined;
3577
+ format?: number | string | undefined;
3578
+ fr?: number | string | undefined;
3579
+ from?: number | string | undefined;
3580
+ fx?: number | string | undefined;
3581
+ fy?: number | string | undefined;
3582
+ g1?: number | string | undefined;
3583
+ g2?: number | string | undefined;
3584
+ glyphName?: number | string | undefined;
3585
+ glyphOrientationHorizontal?: number | string | undefined;
3586
+ glyphOrientationVertical?: number | string | undefined;
3587
+ glyphRef?: number | string | undefined;
3588
+ gradientTransform?: string | undefined;
3589
+ gradientUnits?: string | undefined;
3590
+ hanging?: number | string | undefined;
3591
+ horizAdvX?: number | string | undefined;
3592
+ horizOriginX?: number | string | undefined;
3593
+ href?: string | undefined;
3594
+ ideographic?: number | string | undefined;
3595
+ imageRendering?: number | string | undefined;
3596
+ in2?: number | string | undefined;
3597
+ in?: string | undefined;
3598
+ intercept?: number | string | undefined;
3599
+ k1?: number | string | undefined;
3600
+ k2?: number | string | undefined;
3601
+ k3?: number | string | undefined;
3602
+ k4?: number | string | undefined;
3603
+ k?: number | string | undefined;
3604
+ kernelMatrix?: number | string | undefined;
3605
+ kernelUnitLength?: number | string | undefined;
3606
+ kerning?: number | string | undefined;
3607
+ keyPoints?: number | string | undefined;
3608
+ keySplines?: number | string | undefined;
3609
+ keyTimes?: number | string | undefined;
3610
+ lengthAdjust?: number | string | undefined;
3611
+ letterSpacing?: number | string | undefined;
3612
+ lightingColor?: number | string | undefined;
3613
+ limitingConeAngle?: number | string | undefined;
3614
+ local?: number | string | undefined;
3615
+ markerEnd?: string | undefined;
3616
+ markerHeight?: number | string | undefined;
3617
+ markerMid?: string | undefined;
3618
+ markerStart?: string | undefined;
3619
+ markerUnits?: number | string | undefined;
3620
+ markerWidth?: number | string | undefined;
3621
+ mask?: string | undefined;
3622
+ maskContentUnits?: number | string | undefined;
3623
+ maskUnits?: number | string | undefined;
3624
+ mathematical?: number | string | undefined;
3625
+ mode?: number | string | undefined;
3626
+ numOctaves?: number | string | undefined;
3627
+ offset?: number | string | undefined;
3628
+ opacity?: number | string | undefined;
3629
+ operator?: number | string | undefined;
3630
+ order?: number | string | undefined;
3631
+ orient?: number | string | undefined;
3632
+ orientation?: number | string | undefined;
3633
+ origin?: number | string | undefined;
3634
+ overflow?: number | string | undefined;
3635
+ overlinePosition?: number | string | undefined;
3636
+ overlineThickness?: number | string | undefined;
3637
+ paintOrder?: number | string | undefined;
3638
+ panose1?: number | string | undefined;
3639
+ path?: string | undefined;
3640
+ pathLength?: number | string | undefined;
3641
+ patternContentUnits?: string | undefined;
3642
+ patternTransform?: number | string | undefined;
3643
+ patternUnits?: string | undefined;
3644
+ pointerEvents?: number | string | undefined;
3645
+ points?: string | undefined;
3646
+ pointsAtX?: number | string | undefined;
3647
+ pointsAtY?: number | string | undefined;
3648
+ pointsAtZ?: number | string | undefined;
3649
+ preserveAlpha?: Booleanish | undefined;
3650
+ preserveAspectRatio?: string | undefined;
3651
+ primitiveUnits?: number | string | undefined;
3652
+ r?: number | string | undefined;
3653
+ radius?: number | string | undefined;
3654
+ refX?: number | string | undefined;
3655
+ refY?: number | string | undefined;
3656
+ renderingIntent?: number | string | undefined;
3657
+ repeatCount?: number | string | undefined;
3658
+ repeatDur?: number | string | undefined;
3659
+ requiredExtensions?: number | string | undefined;
3660
+ requiredFeatures?: number | string | undefined;
3661
+ restart?: number | string | undefined;
3662
+ result?: string | undefined;
3663
+ rotate?: number | string | undefined;
3664
+ rx?: number | string | undefined;
3665
+ ry?: number | string | undefined;
3666
+ scale?: number | string | undefined;
3667
+ seed?: number | string | undefined;
3668
+ shapeRendering?: number | string | undefined;
3669
+ slope?: number | string | undefined;
3670
+ spacing?: number | string | undefined;
3671
+ specularConstant?: number | string | undefined;
3672
+ specularExponent?: number | string | undefined;
3673
+ speed?: number | string | undefined;
3674
+ spreadMethod?: string | undefined;
3675
+ startOffset?: number | string | undefined;
3676
+ stdDeviation?: number | string | undefined;
3677
+ stemh?: number | string | undefined;
3678
+ stemv?: number | string | undefined;
3679
+ stitchTiles?: number | string | undefined;
3680
+ stopColor?: string | undefined;
3681
+ stopOpacity?: number | string | undefined;
3682
+ strikethroughPosition?: number | string | undefined;
3683
+ strikethroughThickness?: number | string | undefined;
3684
+ string?: number | string | undefined;
3685
+ stroke?: string | undefined;
3686
+ strokeDasharray?: string | number | undefined;
3687
+ strokeDashoffset?: string | number | undefined;
3688
+ strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined;
3689
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined;
3690
+ strokeMiterlimit?: number | string | undefined;
3691
+ strokeOpacity?: number | string | undefined;
3692
+ strokeWidth?: number | string | undefined;
3693
+ surfaceScale?: number | string | undefined;
3694
+ systemLanguage?: number | string | undefined;
3695
+ tableValues?: number | string | undefined;
3696
+ targetX?: number | string | undefined;
3697
+ targetY?: number | string | undefined;
3698
+ textAnchor?: string | undefined;
3699
+ textDecoration?: number | string | undefined;
3700
+ textLength?: number | string | undefined;
3701
+ textRendering?: number | string | undefined;
3702
+ to?: number | string | undefined;
3703
+ transform?: string | undefined;
3704
+ u1?: number | string | undefined;
3705
+ u2?: number | string | undefined;
3706
+ underlinePosition?: number | string | undefined;
3707
+ underlineThickness?: number | string | undefined;
3708
+ unicode?: number | string | undefined;
3709
+ unicodeBidi?: number | string | undefined;
3710
+ unicodeRange?: number | string | undefined;
3711
+ unitsPerEm?: number | string | undefined;
3712
+ vAlphabetic?: number | string | undefined;
3713
+ values?: string | undefined;
3714
+ vectorEffect?: number | string | undefined;
3715
+ version?: string | undefined;
3716
+ vertAdvY?: number | string | undefined;
3717
+ vertOriginX?: number | string | undefined;
3718
+ vertOriginY?: number | string | undefined;
3719
+ vHanging?: number | string | undefined;
3720
+ vIdeographic?: number | string | undefined;
3721
+ viewBox?: string | undefined;
3722
+ viewTarget?: number | string | undefined;
3723
+ visibility?: number | string | undefined;
3724
+ vMathematical?: number | string | undefined;
3725
+ widths?: number | string | undefined;
3726
+ wordSpacing?: number | string | undefined;
3727
+ writingMode?: number | string | undefined;
3728
+ x1?: number | string | undefined;
3729
+ x2?: number | string | undefined;
3730
+ x?: number | string | undefined;
3731
+ xChannelSelector?: string | undefined;
3732
+ xHeight?: number | string | undefined;
3733
+ xlinkActuate?: string | undefined;
3734
+ xlinkArcrole?: string | undefined;
3735
+ xlinkHref?: string | undefined;
3736
+ xlinkRole?: string | undefined;
3737
+ xlinkShow?: string | undefined;
3738
+ xlinkTitle?: string | undefined;
3739
+ xlinkType?: string | undefined;
3740
+ xmlBase?: string | undefined;
3741
+ xmlLang?: string | undefined;
3742
+ xmlns?: string | undefined;
3743
+ xmlnsXlink?: string | undefined;
3744
+ xmlSpace?: string | undefined;
3745
+ y1?: number | string | undefined;
3746
+ y2?: number | string | undefined;
3747
+ y?: number | string | undefined;
3748
+ yChannelSelector?: string | undefined;
3749
+ z?: number | string | undefined;
3750
+ zoomAndPan?: string | undefined;
3751
+ }
3752
+
3753
+ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
3754
+ allowFullScreen?: boolean | undefined;
3755
+ allowpopups?: boolean | undefined;
3756
+ autosize?: boolean | undefined;
3757
+ blinkfeatures?: string | undefined;
3758
+ disableblinkfeatures?: string | undefined;
3759
+ disableguestresize?: boolean | undefined;
3760
+ disablewebsecurity?: boolean | undefined;
3761
+ guestinstance?: string | undefined;
3762
+ httpreferrer?: string | undefined;
3763
+ nodeintegration?: boolean | undefined;
3764
+ partition?: string | undefined;
3765
+ plugins?: boolean | undefined;
3766
+ preload?: string | undefined;
3767
+ src?: string | undefined;
3768
+ useragent?: string | undefined;
3769
+ webpreferences?: string | undefined;
3770
+ }
3771
+
3772
+ //
3773
+ // React.DOM
3774
+ // ----------------------------------------------------------------------
3775
+
3776
+ interface ReactHTML {
3777
+ a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
3778
+ abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3779
+ address: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3780
+ area: DetailedHTMLFactory<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
3781
+ article: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3782
+ aside: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3783
+ audio: DetailedHTMLFactory<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
3784
+ b: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3785
+ base: DetailedHTMLFactory<BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
3786
+ bdi: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3787
+ bdo: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3788
+ big: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3789
+ blockquote: DetailedHTMLFactory<BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
3790
+ body: DetailedHTMLFactory<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
3791
+ br: DetailedHTMLFactory<HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
3792
+ button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
3793
+ canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
3794
+ caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3795
+ center: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3796
+ cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3797
+ code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3798
+ col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
3799
+ colgroup: DetailedHTMLFactory<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
3800
+ data: DetailedHTMLFactory<DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
3801
+ datalist: DetailedHTMLFactory<HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
3802
+ dd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3803
+ del: DetailedHTMLFactory<DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
3804
+ details: DetailedHTMLFactory<DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
3805
+ dfn: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3806
+ dialog: DetailedHTMLFactory<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
3807
+ div: DetailedHTMLFactory<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3808
+ dl: DetailedHTMLFactory<HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
3809
+ dt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3810
+ em: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3811
+ embed: DetailedHTMLFactory<EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
3812
+ fieldset: DetailedHTMLFactory<FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
3813
+ figcaption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3814
+ figure: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3815
+ footer: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3816
+ form: DetailedHTMLFactory<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
3817
+ h1: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3818
+ h2: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3819
+ h3: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3820
+ h4: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3821
+ h5: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3822
+ h6: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3823
+ head: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLHeadElement>;
3824
+ header: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3825
+ hgroup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3826
+ hr: DetailedHTMLFactory<HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
3827
+ html: DetailedHTMLFactory<HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
3828
+ i: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3829
+ iframe: DetailedHTMLFactory<IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
3830
+ img: DetailedHTMLFactory<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
3831
+ input: DetailedHTMLFactory<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3832
+ ins: DetailedHTMLFactory<InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
3833
+ kbd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3834
+ keygen: DetailedHTMLFactory<KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
3835
+ label: DetailedHTMLFactory<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
3836
+ legend: DetailedHTMLFactory<HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
3837
+ li: DetailedHTMLFactory<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
3838
+ link: DetailedHTMLFactory<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
3839
+ main: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3840
+ map: DetailedHTMLFactory<MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
3841
+ mark: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3842
+ menu: DetailedHTMLFactory<MenuHTMLAttributes<HTMLElement>, HTMLElement>;
3843
+ menuitem: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3844
+ meta: DetailedHTMLFactory<MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
3845
+ meter: DetailedHTMLFactory<MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
3846
+ nav: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3847
+ noscript: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3848
+ object: DetailedHTMLFactory<ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
3849
+ ol: DetailedHTMLFactory<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
3850
+ optgroup: DetailedHTMLFactory<OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
3851
+ option: DetailedHTMLFactory<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
3852
+ output: DetailedHTMLFactory<OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
3853
+ p: DetailedHTMLFactory<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
3854
+ param: DetailedHTMLFactory<ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
3855
+ picture: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3856
+ pre: DetailedHTMLFactory<HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
3857
+ progress: DetailedHTMLFactory<ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
3858
+ q: DetailedHTMLFactory<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
3859
+ rp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3860
+ rt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3861
+ ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3862
+ s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3863
+ samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3864
+ search: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3865
+ slot: DetailedHTMLFactory<SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
3866
+ script: DetailedHTMLFactory<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
3867
+ section: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3868
+ select: DetailedHTMLFactory<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
3869
+ small: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3870
+ source: DetailedHTMLFactory<SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
3871
+ span: DetailedHTMLFactory<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
3872
+ strong: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3873
+ style: DetailedHTMLFactory<StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
3874
+ sub: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3875
+ summary: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3876
+ sup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3877
+ table: DetailedHTMLFactory<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
3878
+ template: DetailedHTMLFactory<HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
3879
+ tbody: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3880
+ td: DetailedHTMLFactory<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
3881
+ textarea: DetailedHTMLFactory<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
3882
+ tfoot: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3883
+ th: DetailedHTMLFactory<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
3884
+ thead: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3885
+ time: DetailedHTMLFactory<TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
3886
+ title: DetailedHTMLFactory<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
3887
+ tr: DetailedHTMLFactory<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
3888
+ track: DetailedHTMLFactory<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
3889
+ u: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3890
+ ul: DetailedHTMLFactory<HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
3891
+ "var": DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3892
+ video: DetailedHTMLFactory<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
3893
+ wbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
3894
+ webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
3895
+ }
3896
+
3897
+ interface ReactSVG {
3898
+ animate: SVGFactory;
3899
+ circle: SVGFactory;
3900
+ clipPath: SVGFactory;
3901
+ defs: SVGFactory;
3902
+ desc: SVGFactory;
3903
+ ellipse: SVGFactory;
3904
+ feBlend: SVGFactory;
3905
+ feColorMatrix: SVGFactory;
3906
+ feComponentTransfer: SVGFactory;
3907
+ feComposite: SVGFactory;
3908
+ feConvolveMatrix: SVGFactory;
3909
+ feDiffuseLighting: SVGFactory;
3910
+ feDisplacementMap: SVGFactory;
3911
+ feDistantLight: SVGFactory;
3912
+ feDropShadow: SVGFactory;
3913
+ feFlood: SVGFactory;
3914
+ feFuncA: SVGFactory;
3915
+ feFuncB: SVGFactory;
3916
+ feFuncG: SVGFactory;
3917
+ feFuncR: SVGFactory;
3918
+ feGaussianBlur: SVGFactory;
3919
+ feImage: SVGFactory;
3920
+ feMerge: SVGFactory;
3921
+ feMergeNode: SVGFactory;
3922
+ feMorphology: SVGFactory;
3923
+ feOffset: SVGFactory;
3924
+ fePointLight: SVGFactory;
3925
+ feSpecularLighting: SVGFactory;
3926
+ feSpotLight: SVGFactory;
3927
+ feTile: SVGFactory;
3928
+ feTurbulence: SVGFactory;
3929
+ filter: SVGFactory;
3930
+ foreignObject: SVGFactory;
3931
+ g: SVGFactory;
3932
+ image: SVGFactory;
3933
+ line: SVGFactory;
3934
+ linearGradient: SVGFactory;
3935
+ marker: SVGFactory;
3936
+ mask: SVGFactory;
3937
+ metadata: SVGFactory;
3938
+ path: SVGFactory;
3939
+ pattern: SVGFactory;
3940
+ polygon: SVGFactory;
3941
+ polyline: SVGFactory;
3942
+ radialGradient: SVGFactory;
3943
+ rect: SVGFactory;
3944
+ stop: SVGFactory;
3945
+ svg: SVGFactory;
3946
+ switch: SVGFactory;
3947
+ symbol: SVGFactory;
3948
+ text: SVGFactory;
3949
+ textPath: SVGFactory;
3950
+ tspan: SVGFactory;
3951
+ use: SVGFactory;
3952
+ view: SVGFactory;
3953
+ }
3954
+
3955
+ interface ReactDOM extends ReactHTML, ReactSVG {}
3956
+
3957
+ //
3958
+ // React.PropTypes
3959
+ // ----------------------------------------------------------------------
3960
+
3961
+ type Validator<T> = PropTypes.Validator<T>;
3962
+
3963
+ type Requireable<T> = PropTypes.Requireable<T>;
3964
+
3965
+ type ValidationMap<T> = PropTypes.ValidationMap<T>;
3966
+
3967
+ type WeakValidationMap<T> = {
3968
+ [K in keyof T]?: null extends T[K] ? Validator<T[K] | null | undefined>
3969
+ : undefined extends T[K] ? Validator<T[K] | null | undefined>
3970
+ : Validator<T[K]>;
3971
+ };
3972
+
3973
+ interface ReactPropTypes {
3974
+ any: typeof PropTypes.any;
3975
+ array: typeof PropTypes.array;
3976
+ bool: typeof PropTypes.bool;
3977
+ func: typeof PropTypes.func;
3978
+ number: typeof PropTypes.number;
3979
+ object: typeof PropTypes.object;
3980
+ string: typeof PropTypes.string;
3981
+ node: typeof PropTypes.node;
3982
+ element: typeof PropTypes.element;
3983
+ instanceOf: typeof PropTypes.instanceOf;
3984
+ oneOf: typeof PropTypes.oneOf;
3985
+ oneOfType: typeof PropTypes.oneOfType;
3986
+ arrayOf: typeof PropTypes.arrayOf;
3987
+ objectOf: typeof PropTypes.objectOf;
3988
+ shape: typeof PropTypes.shape;
3989
+ exact: typeof PropTypes.exact;
3990
+ }
3991
+
3992
+ //
3993
+ // React.Children
3994
+ // ----------------------------------------------------------------------
3995
+
3996
+ /**
3997
+ * @deprecated - Use `typeof React.Children` instead.
3998
+ */
3999
+ // Sync with type of `const Children`.
4000
+ interface ReactChildren {
4001
+ map<T, C>(
4002
+ children: C | readonly C[],
4003
+ fn: (child: C, index: number) => T,
4004
+ ): C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
4005
+ forEach<C>(children: C | readonly C[], fn: (child: C, index: number) => void): void;
4006
+ count(children: any): number;
4007
+ only<C>(children: C): C extends any[] ? never : C;
4008
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
4009
+ }
4010
+
4011
+ //
4012
+ // Browser Interfaces
4013
+ // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
4014
+ // ----------------------------------------------------------------------
4015
+
4016
+ interface AbstractView {
4017
+ styleMedia: StyleMedia;
4018
+ document: Document;
4019
+ }
4020
+
4021
+ interface Touch {
4022
+ identifier: number;
4023
+ target: EventTarget;
4024
+ screenX: number;
4025
+ screenY: number;
4026
+ clientX: number;
4027
+ clientY: number;
4028
+ pageX: number;
4029
+ pageY: number;
4030
+ }
4031
+
4032
+ interface TouchList {
4033
+ [index: number]: Touch;
4034
+ length: number;
4035
+ item(index: number): Touch;
4036
+ identifiedTouch(identifier: number): Touch;
4037
+ }
4038
+
4039
+ //
4040
+ // Error Interfaces
4041
+ // ----------------------------------------------------------------------
4042
+ interface ErrorInfo {
4043
+ /**
4044
+ * Captures which component contained the exception, and its ancestors.
4045
+ */
4046
+ componentStack: string;
4047
+ }
4048
+
4049
+ namespace JSX {
4050
+ interface Element extends GlobalJSXElement {}
4051
+ interface ElementClass extends GlobalJSXElementClass {}
4052
+ interface ElementAttributesProperty extends GlobalJSXElementAttributesProperty {}
4053
+ interface ElementChildrenAttribute extends GlobalJSXElementChildrenAttribute {}
4054
+
4055
+ type LibraryManagedAttributes<C, P> = GlobalJSXLibraryManagedAttributes<C, P>;
4056
+
4057
+ interface IntrinsicAttributes extends GlobalJSXIntrinsicAttributes {}
4058
+ interface IntrinsicClassAttributes<T> extends GlobalJSXIntrinsicClassAttributes<T> {}
4059
+ interface IntrinsicElements extends GlobalJSXIntrinsicElements {}
4060
+ }
4061
+ }
4062
+
4063
+ // naked 'any' type in a conditional type will short circuit and union both the then/else branches
4064
+ // so boolean is only resolved for T = any
4065
+ type IsExactlyAny<T> = boolean extends (T extends never ? true : false) ? true : false;
4066
+
4067
+ type ExactlyAnyPropertyKeys<T> = { [K in keyof T]: IsExactlyAny<T[K]> extends true ? K : never }[keyof T];
4068
+ type NotExactlyAnyPropertyKeys<T> = Exclude<keyof T, ExactlyAnyPropertyKeys<T>>;
4069
+
4070
+ // Try to resolve ill-defined props like for JS users: props can be any, or sometimes objects with properties of type any
4071
+ type MergePropTypes<P, T> =
4072
+ // Distribute over P in case it is a union type
4073
+ P extends any
4074
+ // If props is type any, use propTypes definitions
4075
+ ? IsExactlyAny<P> extends true ? T
4076
+ // If declared props have indexed properties, ignore inferred props entirely as keyof gets widened
4077
+ : string extends keyof P ? P
4078
+ // Prefer declared types which are not exactly any
4079
+ :
4080
+ & Pick<P, NotExactlyAnyPropertyKeys<P>>
4081
+ // For props which are exactly any, use the type inferred from propTypes if present
4082
+ & Pick<T, Exclude<keyof T, NotExactlyAnyPropertyKeys<P>>>
4083
+ // Keep leftover props not specified in propTypes
4084
+ & Pick<P, Exclude<keyof P, keyof T>>
4085
+ : never;
4086
+
4087
+ type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
4088
+
4089
+ // Any prop that has a default prop becomes optional, but its type is unchanged
4090
+ // Undeclared default props are augmented into the resulting allowable attributes
4091
+ // If declared props have indexed properties, ignore default props entirely as keyof gets widened
4092
+ // Wrap in an outer-level conditional type to allow distribution over props that are unions
4093
+ type Defaultize<P, D> = P extends any ? string extends keyof P ? P
4094
+ :
4095
+ & Pick<P, Exclude<keyof P, keyof D>>
4096
+ & InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
4097
+ & InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
4098
+ : never;
4099
+
4100
+ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D }
4101
+ ? Defaultize<MergePropTypes<P, PropTypes.InferProps<T>>, D>
4102
+ : C extends { propTypes: infer T } ? MergePropTypes<P, PropTypes.InferProps<T>>
4103
+ : C extends { defaultProps: infer D } ? Defaultize<P, D>
4104
+ : P;
4105
+
4106
+ declare global {
4107
+ /**
4108
+ * @deprecated Use `React.JSX` instead of the global `JSX` namespace.
4109
+ */
4110
+ namespace JSX {
4111
+ interface Element extends React.ReactElement<any, any> {}
4112
+ interface ElementClass extends React.Component<any> {
4113
+ render(): React.ReactNode;
4114
+ }
4115
+ interface ElementAttributesProperty {
4116
+ props: {};
4117
+ }
4118
+ interface ElementChildrenAttribute {
4119
+ children: {};
4120
+ }
4121
+
4122
+ // We can't recurse forever because `type` can't be self-referential;
4123
+ // let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa
4124
+ type LibraryManagedAttributes<C, P> = C extends
4125
+ React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
4126
+ ? T extends React.MemoExoticComponent<infer U> | React.LazyExoticComponent<infer U>
4127
+ ? ReactManagedAttributes<U, P>
4128
+ : ReactManagedAttributes<T, P>
4129
+ : ReactManagedAttributes<C, P>;
4130
+
4131
+ interface IntrinsicAttributes extends React.Attributes {}
4132
+ interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {}
4133
+
4134
+ interface IntrinsicElements {
4135
+ // HTML
4136
+ a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
4137
+ abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4138
+ address: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4139
+ area: React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
4140
+ article: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4141
+ aside: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4142
+ audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
4143
+ b: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4144
+ base: React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
4145
+ bdi: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4146
+ bdo: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4147
+ big: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4148
+ blockquote: React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
4149
+ body: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
4150
+ br: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
4151
+ button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
4152
+ canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
4153
+ caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4154
+ center: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4155
+ cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4156
+ code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4157
+ col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
4158
+ colgroup: React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
4159
+ data: React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
4160
+ datalist: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
4161
+ dd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4162
+ del: React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
4163
+ details: React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
4164
+ dfn: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4165
+ dialog: React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
4166
+ div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
4167
+ dl: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
4168
+ dt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4169
+ em: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4170
+ embed: React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
4171
+ fieldset: React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
4172
+ figcaption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4173
+ figure: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4174
+ footer: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4175
+ form: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
4176
+ h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4177
+ h2: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4178
+ h3: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4179
+ h4: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4180
+ h5: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4181
+ h6: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
4182
+ head: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>;
4183
+ header: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4184
+ hgroup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4185
+ hr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
4186
+ html: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
4187
+ i: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4188
+ iframe: React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
4189
+ img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
4190
+ input: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
4191
+ ins: React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
4192
+ kbd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4193
+ keygen: React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
4194
+ label: React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
4195
+ legend: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
4196
+ li: React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
4197
+ link: React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
4198
+ main: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4199
+ map: React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
4200
+ mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4201
+ menu: React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>;
4202
+ menuitem: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4203
+ meta: React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
4204
+ meter: React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
4205
+ nav: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4206
+ noindex: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4207
+ noscript: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4208
+ object: React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
4209
+ ol: React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
4210
+ optgroup: React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
4211
+ option: React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
4212
+ output: React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
4213
+ p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
4214
+ param: React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
4215
+ picture: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4216
+ pre: React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
4217
+ progress: React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
4218
+ q: React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
4219
+ rp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4220
+ rt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4221
+ ruby: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4222
+ s: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4223
+ samp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4224
+ search: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4225
+ slot: React.DetailedHTMLProps<React.SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
4226
+ script: React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
4227
+ section: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4228
+ select: React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
4229
+ small: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4230
+ source: React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
4231
+ span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
4232
+ strong: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4233
+ style: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
4234
+ sub: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4235
+ summary: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4236
+ sup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4237
+ table: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
4238
+ template: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
4239
+ tbody: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
4240
+ td: React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
4241
+ textarea: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
4242
+ tfoot: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
4243
+ th: React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
4244
+ thead: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
4245
+ time: React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
4246
+ title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
4247
+ tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
4248
+ track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
4249
+ u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4250
+ ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
4251
+ "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4252
+ video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
4253
+ wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
4254
+ webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
4255
+
4256
+ // SVG
4257
+ svg: React.SVGProps<SVGSVGElement>;
4258
+
4259
+ animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.
4260
+ animateMotion: React.SVGProps<SVGElement>;
4261
+ animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.
4262
+ circle: React.SVGProps<SVGCircleElement>;
4263
+ clipPath: React.SVGProps<SVGClipPathElement>;
4264
+ defs: React.SVGProps<SVGDefsElement>;
4265
+ desc: React.SVGProps<SVGDescElement>;
4266
+ ellipse: React.SVGProps<SVGEllipseElement>;
4267
+ feBlend: React.SVGProps<SVGFEBlendElement>;
4268
+ feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;
4269
+ feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;
4270
+ feComposite: React.SVGProps<SVGFECompositeElement>;
4271
+ feConvolveMatrix: React.SVGProps<SVGFEConvolveMatrixElement>;
4272
+ feDiffuseLighting: React.SVGProps<SVGFEDiffuseLightingElement>;
4273
+ feDisplacementMap: React.SVGProps<SVGFEDisplacementMapElement>;
4274
+ feDistantLight: React.SVGProps<SVGFEDistantLightElement>;
4275
+ feDropShadow: React.SVGProps<SVGFEDropShadowElement>;
4276
+ feFlood: React.SVGProps<SVGFEFloodElement>;
4277
+ feFuncA: React.SVGProps<SVGFEFuncAElement>;
4278
+ feFuncB: React.SVGProps<SVGFEFuncBElement>;
4279
+ feFuncG: React.SVGProps<SVGFEFuncGElement>;
4280
+ feFuncR: React.SVGProps<SVGFEFuncRElement>;
4281
+ feGaussianBlur: React.SVGProps<SVGFEGaussianBlurElement>;
4282
+ feImage: React.SVGProps<SVGFEImageElement>;
4283
+ feMerge: React.SVGProps<SVGFEMergeElement>;
4284
+ feMergeNode: React.SVGProps<SVGFEMergeNodeElement>;
4285
+ feMorphology: React.SVGProps<SVGFEMorphologyElement>;
4286
+ feOffset: React.SVGProps<SVGFEOffsetElement>;
4287
+ fePointLight: React.SVGProps<SVGFEPointLightElement>;
4288
+ feSpecularLighting: React.SVGProps<SVGFESpecularLightingElement>;
4289
+ feSpotLight: React.SVGProps<SVGFESpotLightElement>;
4290
+ feTile: React.SVGProps<SVGFETileElement>;
4291
+ feTurbulence: React.SVGProps<SVGFETurbulenceElement>;
4292
+ filter: React.SVGProps<SVGFilterElement>;
4293
+ foreignObject: React.SVGProps<SVGForeignObjectElement>;
4294
+ g: React.SVGProps<SVGGElement>;
4295
+ image: React.SVGProps<SVGImageElement>;
4296
+ line: React.SVGLineElementAttributes<SVGLineElement>;
4297
+ linearGradient: React.SVGProps<SVGLinearGradientElement>;
4298
+ marker: React.SVGProps<SVGMarkerElement>;
4299
+ mask: React.SVGProps<SVGMaskElement>;
4300
+ metadata: React.SVGProps<SVGMetadataElement>;
4301
+ mpath: React.SVGProps<SVGElement>;
4302
+ path: React.SVGProps<SVGPathElement>;
4303
+ pattern: React.SVGProps<SVGPatternElement>;
4304
+ polygon: React.SVGProps<SVGPolygonElement>;
4305
+ polyline: React.SVGProps<SVGPolylineElement>;
4306
+ radialGradient: React.SVGProps<SVGRadialGradientElement>;
4307
+ rect: React.SVGProps<SVGRectElement>;
4308
+ stop: React.SVGProps<SVGStopElement>;
4309
+ switch: React.SVGProps<SVGSwitchElement>;
4310
+ symbol: React.SVGProps<SVGSymbolElement>;
4311
+ text: React.SVGTextElementAttributes<SVGTextElement>;
4312
+ textPath: React.SVGProps<SVGTextPathElement>;
4313
+ tspan: React.SVGProps<SVGTSpanElement>;
4314
+ use: React.SVGProps<SVGUseElement>;
4315
+ view: React.SVGProps<SVGViewElement>;
4316
+ }
4317
+ }
4318
+ }
4319
+
4320
+ // React.JSX needs to point to global.JSX to keep global module augmentations intact.
4321
+ // But we can't access global.JSX so we need to create these aliases instead.
4322
+ // Once the global JSX namespace will be removed we replace React.JSX with the contents of global.JSX
4323
+ interface GlobalJSXElement extends JSX.Element {}
4324
+ interface GlobalJSXElementClass extends JSX.ElementClass {}
4325
+ interface GlobalJSXElementAttributesProperty extends JSX.ElementAttributesProperty {}
4326
+ interface GlobalJSXElementChildrenAttribute extends JSX.ElementChildrenAttribute {}
4327
+
4328
+ type GlobalJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<C, P>;
4329
+
4330
+ interface GlobalJSXIntrinsicAttributes extends JSX.IntrinsicAttributes {}
4331
+ interface GlobalJSXIntrinsicClassAttributes<T> extends JSX.IntrinsicClassAttributes<T> {}
4332
+
4333
+ interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}