@grapecity-software/gcdocs.pdfviewer 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (582) hide show
  1. package/CHANGELOG.md +2886 -0
  2. package/README.md +390 -0
  3. package/docs/.nojekyll +1 -0
  4. package/docs/assets/custom.css +19 -0
  5. package/docs/assets/highlight.css +134 -0
  6. package/docs/assets/main.js +54 -0
  7. package/docs/assets/search.js +1 -0
  8. package/docs/assets/style.css +1224 -0
  9. package/docs/assets/widgets.png +0 -0
  10. package/docs/assets/widgets@2x.png +0 -0
  11. package/docs/classes/AnnotationBase.html +349 -0
  12. package/docs/classes/ButtonWidget.html +512 -0
  13. package/docs/classes/ChoiceWidget.html +487 -0
  14. package/docs/classes/CircleAnnotation.html +425 -0
  15. package/docs/classes/DsPdfViewer.html +4095 -0
  16. package/docs/classes/FileAttachmentAnnotation.html +422 -0
  17. package/docs/classes/FreeTextAnnotation.html +405 -0
  18. package/docs/classes/GcPdfSearcher.html +362 -0
  19. package/docs/classes/GcPdfViewer.html +3923 -0
  20. package/docs/classes/HighlightAnnotation.html +390 -0
  21. package/docs/classes/InkAnnotation.html +400 -0
  22. package/docs/classes/LineAnnotation.html +422 -0
  23. package/docs/classes/LinkAnnotation.html +390 -0
  24. package/docs/classes/MarkupAnnotation.html +407 -0
  25. package/docs/classes/PolyLineAnnotation.html +406 -0
  26. package/docs/classes/PolygonAnnotation.html +406 -0
  27. package/docs/classes/PopupAnnotation.html +393 -0
  28. package/docs/classes/RedactAnnotation.html +439 -0
  29. package/docs/classes/SignatureAnnotation.html +398 -0
  30. package/docs/classes/SoundAnnotation.html +438 -0
  31. package/docs/classes/SquareAnnotation.html +397 -0
  32. package/docs/classes/SquigglyAnnotation.html +390 -0
  33. package/docs/classes/StampAnnotation.html +400 -0
  34. package/docs/classes/StrikeOutAnnotation.html +390 -0
  35. package/docs/classes/TextAnnotation.html +404 -0
  36. package/docs/classes/TextWidget.html +465 -0
  37. package/docs/classes/UnderlineAnnotation.html +390 -0
  38. package/docs/classes/ViewerOptions.html +1243 -0
  39. package/docs/classes/WidgetAnnotation.html +454 -0
  40. package/docs/enums/AnnotationTypeCode.html +196 -0
  41. package/docs/enums/ModificationType.html +86 -0
  42. package/docs/enums/SharedAccessMode.html +79 -0
  43. package/docs/enums/TextAlignmentType.html +66 -0
  44. package/docs/index.html +222 -0
  45. package/docs/interfaces/IGCEventBus.html +106 -0
  46. package/docs/types/AnnotationMarkedStateType.html +126 -0
  47. package/docs/types/AnnotationReviewStateType.html +126 -0
  48. package/docs/types/AnnotationStateModel.html +126 -0
  49. package/docs/types/AnnotationTypeName.html +126 -0
  50. package/docs/types/BusEventName.html +126 -0
  51. package/docs/types/DocumentListItem.html +146 -0
  52. package/docs/types/FieldAppearanceRenderingType.html +130 -0
  53. package/docs/types/FormFieldMapping.html +126 -0
  54. package/docs/types/FormFillerSettings.html +257 -0
  55. package/docs/types/GcProps.html +237 -0
  56. package/docs/types/InputFieldMapping.html +175 -0
  57. package/docs/types/JsCancelEventArgs.html +137 -0
  58. package/docs/types/JsEventArgs.html +133 -0
  59. package/docs/types/JsExecutionConfig.html +165 -0
  60. package/docs/types/KeyboardShortcutDefinition.html +149 -0
  61. package/docs/types/KeyboardShortcutTool.html +126 -0
  62. package/docs/types/LineEndStyle.html +126 -0
  63. package/docs/types/LinkDestinationType.html +126 -0
  64. package/docs/types/LinkType.html +126 -0
  65. package/docs/types/LogLevel.html +128 -0
  66. package/docs/types/ModificationsState.html +145 -0
  67. package/docs/types/NamedAction.html +127 -0
  68. package/docs/types/OpenAction.html +148 -0
  69. package/docs/types/OpenParameters.html +126 -0
  70. package/docs/types/OptionalContentConfig.html +195 -0
  71. package/docs/types/OptionalContentGroup.html +194 -0
  72. package/docs/types/PageLayout.html +126 -0
  73. package/docs/types/PageMode.html +126 -0
  74. package/docs/types/PageModification.html +137 -0
  75. package/docs/types/PageStructureChange.html +139 -0
  76. package/docs/types/PageViewport.html +221 -0
  77. package/docs/types/PdfOrganizerSettings.html +147 -0
  78. package/docs/types/ReplyToolSettings.html +196 -0
  79. package/docs/types/RotationInit.html +155 -0
  80. package/docs/types/RulerLine.html +146 -0
  81. package/docs/types/SaveSettings.html +191 -0
  82. package/docs/types/ScrollPageIntoViewOptions.html +126 -0
  83. package/docs/types/SharedDocumentInfo.html +139 -0
  84. package/docs/types/SignToolSettings.html +437 -0
  85. package/docs/types/SignatureInfo.html +158 -0
  86. package/docs/types/SignatureInformation.html +145 -0
  87. package/docs/types/StampCategory.html +159 -0
  88. package/docs/types/StructTreeContent.html +144 -0
  89. package/docs/types/StructTreeNode.html +141 -0
  90. package/docs/types/StructureChanges.html +142 -0
  91. package/docs/types/SupportApiSettings.html +199 -0
  92. package/docs/types/TextMarkupContextMenuSettings.html +139 -0
  93. package/docs/types/ToolbarButtonKey.html +126 -0
  94. package/docs/types/UndoChangeName.html +126 -0
  95. package/docs/types/UserAccess.html +133 -0
  96. package/docs/types/ViewerFeatureName.html +128 -0
  97. package/docs/types/ViewerPreferences.html +178 -0
  98. package/docs/types/WidgetFieldTypeName.html +129 -0
  99. package/docs.html +19 -0
  100. package/gcpdfviewer.js +2 -0
  101. package/gcpdfviewer.worker.js +2 -0
  102. package/index.html +43 -0
  103. package/localization/en-pdf-viewer.json +1587 -0
  104. package/localization/en-viewer-base.json +73 -0
  105. package/localization/localization_example.html +55 -0
  106. package/package.json +27 -0
  107. package/resources/bcmaps/78-EUC-H.bin +0 -0
  108. package/resources/bcmaps/78-EUC-V.bin +0 -0
  109. package/resources/bcmaps/78-H.bin +0 -0
  110. package/resources/bcmaps/78-RKSJ-H.bin +0 -0
  111. package/resources/bcmaps/78-RKSJ-V.bin +0 -0
  112. package/resources/bcmaps/78-V.bin +0 -0
  113. package/resources/bcmaps/78ms-RKSJ-H.bin +0 -0
  114. package/resources/bcmaps/78ms-RKSJ-V.bin +0 -0
  115. package/resources/bcmaps/83pv-RKSJ-H.bin +0 -0
  116. package/resources/bcmaps/90ms-RKSJ-H.bin +0 -0
  117. package/resources/bcmaps/90ms-RKSJ-V.bin +0 -0
  118. package/resources/bcmaps/90msp-RKSJ-H.bin +0 -0
  119. package/resources/bcmaps/90msp-RKSJ-V.bin +0 -0
  120. package/resources/bcmaps/90pv-RKSJ-H.bin +0 -0
  121. package/resources/bcmaps/90pv-RKSJ-V.bin +0 -0
  122. package/resources/bcmaps/Add-H.bin +0 -0
  123. package/resources/bcmaps/Add-RKSJ-H.bin +0 -0
  124. package/resources/bcmaps/Add-RKSJ-V.bin +0 -0
  125. package/resources/bcmaps/Add-V.bin +0 -0
  126. package/resources/bcmaps/Adobe-CNS1-0.bin +0 -0
  127. package/resources/bcmaps/Adobe-CNS1-1.bin +0 -0
  128. package/resources/bcmaps/Adobe-CNS1-2.bin +0 -0
  129. package/resources/bcmaps/Adobe-CNS1-3.bin +0 -0
  130. package/resources/bcmaps/Adobe-CNS1-4.bin +0 -0
  131. package/resources/bcmaps/Adobe-CNS1-5.bin +0 -0
  132. package/resources/bcmaps/Adobe-CNS1-6.bin +0 -0
  133. package/resources/bcmaps/Adobe-CNS1-UCS2.bin +0 -0
  134. package/resources/bcmaps/Adobe-GB1-0.bin +0 -0
  135. package/resources/bcmaps/Adobe-GB1-1.bin +0 -0
  136. package/resources/bcmaps/Adobe-GB1-2.bin +0 -0
  137. package/resources/bcmaps/Adobe-GB1-3.bin +0 -0
  138. package/resources/bcmaps/Adobe-GB1-4.bin +0 -0
  139. package/resources/bcmaps/Adobe-GB1-5.bin +0 -0
  140. package/resources/bcmaps/Adobe-GB1-UCS2.bin +0 -0
  141. package/resources/bcmaps/Adobe-Japan1-0.bin +0 -0
  142. package/resources/bcmaps/Adobe-Japan1-1.bin +0 -0
  143. package/resources/bcmaps/Adobe-Japan1-2.bin +0 -0
  144. package/resources/bcmaps/Adobe-Japan1-3.bin +0 -0
  145. package/resources/bcmaps/Adobe-Japan1-4.bin +0 -0
  146. package/resources/bcmaps/Adobe-Japan1-5.bin +0 -0
  147. package/resources/bcmaps/Adobe-Japan1-6.bin +0 -0
  148. package/resources/bcmaps/Adobe-Japan1-UCS2.bin +0 -0
  149. package/resources/bcmaps/Adobe-Korea1-0.bin +0 -0
  150. package/resources/bcmaps/Adobe-Korea1-1.bin +0 -0
  151. package/resources/bcmaps/Adobe-Korea1-2.bin +0 -0
  152. package/resources/bcmaps/Adobe-Korea1-UCS2.bin +0 -0
  153. package/resources/bcmaps/B5-H.bin +0 -0
  154. package/resources/bcmaps/B5-V.bin +0 -0
  155. package/resources/bcmaps/B5pc-H.bin +0 -0
  156. package/resources/bcmaps/B5pc-V.bin +0 -0
  157. package/resources/bcmaps/CNS-EUC-H.bin +0 -0
  158. package/resources/bcmaps/CNS-EUC-V.bin +0 -0
  159. package/resources/bcmaps/CNS1-H.bin +0 -0
  160. package/resources/bcmaps/CNS1-V.bin +0 -0
  161. package/resources/bcmaps/CNS2-H.bin +0 -0
  162. package/resources/bcmaps/CNS2-V.bin +3 -0
  163. package/resources/bcmaps/ETHK-B5-H.bin +0 -0
  164. package/resources/bcmaps/ETHK-B5-V.bin +0 -0
  165. package/resources/bcmaps/ETen-B5-H.bin +0 -0
  166. package/resources/bcmaps/ETen-B5-V.bin +0 -0
  167. package/resources/bcmaps/ETenms-B5-H.bin +3 -0
  168. package/resources/bcmaps/ETenms-B5-V.bin +0 -0
  169. package/resources/bcmaps/EUC-H.bin +0 -0
  170. package/resources/bcmaps/EUC-V.bin +0 -0
  171. package/resources/bcmaps/Ext-H.bin +0 -0
  172. package/resources/bcmaps/Ext-RKSJ-H.bin +0 -0
  173. package/resources/bcmaps/Ext-RKSJ-V.bin +0 -0
  174. package/resources/bcmaps/Ext-V.bin +0 -0
  175. package/resources/bcmaps/GB-EUC-H.bin +0 -0
  176. package/resources/bcmaps/GB-EUC-V.bin +0 -0
  177. package/resources/bcmaps/GB-H.bin +4 -0
  178. package/resources/bcmaps/GB-V.bin +0 -0
  179. package/resources/bcmaps/GBK-EUC-H.bin +0 -0
  180. package/resources/bcmaps/GBK-EUC-V.bin +0 -0
  181. package/resources/bcmaps/GBK2K-H.bin +0 -0
  182. package/resources/bcmaps/GBK2K-V.bin +0 -0
  183. package/resources/bcmaps/GBKp-EUC-H.bin +0 -0
  184. package/resources/bcmaps/GBKp-EUC-V.bin +0 -0
  185. package/resources/bcmaps/GBT-EUC-H.bin +0 -0
  186. package/resources/bcmaps/GBT-EUC-V.bin +0 -0
  187. package/resources/bcmaps/GBT-H.bin +0 -0
  188. package/resources/bcmaps/GBT-V.bin +0 -0
  189. package/resources/bcmaps/GBTpc-EUC-H.bin +0 -0
  190. package/resources/bcmaps/GBTpc-EUC-V.bin +0 -0
  191. package/resources/bcmaps/GBpc-EUC-H.bin +0 -0
  192. package/resources/bcmaps/GBpc-EUC-V.bin +0 -0
  193. package/resources/bcmaps/H.bin +0 -0
  194. package/resources/bcmaps/HKdla-B5-H.bin +0 -0
  195. package/resources/bcmaps/HKdla-B5-V.bin +0 -0
  196. package/resources/bcmaps/HKdlb-B5-H.bin +0 -0
  197. package/resources/bcmaps/HKdlb-B5-V.bin +0 -0
  198. package/resources/bcmaps/HKgccs-B5-H.bin +0 -0
  199. package/resources/bcmaps/HKgccs-B5-V.bin +0 -0
  200. package/resources/bcmaps/HKm314-B5-H.bin +0 -0
  201. package/resources/bcmaps/HKm314-B5-V.bin +0 -0
  202. package/resources/bcmaps/HKm471-B5-H.bin +0 -0
  203. package/resources/bcmaps/HKm471-B5-V.bin +0 -0
  204. package/resources/bcmaps/HKscs-B5-H.bin +0 -0
  205. package/resources/bcmaps/HKscs-B5-V.bin +0 -0
  206. package/resources/bcmaps/Hankaku.bin +0 -0
  207. package/resources/bcmaps/Hiragana.bin +0 -0
  208. package/resources/bcmaps/KSC-EUC-H.bin +0 -0
  209. package/resources/bcmaps/KSC-EUC-V.bin +0 -0
  210. package/resources/bcmaps/KSC-H.bin +0 -0
  211. package/resources/bcmaps/KSC-Johab-H.bin +0 -0
  212. package/resources/bcmaps/KSC-Johab-V.bin +0 -0
  213. package/resources/bcmaps/KSC-V.bin +0 -0
  214. package/resources/bcmaps/KSCms-UHC-H.bin +0 -0
  215. package/resources/bcmaps/KSCms-UHC-HW-H.bin +0 -0
  216. package/resources/bcmaps/KSCms-UHC-HW-V.bin +0 -0
  217. package/resources/bcmaps/KSCms-UHC-V.bin +0 -0
  218. package/resources/bcmaps/KSCpc-EUC-H.bin +0 -0
  219. package/resources/bcmaps/KSCpc-EUC-V.bin +0 -0
  220. package/resources/bcmaps/Katakana.bin +0 -0
  221. package/resources/bcmaps/LICENSE +36 -0
  222. package/resources/bcmaps/NWP-H.bin +0 -0
  223. package/resources/bcmaps/NWP-V.bin +0 -0
  224. package/resources/bcmaps/RKSJ-H.bin +0 -0
  225. package/resources/bcmaps/RKSJ-V.bin +0 -0
  226. package/resources/bcmaps/Roman.bin +0 -0
  227. package/resources/bcmaps/UniCNS-UCS2-H.bin +0 -0
  228. package/resources/bcmaps/UniCNS-UCS2-V.bin +0 -0
  229. package/resources/bcmaps/UniCNS-UTF16-H.bin +0 -0
  230. package/resources/bcmaps/UniCNS-UTF16-V.bin +0 -0
  231. package/resources/bcmaps/UniCNS-UTF32-H.bin +0 -0
  232. package/resources/bcmaps/UniCNS-UTF32-V.bin +0 -0
  233. package/resources/bcmaps/UniCNS-UTF8-H.bin +0 -0
  234. package/resources/bcmaps/UniCNS-UTF8-V.bin +0 -0
  235. package/resources/bcmaps/UniGB-UCS2-H.bin +0 -0
  236. package/resources/bcmaps/UniGB-UCS2-V.bin +0 -0
  237. package/resources/bcmaps/UniGB-UTF16-H.bin +0 -0
  238. package/resources/bcmaps/UniGB-UTF16-V.bin +0 -0
  239. package/resources/bcmaps/UniGB-UTF32-H.bin +0 -0
  240. package/resources/bcmaps/UniGB-UTF32-V.bin +0 -0
  241. package/resources/bcmaps/UniGB-UTF8-H.bin +0 -0
  242. package/resources/bcmaps/UniGB-UTF8-V.bin +0 -0
  243. package/resources/bcmaps/UniJIS-UCS2-H.bin +0 -0
  244. package/resources/bcmaps/UniJIS-UCS2-HW-H.bin +0 -0
  245. package/resources/bcmaps/UniJIS-UCS2-HW-V.bin +0 -0
  246. package/resources/bcmaps/UniJIS-UCS2-V.bin +0 -0
  247. package/resources/bcmaps/UniJIS-UTF16-H.bin +0 -0
  248. package/resources/bcmaps/UniJIS-UTF16-V.bin +0 -0
  249. package/resources/bcmaps/UniJIS-UTF32-H.bin +0 -0
  250. package/resources/bcmaps/UniJIS-UTF32-V.bin +0 -0
  251. package/resources/bcmaps/UniJIS-UTF8-H.bin +0 -0
  252. package/resources/bcmaps/UniJIS-UTF8-V.bin +0 -0
  253. package/resources/bcmaps/UniJIS2004-UTF16-H.bin +0 -0
  254. package/resources/bcmaps/UniJIS2004-UTF16-V.bin +0 -0
  255. package/resources/bcmaps/UniJIS2004-UTF32-H.bin +0 -0
  256. package/resources/bcmaps/UniJIS2004-UTF32-V.bin +0 -0
  257. package/resources/bcmaps/UniJIS2004-UTF8-H.bin +0 -0
  258. package/resources/bcmaps/UniJIS2004-UTF8-V.bin +0 -0
  259. package/resources/bcmaps/UniJISPro-UCS2-HW-V.bin +0 -0
  260. package/resources/bcmaps/UniJISPro-UCS2-V.bin +0 -0
  261. package/resources/bcmaps/UniJISPro-UTF8-V.bin +0 -0
  262. package/resources/bcmaps/UniJISX0213-UTF32-H.bin +0 -0
  263. package/resources/bcmaps/UniJISX0213-UTF32-V.bin +0 -0
  264. package/resources/bcmaps/UniJISX02132004-UTF32-H.bin +0 -0
  265. package/resources/bcmaps/UniJISX02132004-UTF32-V.bin +0 -0
  266. package/resources/bcmaps/UniKS-UCS2-H.bin +0 -0
  267. package/resources/bcmaps/UniKS-UCS2-V.bin +0 -0
  268. package/resources/bcmaps/UniKS-UTF16-H.bin +0 -0
  269. package/resources/bcmaps/UniKS-UTF16-V.bin +0 -0
  270. package/resources/bcmaps/UniKS-UTF32-H.bin +0 -0
  271. package/resources/bcmaps/UniKS-UTF32-V.bin +0 -0
  272. package/resources/bcmaps/UniKS-UTF8-H.bin +0 -0
  273. package/resources/bcmaps/UniKS-UTF8-V.bin +0 -0
  274. package/resources/bcmaps/V.bin +0 -0
  275. package/resources/bcmaps/WP-Symbol.bin +0 -0
  276. package/resources/standard_fonts/FoxitDingbats.pfb +0 -0
  277. package/resources/standard_fonts/FoxitFixed.pfb +0 -0
  278. package/resources/standard_fonts/FoxitFixedBold.pfb +0 -0
  279. package/resources/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  280. package/resources/standard_fonts/FoxitFixedItalic.pfb +0 -0
  281. package/resources/standard_fonts/FoxitSans.pfb +0 -0
  282. package/resources/standard_fonts/FoxitSansBold.pfb +0 -0
  283. package/resources/standard_fonts/FoxitSansBoldItalic.pfb +0 -0
  284. package/resources/standard_fonts/FoxitSansItalic.pfb +0 -0
  285. package/resources/standard_fonts/FoxitSerif.pfb +0 -0
  286. package/resources/standard_fonts/FoxitSerifBold.pfb +0 -0
  287. package/resources/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  288. package/resources/standard_fonts/FoxitSerifItalic.pfb +0 -0
  289. package/resources/standard_fonts/FoxitSymbol.pfb +0 -0
  290. package/resources/standard_fonts/LICENSE_FOXIT +27 -0
  291. package/resources/standard_fonts/LICENSE_LIBERATION +102 -0
  292. package/resources/standard_fonts/LiberationSans-Bold.ttf +0 -0
  293. package/resources/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  294. package/resources/standard_fonts/LiberationSans-Italic.ttf +0 -0
  295. package/resources/standard_fonts/LiberationSans-Regular.ttf +0 -0
  296. package/resources/standard_fonts/README.md +11 -0
  297. package/themes/dark-yellow.css +1 -0
  298. package/themes/dark-yellow.jscss +7 -0
  299. package/themes/dark.css +1 -0
  300. package/themes/dark.jscss +7 -0
  301. package/themes/gc-blue.css +1 -0
  302. package/themes/gc-blue.jscss +7 -0
  303. package/themes/light-blue.css +1 -0
  304. package/themes/light-blue.jscss +7 -0
  305. package/themes/light.css +1 -0
  306. package/themes/light.jscss +7 -0
  307. package/themes/viewer.css +1 -0
  308. package/themes/viewer.jscss +7 -0
  309. package/typings/AcroForm/AcroForm.d.ts +3 -0
  310. package/typings/AcroForm/index.d.ts +4 -0
  311. package/typings/AcroForm/state.d.ts +4 -0
  312. package/typings/AcroForm/types.d.ts +15 -0
  313. package/typings/Annotations/AnnotationPropertyDescriptors.d.ts +88 -0
  314. package/typings/Annotations/AnnotationState.d.ts +5 -0
  315. package/typings/Annotations/AnnotationTypes.d.ts +353 -0
  316. package/typings/Annotations/Annotations.d.ts +151 -0
  317. package/typings/Annotations/Editors/CalloutLineEditor.d.ts +19 -0
  318. package/typings/Annotations/Editors/CancelableEditorBase.d.ts +34 -0
  319. package/typings/Annotations/Editors/ChoiceOptionsEditor.d.ts +21 -0
  320. package/typings/Annotations/Editors/ColorEditor/ColorEditor.d.ts +13 -0
  321. package/typings/Annotations/Editors/ColorEditor/Localization.d.ts +2 -0
  322. package/typings/Annotations/Editors/ColorEditor/StandardPalette.d.ts +3 -0
  323. package/typings/Annotations/Editors/ColorEditor/types.d.ts +21 -0
  324. package/typings/Annotations/Editors/FileEditor.d.ts +42 -0
  325. package/typings/Annotations/Editors/FloatEditor.d.ts +43 -0
  326. package/typings/Annotations/Editors/ImageFileEditor.d.ts +37 -0
  327. package/typings/Annotations/Editors/JsCodeAreaEditor.d.ts +18 -0
  328. package/typings/Annotations/Editors/KeyValuePairEditor.d.ts +20 -0
  329. package/typings/Annotations/Editors/LinkAnnotationHelper.d.ts +18 -0
  330. package/typings/Annotations/Editors/LinkDestTypeEditor.d.ts +18 -0
  331. package/typings/Annotations/Editors/MediaFileEditor.d.ts +7 -0
  332. package/typings/Annotations/Editors/MediaPosterFileEditor.d.ts +9 -0
  333. package/typings/Annotations/Editors/NullableIntEditor.d.ts +39 -0
  334. package/typings/Annotations/Editors/ParentIdEditor.d.ts +22 -0
  335. package/typings/Annotations/Editors/PlaceholderEditorStub.d.ts +15 -0
  336. package/typings/Annotations/Editors/PreserveStampSizeAspectToggle.d.ts +15 -0
  337. package/typings/Annotations/Editors/SelectFileHelper.d.ts +24 -0
  338. package/typings/Annotations/Editors/SoundFileEditor.d.ts +41 -0
  339. package/typings/Annotations/Editors/TextAreaEditor.d.ts +23 -0
  340. package/typings/Annotations/Elements/CheckBoxElement.d.ts +2 -0
  341. package/typings/Annotations/Elements/RadioButtonElement.d.ts +2 -0
  342. package/typings/Annotations/RichMediaAnnotation.d.ts +41 -0
  343. package/typings/Annotations/index.d.ts +4 -0
  344. package/typings/Annotations/state.d.ts +4 -0
  345. package/typings/Annotations/types.d.ts +63 -0
  346. package/typings/Articles/Articles.d.ts +19 -0
  347. package/typings/Articles/index.d.ts +4 -0
  348. package/typings/Articles/state.d.ts +4 -0
  349. package/typings/Articles/types.d.ts +24 -0
  350. package/typings/Attachments/Attachments.d.ts +17 -0
  351. package/typings/Attachments/index.d.ts +3 -0
  352. package/typings/Attachments/state.d.ts +4 -0
  353. package/typings/Attachments/types.d.ts +7 -0
  354. package/typings/Contents/Contents.d.ts +13 -0
  355. package/typings/Contents/index.d.ts +4 -0
  356. package/typings/Contents/state.d.ts +4 -0
  357. package/typings/Contents/types.d.ts +16 -0
  358. package/typings/ContextMenu/ContextMenuProvider.d.ts +48 -0
  359. package/typings/ContextMenu/DropdownMenu.d.ts +121 -0
  360. package/typings/ContextMenu/GcDocumentContextMenu.d.ts +80 -0
  361. package/typings/ContextMenu/Positioner.d.ts +58 -0
  362. package/typings/ContextMenu/constants.d.ts +22 -0
  363. package/typings/ContextMenu/essentials.d.ts +41 -0
  364. package/typings/ContextMenu/types.d.ts +2 -0
  365. package/typings/Core/ExternalPdfManager.d.ts +24 -0
  366. package/typings/Core/GcPdfViewerDataLoader.d.ts +24 -0
  367. package/typings/DataStorage/DataStorage.d.ts +20 -0
  368. package/typings/Dialogs/ConfirmationDialog.d.ts +17 -0
  369. package/typings/Dialogs/ProgressDialog.d.ts +37 -0
  370. package/typings/Dialogs/Types.d.ts +22 -0
  371. package/typings/DocumentListPanel.d.ts +39 -0
  372. package/typings/DsPdfViewer.d.ts +5 -0
  373. package/typings/FloatingBar/FloatingBar.d.ts +20 -0
  374. package/typings/FloatingBar/types.d.ts +7 -0
  375. package/typings/FloatingSearchBar/FloatingSearchBar.d.ts +42 -0
  376. package/typings/FloatingSearchBar/types.d.ts +3 -0
  377. package/typings/FormFiller/Controls/CheckBoxControl.d.ts +7 -0
  378. package/typings/FormFiller/Controls/ChoiceControl.d.ts +11 -0
  379. package/typings/FormFiller/Controls/CombTextControl.d.ts +7 -0
  380. package/typings/FormFiller/Controls/ControlBase.d.ts +32 -0
  381. package/typings/FormFiller/Controls/DateTimeControl.d.ts +7 -0
  382. package/typings/FormFiller/Controls/DateTimeHelper.d.ts +18 -0
  383. package/typings/FormFiller/Controls/EmailControl.d.ts +7 -0
  384. package/typings/FormFiller/Controls/PasswordControl.d.ts +7 -0
  385. package/typings/FormFiller/Controls/RadioControl.d.ts +7 -0
  386. package/typings/FormFiller/Controls/SearchControl.d.ts +7 -0
  387. package/typings/FormFiller/Controls/TelControl.d.ts +7 -0
  388. package/typings/FormFiller/Controls/TextControl.d.ts +7 -0
  389. package/typings/FormFiller/Controls/UrlControl.d.ts +7 -0
  390. package/typings/FormFiller/FieldRow.d.ts +27 -0
  391. package/typings/FormFiller/FormFiller.d.ts +32 -0
  392. package/typings/FormFiller/FormFillerDialog.d.ts +28 -0
  393. package/typings/FormFiller/Validator.d.ts +9 -0
  394. package/typings/FormFiller/types.d.ts +48 -0
  395. package/typings/GcPdfDocument.d.ts +65 -0
  396. package/typings/GcPdfDocumentView.d.ts +22 -0
  397. package/typings/GcPdfViewer.d.ts +464 -0
  398. package/typings/GcPdfViewerStateStorage.d.ts +24 -0
  399. package/typings/Keyboard/KeyboardWorker.d.ts +52 -0
  400. package/typings/Keyboard/ShortcutsConfig.d.ts +10 -0
  401. package/typings/Layers/Layers.d.ts +17 -0
  402. package/typings/Layers/index.d.ts +1 -0
  403. package/typings/Layers/state.d.ts +0 -0
  404. package/typings/Layers/types.d.ts +8 -0
  405. package/typings/LeftSidebar.d.ts +33 -0
  406. package/typings/Models/EventArgs.d.ts +38 -0
  407. package/typings/Models/GcMeasurementTypes.d.ts +29 -0
  408. package/typings/Models/PluginTypes.d.ts +23 -0
  409. package/typings/Models/ViewerTypes.d.ts +279 -0
  410. package/typings/Password/GcPdfPasswordDialog.d.ts +31 -0
  411. package/typings/PdfDocumentViewer/PdfDocumentViewer.d.ts +11 -0
  412. package/typings/PdfOrganizer/PdfOrganizerDialog.d.ts +83 -0
  413. package/typings/PdfOrganizer/types.d.ts +17 -0
  414. package/typings/Polyfills/ArrayPolyfills.d.ts +1 -0
  415. package/typings/Polyfills/CanvasToBlob.d.ts +0 -0
  416. package/typings/Polyfills/closest.d.ts +0 -0
  417. package/typings/Print/GcPdfPrintProgress.d.ts +17 -0
  418. package/typings/Print/GcPdfPrintService.d.ts +7 -0
  419. package/typings/Properties/DocumentInformation.d.ts +22 -0
  420. package/typings/Properties/PropertiesDialog.d.ts +39 -0
  421. package/typings/ReplyTool/AuthorLabel.d.ts +8 -0
  422. package/typings/ReplyTool/ReplyTool.d.ts +90 -0
  423. package/typings/ReplyTool/types.d.ts +25 -0
  424. package/typings/RightSidebar/GcRightSidebar.d.ts +42 -0
  425. package/typings/RightSidebar/types.d.ts +2 -0
  426. package/typings/Search/GcPdfSearcher.d.ts +98 -0
  427. package/typings/Search/IPdfSearcher.d.ts +5 -0
  428. package/typings/Search/SearchPanel.d.ts +16 -0
  429. package/typings/Search/SearchPanelBase.d.ts +35 -0
  430. package/typings/Search/SearchUtils.d.ts +24 -0
  431. package/typings/Search/SearchWorker.d.ts +37 -0
  432. package/typings/Search/TextSelectionBoundsTester.d.ts +10 -0
  433. package/typings/Search/api.d.ts +12 -0
  434. package/typings/Search/index.d.ts +5 -0
  435. package/typings/Search/types.d.ts +135 -0
  436. package/typings/Security/DocumentSecuritySummary.d.ts +19 -0
  437. package/typings/SharedDocuments/ShareDialog.d.ts +55 -0
  438. package/typings/SharedDocuments/SharedChangeIndicator.d.ts +5 -0
  439. package/typings/SharedDocuments/SharedDocumentsPanel.d.ts +26 -0
  440. package/typings/SharedDocuments/types.d.ts +73 -0
  441. package/typings/SignTool/CanvasRuler.d.ts +21 -0
  442. package/typings/SignTool/DrawTool.d.ts +41 -0
  443. package/typings/SignTool/ImageTool.d.ts +51 -0
  444. package/typings/SignTool/SignToolDialog.d.ts +97 -0
  445. package/typings/SignTool/SignToolStorage.d.ts +17 -0
  446. package/typings/SignTool/SignaturePad/SignaturePad.d.ts +76 -0
  447. package/typings/SignTool/SignaturePad/throttle.d.ts +1 -0
  448. package/typings/SignTool/SignaturePad/types.d.ts +30 -0
  449. package/typings/SignTool/TypeTool.d.ts +52 -0
  450. package/typings/SignTool/types.d.ts +62 -0
  451. package/typings/StructureTree/StructureTree.d.ts +31 -0
  452. package/typings/StructureTree/index.d.ts +1 -0
  453. package/typings/StructureTree/state.d.ts +0 -0
  454. package/typings/StructureTree/types.d.ts +7 -0
  455. package/typings/Styles/StaticIcons.d.ts +1 -0
  456. package/typings/Styles/pdfSvgIcons.d.ts +155 -0
  457. package/typings/SupportApi/Connection/ClientMessage.d.ts +61 -0
  458. package/typings/SupportApi/Connection/Message.d.ts +3 -0
  459. package/typings/SupportApi/Connection/PersistentConnection.d.ts +33 -0
  460. package/typings/SupportApi/Connection/ServerMessage.d.ts +25 -0
  461. package/typings/SupportApi/DocumentOptions.d.ts +14 -0
  462. package/typings/SupportApi/ISupportApi.d.ts +44 -0
  463. package/typings/SupportApi/ISupportApiBase.d.ts +30 -0
  464. package/typings/SupportApi/LocalDocumentModification.d.ts +23 -0
  465. package/typings/SupportApi/RenderParams.d.ts +7 -0
  466. package/typings/SupportApi/SignatureInfo.d.ts +0 -0
  467. package/typings/SupportApi/SupportApiImpl.d.ts +88 -0
  468. package/typings/SupportApi/Wasm/IWasmModule.d.ts +22 -0
  469. package/typings/SupportApi/Wasm/WasmModule.d.ts +2 -0
  470. package/typings/SupportApi/Wasm/WasmSupportApi.d.ts +38 -0
  471. package/typings/SupportApi/types.d.ts +43 -0
  472. package/typings/Thumbnails/GcRangedThumbsPane.d.ts +17 -0
  473. package/typings/Thumbnails/GcThumbView.d.ts +50 -0
  474. package/typings/Thumbnails/GcThumbnailViewer.d.ts +46 -0
  475. package/typings/Thumbnails/Thumbnails.d.ts +18 -0
  476. package/typings/Thumbnails/index.d.ts +1 -0
  477. package/typings/Toolbar/PdfToolbarLayout.d.ts +9 -0
  478. package/typings/Toolbar/SecondToolbar/SecondToolbar.d.ts +25 -0
  479. package/typings/Toolbar/SecondToolbar/SecondToolbarControl.d.ts +31 -0
  480. package/typings/Toolbar/SecondToolbar/SecondToolbarRenderer.d.ts +5 -0
  481. package/typings/Toolbar/SecondToolbar/types.d.ts +9 -0
  482. package/typings/Toolbar/ToolbarItems.d.ts +71 -0
  483. package/typings/Toolbar/controls/AddStampDropdown.d.ts +61 -0
  484. package/typings/Toolbar/controls/Zoom.d.ts +42 -0
  485. package/typings/Utils/AnnotationsSvgFactory.d.ts +34 -0
  486. package/typings/Utils/AudioOscilloscopeVisualizer.d.ts +23 -0
  487. package/typings/Utils/AudioUtils.d.ts +12 -0
  488. package/typings/Utils/BackgroundUtilsWorker.d.ts +6 -0
  489. package/typings/Utils/BrowserUtils.d.ts +20 -0
  490. package/typings/Utils/ColorUtils.d.ts +7 -0
  491. package/typings/Utils/CombFieldBehavior.d.ts +58 -0
  492. package/typings/Utils/DomUtils.d.ts +21 -0
  493. package/typings/Utils/DownloadUtil.d.ts +2 -0
  494. package/typings/Utils/DrawingPanel.d.ts +11 -0
  495. package/typings/Utils/DropFileAreaHelper.d.ts +25 -0
  496. package/typings/Utils/EditableComboBoxBehavior.d.ts +17 -0
  497. package/typings/Utils/EncodingUtils.d.ts +9 -0
  498. package/typings/Utils/Exceptions.d.ts +5 -0
  499. package/typings/Utils/GcEditableTextBehavior.d.ts +48 -0
  500. package/typings/Utils/GcMeasurement.d.ts +37 -0
  501. package/typings/Utils/GestureEventsDispatcher.d.ts +40 -0
  502. package/typings/Utils/MathUtils.d.ts +17 -0
  503. package/typings/Utils/MeasurementUtils.d.ts +4 -0
  504. package/typings/Utils/PromiseUtils.d.ts +24 -0
  505. package/typings/Utils/ResizableDialogBehavior.d.ts +1 -0
  506. package/typings/Utils/RichMediaAnnotationPlayer.d.ts +60 -0
  507. package/typings/Utils/ScrollUtils.d.ts +20 -0
  508. package/typings/Utils/SearchUtils.d.ts +20 -0
  509. package/typings/Utils/SelectionRangeUtils.d.ts +2 -0
  510. package/typings/Utils/SharedRef.d.ts +17 -0
  511. package/typings/Utils/StampImagesAwaiter.d.ts +15 -0
  512. package/typings/Utils/SupportApiUtils.d.ts +4 -0
  513. package/typings/Utils/TooltipPopup.d.ts +6 -0
  514. package/typings/Utils/UrlUtils.d.ts +17 -0
  515. package/typings/Utils/ViewerUtils.d.ts +68 -0
  516. package/typings/Utils/index.d.ts +1 -0
  517. package/typings/ViewerOptions.d.ts +316 -0
  518. package/typings/XFA/XfaApiImpl.d.ts +19 -0
  519. package/typings/XFA/XfaForm.d.ts +7 -0
  520. package/typings/XFA/XfaNode.d.ts +5 -0
  521. package/typings/httpClient.d.ts +15 -0
  522. package/typings/index.d.ts +10 -0
  523. package/typings/plugin.d.ts +646 -0
  524. package/typings/vendor/i18next.d.ts +1022 -0
  525. package/typings/vendor/js-viewer-core/api/PluginModel.d.ts +246 -0
  526. package/typings/vendor/js-viewer-core/api/ReportViewerCmd.d.ts +72 -0
  527. package/typings/vendor/js-viewer-core/api/index.d.ts +3 -0
  528. package/typings/vendor/js-viewer-core/components/DocumentViewer/ContinuousView.d.ts +37 -0
  529. package/typings/vendor/js-viewer-core/components/DocumentViewer/Page.d.ts +17 -0
  530. package/typings/vendor/js-viewer-core/components/DocumentViewer/SinglePageView.d.ts +30 -0
  531. package/typings/vendor/js-viewer-core/components/DocumentViewer/View.d.ts +15 -0
  532. package/typings/vendor/js-viewer-core/components/DocumentViewer/Zoomer.d.ts +12 -0
  533. package/typings/vendor/js-viewer-core/components/DocumentViewer/index.d.ts +3 -0
  534. package/typings/vendor/js-viewer-core/components/DocumentViewer/moveTool.d.ts +4 -0
  535. package/typings/vendor/js-viewer-core/components/DocumentViewer/state.d.ts +7 -0
  536. package/typings/vendor/js-viewer-core/components/DocumentViewer/types.d.ts +214 -0
  537. package/typings/vendor/js-viewer-core/components/DocumentViewer/zoomUtils.d.ts +26 -0
  538. package/typings/vendor/js-viewer-core/components/ErrorPanel/ErrorView.d.ts +26 -0
  539. package/typings/vendor/js-viewer-core/components/ErrorPanel/View.d.ts +22 -0
  540. package/typings/vendor/js-viewer-core/components/ErrorPanel/index.d.ts +3 -0
  541. package/typings/vendor/js-viewer-core/components/ErrorPanel/state.d.ts +4 -0
  542. package/typings/vendor/js-viewer-core/components/ErrorPanel/types.d.ts +21 -0
  543. package/typings/vendor/js-viewer-core/components/NotificationManager/NotificationManager.d.ts +19 -0
  544. package/typings/vendor/js-viewer-core/components/NotificationManager/index.d.ts +1 -0
  545. package/typings/vendor/js-viewer-core/components/PanelManager/MenuView.d.ts +32 -0
  546. package/typings/vendor/js-viewer-core/components/PanelManager/SideBarView.d.ts +39 -0
  547. package/typings/vendor/js-viewer-core/components/PanelManager/TopBottomPanelView.d.ts +9 -0
  548. package/typings/vendor/js-viewer-core/components/PanelManager/index.d.ts +5 -0
  549. package/typings/vendor/js-viewer-core/components/PanelManager/state.d.ts +13 -0
  550. package/typings/vendor/js-viewer-core/components/PanelManager/types.d.ts +47 -0
  551. package/typings/vendor/js-viewer-core/components/ProgressDialog/View.d.ts +19 -0
  552. package/typings/vendor/js-viewer-core/components/ProgressDialog/index.d.ts +3 -0
  553. package/typings/vendor/js-viewer-core/components/ProgressDialog/state.d.ts +4 -0
  554. package/typings/vendor/js-viewer-core/components/ProgressDialog/types.d.ts +26 -0
  555. package/typings/vendor/js-viewer-core/components/ThumbnailsPanel/ThumbnailsPanel.d.ts +4 -0
  556. package/typings/vendor/js-viewer-core/components/ThumbnailsPanel/index.d.ts +4 -0
  557. package/typings/vendor/js-viewer-core/components/ThumbnailsPanel/state.d.ts +6 -0
  558. package/typings/vendor/js-viewer-core/components/ThumbnailsPanel/types.d.ts +37 -0
  559. package/typings/vendor/js-viewer-core/components/Toolbar/Toolbar.d.ts +97 -0
  560. package/typings/vendor/js-viewer-core/components/Toolbar/controls/Zoom.d.ts +23 -0
  561. package/typings/vendor/js-viewer-core/components/Toolbar/index.d.ts +1 -0
  562. package/typings/vendor/js-viewer-core/components/index.d.ts +8 -0
  563. package/typings/vendor/js-viewer-core/components/utils.d.ts +6 -0
  564. package/typings/vendor/js-viewer-core/control/CancellationToken.d.ts +36 -0
  565. package/typings/vendor/js-viewer-core/control/EventFan.d.ts +35 -0
  566. package/typings/vendor/js-viewer-core/control/ReactStateBinder.d.ts +24 -0
  567. package/typings/vendor/js-viewer-core/control/ReportViewer.d.ts +227 -0
  568. package/typings/vendor/js-viewer-core/control/SessionState.d.ts +61 -0
  569. package/typings/vendor/js-viewer-core/control/Store.d.ts +37 -0
  570. package/typings/vendor/js-viewer-core/control/Toolbar.d.ts +53 -0
  571. package/typings/vendor/js-viewer-core/control/ViewerState.d.ts +67 -0
  572. package/typings/vendor/js-viewer-core/control/historyStore.d.ts +0 -0
  573. package/typings/vendor/js-viewer-core/control/index.d.ts +7 -0
  574. package/typings/vendor/js-viewer-core/features/search/SearchPanel.d.ts +21 -0
  575. package/typings/vendor/js-viewer-core/features/search/api.d.ts +18 -0
  576. package/typings/vendor/js-viewer-core/features/search/index.d.ts +8 -0
  577. package/typings/vendor/js-viewer-core/features/search/types.d.ts +117 -0
  578. package/typings/vendor/js-viewer-core/index.d.ts +6 -0
  579. package/typings/vendor/js-viewer-core/styles/svgIcons.d.ts +30 -0
  580. package/typings/vendor/react/global.d.ts +151 -0
  581. package/typings/vendor/react/react-dom.d.ts +100 -0
  582. package/typings/vendor/react/react.d.ts +3152 -0
@@ -0,0 +1,3152 @@
1
+ // Type definitions for React 16.9
2
+ // Project: http://facebook.github.io/react/
3
+ // Definitions by: Asana <https://asana.com>
4
+ // AssureSign <http://www.assuresign.com>
5
+ // Microsoft <https://microsoft.com>
6
+ // John Reilly <https://github.com/johnnyreilly>
7
+ // Benoit Benezech <https://github.com/bbenezech>
8
+ // Patricio Zavolinsky <https://github.com/pzavolinsky>
9
+ // Digiguru <https://github.com/digiguru>
10
+ // Eric Anderson <https://github.com/ericanderson>
11
+ // Dovydas Navickas <https://github.com/DovydasNavickas>
12
+ // Josh Rutherford <https://github.com/theruther4d>
13
+ // Guilherme Hübner <https://github.com/guilhermehubner>
14
+ // Ferdy Budhidharma <https://github.com/ferdaber>
15
+ // Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
16
+ // Olivier Pascal <https://github.com/pascaloliv>
17
+ // Martin Hochel <https://github.com/hotell>
18
+ // Frank Li <https://github.com/franklixuefei>
19
+ // Jessica Franco <https://github.com/Jessidhia>
20
+ // Saransh Kataria <https://github.com/saranshkataria>
21
+ // Kanitkorn Sujautra <https://github.com/lukyth>
22
+ // Sebastian Silbermann <https://github.com/eps1lon>
23
+ // Kyle Scully <https://github.com/zieka>
24
+ // Cong Zhang <https://github.com/dancerphil>
25
+ // Dimitri Mitropoulos <https://github.com/dimitropoulos>
26
+ // JongChan Choi <https://github.com/disjukr>
27
+ // Victor Magalhães <https://github.com/vhfmag>
28
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
29
+ // TypeScript Version: 2.8
30
+
31
+ // NOTE: Users of the `experimental` builds of React should add a reference
32
+ // to 'react/experimental' in their project. See experimental.d.ts's top comment
33
+ // for reference and documentation on how exactly to do it.
34
+
35
+ /// <reference path="global.d.ts" />
36
+
37
+ //@ts-ignore
38
+ import * as CSS from 'csstype';
39
+ //@ts-ignore
40
+ import * as PropTypes from 'prop-types';
41
+
42
+ type NativeAnimationEvent = AnimationEvent;
43
+ type NativeClipboardEvent = ClipboardEvent;
44
+ type NativeCompositionEvent = CompositionEvent;
45
+ type NativeDragEvent = DragEvent;
46
+ type NativeFocusEvent = FocusEvent;
47
+ type NativeKeyboardEvent = KeyboardEvent;
48
+ type NativeMouseEvent = MouseEvent;
49
+ type NativeTouchEvent = TouchEvent;
50
+ type NativePointerEvent = PointerEvent;
51
+ type NativeTransitionEvent = TransitionEvent;
52
+ type NativeUIEvent = UIEvent;
53
+ type NativeWheelEvent = WheelEvent;
54
+ type Booleanish = boolean | 'true' | 'false';
55
+
56
+ /**
57
+ * defined in scheduler/tracing
58
+ */
59
+ interface SchedulerInteraction {
60
+ id: number;
61
+ name: string;
62
+ timestamp: number;
63
+ }
64
+
65
+ // tslint:disable-next-line:export-just-namespace
66
+ export = React;
67
+ export as namespace React;
68
+
69
+ declare namespace React {
70
+ //
71
+ // React Elements
72
+ // ----------------------------------------------------------------------
73
+
74
+ type ElementType<P = any> =
75
+ {
76
+ [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never
77
+ }[keyof JSX.IntrinsicElements] |
78
+ ComponentType<P>;
79
+ /**
80
+ * @deprecated Please use `ElementType`
81
+ */
82
+ type ReactType<P = any> = ElementType<P>;
83
+ type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
84
+
85
+ type JSXElementConstructor<P> =
86
+ | ((props: P) => ReactElement | null)
87
+ | (new (props: P) => Component<P, any>);
88
+
89
+ interface RefObject<T> {
90
+ readonly current: T | null;
91
+ }
92
+ type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
93
+ type Ref<T> = RefCallback<T> | RefObject<T> | null;
94
+ type LegacyRef<T> = string | Ref<T>;
95
+ /**
96
+ * Gets the instance type for a React element. The instance will be different for various component types:
97
+ *
98
+ * - React class components will be the class instance. So if you had `class Foo extends React.Component<{}> {}`
99
+ * and used `React.ElementRef<typeof Foo>` then the type would be the instance of `Foo`.
100
+ * - React stateless functional components do not have a backing instance and so `React.ElementRef<typeof Bar>`
101
+ * (when `Bar` is `function Bar() {}`) will give you the `undefined` type.
102
+ * - JSX intrinsics like `div` will give you their DOM instance. For `React.ElementRef<'div'>` that would be
103
+ * `HTMLDivElement`. For `React.ElementRef<'input'>` that would be `HTMLInputElement`.
104
+ * - React stateless functional components that forward a `ref` will give you the `ElementRef` of the forwarded
105
+ * to component.
106
+ *
107
+ * `C` must be the type _of_ a React component so you need to use typeof as in React.ElementRef<typeof MyComponent>.
108
+ *
109
+ * @todo In Flow, this works a little different with forwarded refs and the `AbstractComponent` that
110
+ * `React.forwardRef()` returns.
111
+ */
112
+ type ElementRef<
113
+ C extends
114
+ | ForwardRefExoticComponent<any>
115
+ | { new (props: any): Component<any> }
116
+ | ((props: any, context?: any) => ReactElement | null)
117
+ | keyof JSX.IntrinsicElements
118
+ > = C extends ForwardRefExoticComponent<infer FP>
119
+ ? FP extends RefAttributes<infer FC>
120
+ ? FC
121
+ : never
122
+ : C extends { new (props: any): Component<any> }
123
+ ? InstanceType<C>
124
+ : C extends ((props: any, context?: any) => ReactElement | null)
125
+ ? undefined
126
+ : C extends keyof JSX.IntrinsicElements
127
+ ? JSX.IntrinsicElements[C] extends DOMAttributes<infer E>
128
+ ? E
129
+ : never
130
+ : never;
131
+
132
+ type ComponentState = any;
133
+
134
+ type Key = string | number;
135
+
136
+ /**
137
+ * @internal You shouldn't need to use this type since you never see these attributes
138
+ * inside your component or have to validate them.
139
+ */
140
+ interface Attributes {
141
+ key?: Key;
142
+ }
143
+ interface RefAttributes<T> extends Attributes {
144
+ ref?: Ref<T>;
145
+ }
146
+ interface ClassAttributes<T> extends Attributes {
147
+ ref?: LegacyRef<T>;
148
+ }
149
+
150
+ interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
151
+ type: T;
152
+ props: P;
153
+ key: Key | null;
154
+ }
155
+
156
+ interface ReactComponentElement<
157
+ T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>,
158
+ P = Pick<ComponentProps<T>, Exclude<keyof ComponentProps<T>, 'key' | 'ref'>>
159
+ > extends ReactElement<P, Exclude<T, number>> { }
160
+
161
+ /**
162
+ * @deprecated Please use `FunctionComponentElement`
163
+ */
164
+ type SFCElement<P> = FunctionComponentElement<P>;
165
+
166
+ interface FunctionComponentElement<P> extends ReactElement<P, FunctionComponent<P>> {
167
+ ref?: 'ref' extends keyof P ? P extends { ref?: infer R } ? R : never : never;
168
+ }
169
+
170
+ type CElement<P, T extends Component<P, ComponentState>> = ComponentElement<P, T>;
171
+ interface ComponentElement<P, T extends Component<P, ComponentState>> extends ReactElement<P, ComponentClass<P>> {
172
+ ref?: LegacyRef<T>;
173
+ }
174
+
175
+ type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
176
+
177
+ // string fallback for custom web-components
178
+ interface DOMElement<P extends HTMLAttributes<T> | SVGAttributes<T>, T extends Element> extends ReactElement<P, string> {
179
+ ref: LegacyRef<T>;
180
+ }
181
+
182
+ // ReactHTML for ReactHTMLElement
183
+ // tslint:disable-next-line:no-empty-interface
184
+ interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> { }
185
+
186
+ interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> {
187
+ type: keyof ReactHTML;
188
+ }
189
+
190
+ // ReactSVG for ReactSVGElement
191
+ interface ReactSVGElement extends DOMElement<SVGAttributes<SVGElement>, SVGElement> {
192
+ type: keyof ReactSVG;
193
+ }
194
+
195
+ interface ReactPortal extends ReactElement {
196
+ key: Key | null;
197
+ children: ReactNode;
198
+ }
199
+
200
+ //
201
+ // Factories
202
+ // ----------------------------------------------------------------------
203
+
204
+ type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
205
+
206
+ /**
207
+ * @deprecated Please use `FunctionComponentFactory`
208
+ */
209
+ type SFCFactory<P> = FunctionComponentFactory<P>;
210
+
211
+ type FunctionComponentFactory<P> = (props?: Attributes & P, ...children: ReactNode[]) => FunctionComponentElement<P>;
212
+
213
+ type ComponentFactory<P, T extends Component<P, ComponentState>> =
214
+ (props?: ClassAttributes<T> & P, ...children: ReactNode[]) => CElement<P, T>;
215
+
216
+ type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
217
+ type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
218
+
219
+ type DOMFactory<P extends DOMAttributes<T>, T extends Element> =
220
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]) => DOMElement<P, T>;
221
+
222
+ // tslint:disable-next-line:no-empty-interface
223
+ interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
224
+
225
+ interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
226
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
227
+ }
228
+
229
+ interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
230
+ (props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null, ...children: ReactNode[]): ReactSVGElement;
231
+ }
232
+
233
+ //
234
+ // React Nodes
235
+ // http://facebook.github.io/react/docs/glossary.html
236
+ // ----------------------------------------------------------------------
237
+
238
+ type ReactText = string | number;
239
+ type ReactChild = ReactElement | ReactText;
240
+
241
+ interface ReactNodeArray extends Array<ReactNode> {}
242
+ type ReactFragment = {} | ReactNodeArray;
243
+ type ReactNode = ReactChild | ReactFragment | ReactPortal | boolean | null | undefined;
244
+
245
+ //
246
+ // Top Level API
247
+ // ----------------------------------------------------------------------
248
+
249
+ // DOM Elements
250
+ function createFactory<T extends HTMLElement>(
251
+ type: keyof ReactHTML): HTMLFactory<T>;
252
+ function createFactory(
253
+ type: keyof ReactSVG): SVGFactory;
254
+ function createFactory<P extends DOMAttributes<T>, T extends Element>(
255
+ type: string): DOMFactory<P, T>;
256
+
257
+ // Custom components
258
+ function createFactory<P>(type: FunctionComponent<P>): FunctionComponentFactory<P>;
259
+ function createFactory<P>(
260
+ type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>): CFactory<P, ClassicComponent<P, ComponentState>>;
261
+ function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
262
+ type: ClassType<P, T, C>): CFactory<P, T>;
263
+ function createFactory<P>(type: ComponentClass<P>): Factory<P>;
264
+
265
+ // DOM Elements
266
+ // TODO: generalize this to everything in `keyof ReactHTML`, not just "input"
267
+ function createElement(
268
+ type: "input",
269
+ props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement> | null,
270
+ ...children: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
271
+ function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
272
+ type: keyof ReactHTML,
273
+ props?: ClassAttributes<T> & P | null,
274
+ ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
275
+ function createElement<P extends SVGAttributes<T>, T extends SVGElement>(
276
+ type: keyof ReactSVG,
277
+ props?: ClassAttributes<T> & P | null,
278
+ ...children: ReactNode[]): ReactSVGElement;
279
+ function createElement<P extends DOMAttributes<T>, T extends Element>(
280
+ type: string,
281
+ props?: ClassAttributes<T> & P | null,
282
+ ...children: ReactNode[]): DOMElement<P, T>;
283
+
284
+ // Custom components
285
+
286
+ function createElement<P extends {}>(
287
+ type: FunctionComponent<P>,
288
+ props?: Attributes & P | null,
289
+ ...children: ReactNode[]): FunctionComponentElement<P>;
290
+ function createElement<P extends {}>(
291
+ type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
292
+ props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P | null,
293
+ ...children: ReactNode[]): CElement<P, ClassicComponent<P, ComponentState>>;
294
+ function createElement<P extends {}, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
295
+ type: ClassType<P, T, C>,
296
+ props?: ClassAttributes<T> & P | null,
297
+ ...children: ReactNode[]): CElement<P, T>;
298
+ function createElement<P extends {}>(
299
+ type: FunctionComponent<P> | ComponentClass<P> | string,
300
+ props?: Attributes & P | null,
301
+ ...children: ReactNode[]): ReactElement<P>;
302
+
303
+ // DOM Elements
304
+ // ReactHTMLElement
305
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
306
+ element: DetailedReactHTMLElement<P, T>,
307
+ props?: P,
308
+ ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
309
+ // ReactHTMLElement, less specific
310
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
311
+ element: ReactHTMLElement<T>,
312
+ props?: P,
313
+ ...children: ReactNode[]): ReactHTMLElement<T>;
314
+ // SVGElement
315
+ function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>(
316
+ element: ReactSVGElement,
317
+ props?: P,
318
+ ...children: ReactNode[]): ReactSVGElement;
319
+ // DOM Element (has to be the last, because type checking stops at first overload that fits)
320
+ function cloneElement<P extends DOMAttributes<T>, T extends Element>(
321
+ element: DOMElement<P, T>,
322
+ props?: DOMAttributes<T> & P,
323
+ ...children: ReactNode[]): DOMElement<P, T>;
324
+
325
+ // Custom components
326
+ function cloneElement<P>(
327
+ element: FunctionComponentElement<P>,
328
+ props?: Partial<P> & Attributes,
329
+ ...children: ReactNode[]): FunctionComponentElement<P>;
330
+ function cloneElement<P, T extends Component<P, ComponentState>>(
331
+ element: CElement<P, T>,
332
+ props?: Partial<P> & ClassAttributes<T>,
333
+ ...children: ReactNode[]): CElement<P, T>;
334
+ function cloneElement<P>(
335
+ element: ReactElement<P>,
336
+ props?: Partial<P> & Attributes,
337
+ ...children: ReactNode[]): ReactElement<P>;
338
+
339
+ // Context via RenderProps
340
+ interface ProviderProps<T> {
341
+ value: T;
342
+ children?: ReactNode;
343
+ }
344
+
345
+ interface ConsumerProps<T> {
346
+ children: (value: T) => ReactNode;
347
+ unstable_observedBits?: number;
348
+ }
349
+
350
+ // TODO: similar to how Fragment is actually a symbol, the values returned from createContext,
351
+ // forwardRef and memo are actually objects that are treated specially by the renderer; see:
352
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/ReactContext.js#L35-L48
353
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/forwardRef.js#L42-L45
354
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/memo.js#L27-L31
355
+ // However, we have no way of telling the JSX parser that it's a JSX element type or its props other than
356
+ // by pretending to be a normal component.
357
+ //
358
+ // We don't just use ComponentType or SFC types because you are not supposed to attach statics to this
359
+ // object, but rather to the original function.
360
+ interface ExoticComponent<P = {}> {
361
+ /**
362
+ * **NOTE**: Exotic components are not callable.
363
+ */
364
+ (props: P): (ReactElement|null);
365
+ readonly $$typeof: symbol;
366
+ }
367
+
368
+ interface NamedExoticComponent<P = {}> extends ExoticComponent<P> {
369
+ displayName?: string;
370
+ }
371
+
372
+ interface ProviderExoticComponent<P> extends ExoticComponent<P> {
373
+ propTypes?: WeakValidationMap<P>;
374
+ }
375
+
376
+ type ContextType<C extends Context<any>> = C extends Context<infer T> ? T : never;
377
+
378
+ // NOTE: only the Context object itself can get a displayName
379
+ // https://github.com/facebook/react-devtools/blob/e0b854e4c/backend/attachRendererFiber.js#L310-L325
380
+ type Provider<T> = ProviderExoticComponent<ProviderProps<T>>;
381
+ type Consumer<T> = ExoticComponent<ConsumerProps<T>>;
382
+ interface Context<T> {
383
+ Provider: Provider<T>;
384
+ Consumer: Consumer<T>;
385
+ displayName?: string;
386
+ }
387
+ function createContext<T>(
388
+ // If you thought this should be optional, see
389
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
390
+ defaultValue: T,
391
+ calculateChangedBits?: (prev: T, next: T) => number
392
+ ): Context<T>;
393
+
394
+ function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
395
+
396
+ const Children: ReactChildren;
397
+ const Fragment: ExoticComponent<{ children?: ReactNode }>;
398
+ const StrictMode: ExoticComponent<{ children?: ReactNode }>;
399
+
400
+ interface SuspenseProps {
401
+ children?: ReactNode;
402
+
403
+ /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */
404
+ fallback: NonNullable<ReactNode>|null;
405
+ /**
406
+ * Tells React whether to “skip” revealing this boundary during the initial load.
407
+ * This API will likely be removed in a future release.
408
+ */
409
+ // NOTE: this is unflagged and is respected even in stable builds
410
+ unstable_avoidThisFallback?: boolean;
411
+ }
412
+ /**
413
+ * This feature is not yet available for server-side rendering.
414
+ * Suspense support will be added in a later release.
415
+ */
416
+ const Suspense: ExoticComponent<SuspenseProps>;
417
+ const version: string;
418
+
419
+ /**
420
+ * {@link https://github.com/bvaughn/rfcs/blob/profiler/text/0000-profiler.md#detailed-design | API}
421
+ */
422
+ type ProfilerOnRenderCallback = (
423
+ id: string,
424
+ phase: "mount" | "update",
425
+ actualDuration: number,
426
+ baseDuration: number,
427
+ startTime: number,
428
+ commitTime: number,
429
+ //@ts-ignore
430
+ interactions: Set<SchedulerInteraction>,
431
+ ) => void;
432
+ interface ProfilerProps {
433
+ children?: ReactNode;
434
+ id: string;
435
+ onRender: ProfilerOnRenderCallback;
436
+ }
437
+
438
+ const Profiler: ExoticComponent<ProfilerProps>;
439
+
440
+ //
441
+ // Component API
442
+ // ----------------------------------------------------------------------
443
+
444
+ type ReactInstance = Component<any> | Element;
445
+
446
+ // Base component for plain JS classes
447
+ // tslint:disable-next-line:no-empty-interface
448
+ interface Component<P = {}, S = {}, SS = any> extends ComponentLifecycle<P, S, SS> { }
449
+ class Component<P, S> {
450
+ // tslint won't let me format the sample code in a way that vscode likes it :(
451
+ /**
452
+ * If set, `this.context` will be set at runtime to the current value of the given Context.
453
+ *
454
+ * Usage:
455
+ *
456
+ * ```ts
457
+ * type MyContext = number
458
+ * const Ctx = React.createContext<MyContext>(0)
459
+ *
460
+ * class Foo extends React.Component {
461
+ * static contextType = Ctx
462
+ * context!: React.ContextType<typeof Ctx>
463
+ * render () {
464
+ * return <>My context's value: {this.context}</>;
465
+ * }
466
+ * }
467
+ * ```
468
+ *
469
+ * @see https://reactjs.org/docs/context.html#classcontexttype
470
+ */
471
+ static contextType?: Context<any>;
472
+
473
+ /**
474
+ * If using the new style context, re-declare this in your class to be the
475
+ * `React.ContextType` of your `static contextType`.
476
+ * Should be used with type annotation or static contextType.
477
+ *
478
+ * ```ts
479
+ * static contextType = MyContext
480
+ * // For TS pre-3.7:
481
+ * context!: React.ContextType<typeof MyContext>
482
+ * // For TS 3.7 and above:
483
+ * declare context: React.ContextType<typeof MyContext>
484
+ * ```
485
+ *
486
+ * @see https://reactjs.org/docs/context.html
487
+ */
488
+ // TODO (TypeScript 3.0): unknown
489
+ context: any;
490
+
491
+ constructor(props: Readonly<P>);
492
+ /**
493
+ * @deprecated
494
+ * @see https://reactjs.org/docs/legacy-context.html
495
+ */
496
+ constructor(props: P, context?: any);
497
+
498
+ // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
499
+ // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
500
+ // Also, the ` | S` allows intellisense to not be dumbisense
501
+ setState<K extends keyof S>(
502
+ state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
503
+ callback?: () => void
504
+ ): void;
505
+
506
+ forceUpdate(callback?: () => void): void;
507
+ render(): ReactNode;
508
+
509
+ // React.Props<T> is now deprecated, which means that the `children`
510
+ // property is not available on `P` by default, even though you can
511
+ // always pass children as variadic arguments to `createElement`.
512
+ // In the future, if we can define its call signature conditionally
513
+ // on the existence of `children` in `P`, then we should remove this.
514
+ readonly props: Readonly<P> & Readonly<{ children?: ReactNode }>;
515
+ state: Readonly<S>;
516
+ /**
517
+ * @deprecated
518
+ * https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
519
+ */
520
+ refs: {
521
+ [key: string]: ReactInstance
522
+ };
523
+ }
524
+
525
+ class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> { }
526
+
527
+ interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
528
+ replaceState(nextState: S, callback?: () => void): void;
529
+ isMounted(): boolean;
530
+ getInitialState?(): S;
531
+ }
532
+
533
+ interface ChildContextProvider<CC> {
534
+ getChildContext(): CC;
535
+ }
536
+
537
+ //
538
+ // Class Interfaces
539
+ // ----------------------------------------------------------------------
540
+
541
+ /**
542
+ * @deprecated as of recent React versions, function components can no
543
+ * longer be considered 'stateless'. Please use `FunctionComponent` instead.
544
+ *
545
+ * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)
546
+ */
547
+ type SFC<P = {}> = FunctionComponent<P>;
548
+
549
+ /**
550
+ * @deprecated as of recent React versions, function components can no
551
+ * longer be considered 'stateless'. Please use `FunctionComponent` instead.
552
+ *
553
+ * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)
554
+ */
555
+ type StatelessComponent<P = {}> = FunctionComponent<P>;
556
+
557
+ type FC<P = {}> = FunctionComponent<P>;
558
+
559
+ interface FunctionComponent<P = {}> {
560
+ (props: PropsWithChildren<P>, context?: any): ReactElement<any, any> | null;
561
+ propTypes?: WeakValidationMap<P>;
562
+ contextTypes?: ValidationMap<any>;
563
+ defaultProps?: Partial<P>;
564
+ displayName?: string;
565
+ }
566
+
567
+ interface ForwardRefRenderFunction<T, P = {}> {
568
+ (props: PropsWithChildren<P>, ref: ((instance: T | null) => void) | MutableRefObject<T | null> | null): ReactElement | null;
569
+ displayName?: string;
570
+ // explicit rejected with `never` required due to
571
+ // https://github.com/microsoft/TypeScript/issues/36826
572
+ /**
573
+ * defaultProps are not supported on render functions
574
+ */
575
+ defaultProps?: never;
576
+ /**
577
+ * propTypes are not supported on render functions
578
+ */
579
+ propTypes?: never;
580
+ }
581
+
582
+ /**
583
+ * @deprecated Use ForwardRefRenderFunction. forwardRef doesn't accept a
584
+ * "real" component.
585
+ */
586
+ interface RefForwardingComponent <T, P = {}> extends ForwardRefRenderFunction<T, P> {}
587
+
588
+ interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> {
589
+ new (props: P, context?: any): Component<P, S>;
590
+ propTypes?: WeakValidationMap<P>;
591
+ contextType?: Context<any>;
592
+ contextTypes?: ValidationMap<any>;
593
+ childContextTypes?: ValidationMap<any>;
594
+ defaultProps?: Partial<P>;
595
+ displayName?: string;
596
+ }
597
+
598
+ interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
599
+ new (props: P, context?: any): ClassicComponent<P, ComponentState>;
600
+ getDefaultProps?(): P;
601
+ }
602
+
603
+ /**
604
+ * We use an intersection type to infer multiple type parameters from
605
+ * a single argument, which is useful for many top-level API defs.
606
+ * See https://github.com/Microsoft/TypeScript/issues/7234 for more info.
607
+ */
608
+ type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> =
609
+ C &
610
+ (new (props: P, context?: any) => T);
611
+
612
+ //
613
+ // Component Specs and Lifecycle
614
+ // ----------------------------------------------------------------------
615
+
616
+ // This should actually be something like `Lifecycle<P, S> | DeprecatedLifecycle<P, S>`,
617
+ // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle
618
+ // methods are present.
619
+ interface ComponentLifecycle<P, S, SS = any> extends NewLifecycle<P, S, SS>, DeprecatedLifecycle<P, S> {
620
+ /**
621
+ * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
622
+ */
623
+ componentDidMount?(): void;
624
+ /**
625
+ * Called to determine whether the change in props and state should trigger a re-render.
626
+ *
627
+ * `Component` always returns true.
628
+ * `PureComponent` implements a shallow comparison on props and state and returns true if any
629
+ * props or states have changed.
630
+ *
631
+ * If false is returned, `Component#render`, `componentWillUpdate`
632
+ * and `componentDidUpdate` will not be called.
633
+ */
634
+ shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;
635
+ /**
636
+ * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
637
+ * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
638
+ */
639
+ componentWillUnmount?(): void;
640
+ /**
641
+ * Catches exceptions generated in descendant components. Unhandled exceptions will cause
642
+ * the entire component tree to unmount.
643
+ */
644
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
645
+ }
646
+
647
+ // Unfortunately, we have no way of declaring that the component constructor must implement this
648
+ interface StaticLifecycle<P, S> {
649
+ getDerivedStateFromProps?: GetDerivedStateFromProps<P, S>;
650
+ getDerivedStateFromError?: GetDerivedStateFromError<P, S>;
651
+ }
652
+
653
+ type GetDerivedStateFromProps<P, S> =
654
+ /**
655
+ * Returns an update to a component's state based on its new props and old state.
656
+ *
657
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
658
+ */
659
+ (nextProps: Readonly<P>, prevState: S) => Partial<S> | null;
660
+
661
+ type GetDerivedStateFromError<P, S> =
662
+ /**
663
+ * This lifecycle is invoked after an error has been thrown by a descendant component.
664
+ * It receives the error that was thrown as a parameter and should return a value to update state.
665
+ *
666
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
667
+ */
668
+ (error: any) => Partial<S> | null;
669
+
670
+ // This should be "infer SS" but can't use it yet
671
+ interface NewLifecycle<P, S, SS> {
672
+ /**
673
+ * Runs before React applies the result of `render` to the document, and
674
+ * returns an object to be given to componentDidUpdate. Useful for saving
675
+ * things such as scroll position before `render` causes changes to it.
676
+ *
677
+ * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated
678
+ * lifecycle events from running.
679
+ */
680
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): SS | null;
681
+ /**
682
+ * Called immediately after updating occurs. Not called for the initial render.
683
+ *
684
+ * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.
685
+ */
686
+ componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot?: SS): void;
687
+ }
688
+
689
+ interface DeprecatedLifecycle<P, S> {
690
+ /**
691
+ * Called immediately before mounting occurs, and before `Component#render`.
692
+ * Avoid introducing any side-effects or subscriptions in this method.
693
+ *
694
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
695
+ * prevents this from being invoked.
696
+ *
697
+ * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17
698
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
699
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
700
+ */
701
+ componentWillMount?(): void;
702
+ /**
703
+ * Called immediately before mounting occurs, and before `Component#render`.
704
+ * Avoid introducing any side-effects or subscriptions in this method.
705
+ *
706
+ * This method will not stop working in React 17.
707
+ *
708
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
709
+ * prevents this from being invoked.
710
+ *
711
+ * @deprecated 16.3, use componentDidMount or the constructor instead
712
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
713
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
714
+ */
715
+ UNSAFE_componentWillMount?(): void;
716
+ /**
717
+ * Called when the component may be receiving new props.
718
+ * React may call this even if props have not changed, so be sure to compare new and existing
719
+ * props if you only want to handle changes.
720
+ *
721
+ * Calling `Component#setState` generally does not trigger this method.
722
+ *
723
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
724
+ * prevents this from being invoked.
725
+ *
726
+ * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17
727
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
728
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
729
+ */
730
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
731
+ /**
732
+ * Called when the component may be receiving new props.
733
+ * React may call this even if props have not changed, so be sure to compare new and existing
734
+ * props if you only want to handle changes.
735
+ *
736
+ * Calling `Component#setState` generally does not trigger this method.
737
+ *
738
+ * This method will not stop working in React 17.
739
+ *
740
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
741
+ * prevents this from being invoked.
742
+ *
743
+ * @deprecated 16.3, use static getDerivedStateFromProps instead
744
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
745
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
746
+ */
747
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
748
+ /**
749
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
750
+ *
751
+ * Note: You cannot call `Component#setState` here.
752
+ *
753
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
754
+ * prevents this from being invoked.
755
+ *
756
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
757
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
758
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
759
+ */
760
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
761
+ /**
762
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
763
+ *
764
+ * Note: You cannot call `Component#setState` here.
765
+ *
766
+ * This method will not stop working in React 17.
767
+ *
768
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
769
+ * prevents this from being invoked.
770
+ *
771
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead
772
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
773
+ * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
774
+ */
775
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
776
+ }
777
+
778
+ interface Mixin<P, S> extends ComponentLifecycle<P, S> {
779
+ mixins?: Array<Mixin<P, S>>;
780
+ statics?: {
781
+ [key: string]: any;
782
+ };
783
+
784
+ displayName?: string;
785
+ propTypes?: ValidationMap<any>;
786
+ contextTypes?: ValidationMap<any>;
787
+ childContextTypes?: ValidationMap<any>;
788
+
789
+ getDefaultProps?(): P;
790
+ getInitialState?(): S;
791
+ }
792
+
793
+ interface ComponentSpec<P, S> extends Mixin<P, S> {
794
+ render(): ReactNode;
795
+
796
+ [propertyName: string]: any;
797
+ }
798
+
799
+ function createRef<T>(): RefObject<T>;
800
+
801
+ // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default,
802
+ // but can be given its own specific name
803
+ interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> {
804
+ defaultProps?: Partial<P>;
805
+ propTypes?: WeakValidationMap<P>;
806
+ }
807
+
808
+ function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
809
+
810
+ /** Ensures that the props do not include ref at all */
811
+ type PropsWithoutRef<P> =
812
+ // Just Pick would be sufficient for this, but I'm trying to avoid unnecessary mapping over union types
813
+ // https://github.com/Microsoft/TypeScript/issues/28339
814
+ 'ref' extends keyof P
815
+ ? Pick<P, Exclude<keyof P, 'ref'>>
816
+ : P;
817
+ /** Ensures that the props do not include string ref, which cannot be forwarded */
818
+ type PropsWithRef<P> =
819
+ // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
820
+ 'ref' extends keyof P
821
+ ? P extends { ref?: infer R }
822
+ ? string extends R
823
+ ? PropsWithoutRef<P> & { ref?: Exclude<R, string> }
824
+ : P
825
+ : P
826
+ : P;
827
+
828
+ type PropsWithChildren<P> = P & { children?: ReactNode };
829
+
830
+ /**
831
+ * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded,
832
+ * or ComponentPropsWithoutRef when refs are not supported.
833
+ */
834
+ type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> =
835
+ T extends JSXElementConstructor<infer P>
836
+ ? P
837
+ : T extends keyof JSX.IntrinsicElements
838
+ ? JSX.IntrinsicElements[T]
839
+ : {};
840
+ type ComponentPropsWithRef<T extends ElementType> =
841
+ T extends ComponentClass<infer P>
842
+ ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
843
+ : PropsWithRef<ComponentProps<T>>;
844
+ type ComponentPropsWithoutRef<T extends ElementType> =
845
+ PropsWithoutRef<ComponentProps<T>>;
846
+
847
+ // will show `Memo(${Component.displayName || Component.name})` in devtools by default,
848
+ // but can be given its own specific name
849
+ type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
850
+ readonly type: T;
851
+ };
852
+
853
+ function memo<P extends object>(
854
+ Component: SFC<P>,
855
+ propsAreEqual?: (prevProps: Readonly<PropsWithChildren<P>>, nextProps: Readonly<PropsWithChildren<P>>) => boolean
856
+ ): NamedExoticComponent<P>;
857
+ function memo<T extends ComponentType<any>>(
858
+ Component: T,
859
+ propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean
860
+ ): MemoExoticComponent<T>;
861
+
862
+ type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
863
+ readonly _result: T;
864
+ };
865
+
866
+ function lazy<T extends ComponentType<any>>(
867
+ factory: () => Promise<{ default: T }>
868
+ ): LazyExoticComponent<T>;
869
+
870
+ //
871
+ // React Hooks
872
+ // ----------------------------------------------------------------------
873
+
874
+ // based on the code in https://github.com/facebook/react/pull/13968
875
+
876
+ // Unlike the class component setState, the updates are not allowed to be partial
877
+ type SetStateAction<S> = S | ((prevState: S) => S);
878
+ // this technically does accept a second argument, but it's already under a deprecation warning
879
+ // and it's not even released so probably better to not define it.
880
+ type Dispatch<A> = (value: A) => void;
881
+ // Since action _can_ be undefined, dispatch may be called without any parameters.
882
+ type DispatchWithoutAction = () => void;
883
+ // Unlike redux, the actions _can_ be anything
884
+ type Reducer<S, A> = (prevState: S, action: A) => S;
885
+ // If useReducer accepts a reducer without action, dispatch may be called without any parameters.
886
+ type ReducerWithoutAction<S> = (prevState: S) => S;
887
+ // types used to try and prevent the compiler from reducing S
888
+ // to a supertype common with the second argument to useReducer()
889
+ type ReducerState<R extends Reducer<any, any>> = R extends Reducer<infer S, any> ? S : never;
890
+ type ReducerAction<R extends Reducer<any, any>> = R extends Reducer<any, infer A> ? A : never;
891
+ // The identity check is done with the SameValue algorithm (Object.is), which is stricter than ===
892
+ type ReducerStateWithoutAction<R extends ReducerWithoutAction<any>> =
893
+ R extends ReducerWithoutAction<infer S> ? S : never;
894
+ // TODO (TypeScript 3.0): ReadonlyArray<unknown>
895
+ type DependencyList = ReadonlyArray<any>;
896
+
897
+ // NOTE: callbacks are _only_ allowed to return either void, or a destructor.
898
+ // The destructor is itself only allowed to return void.
899
+ type EffectCallback = () => (void | (() => void | undefined));
900
+
901
+ interface MutableRefObject<T> {
902
+ current: T;
903
+ }
904
+
905
+ // This will technically work if you give a Consumer<T> or Provider<T> but it's deprecated and warns
906
+ /**
907
+ * Accepts a context object (the value returned from `React.createContext`) and returns the current
908
+ * context value, as given by the nearest context provider for the given context.
909
+ *
910
+ * @version 16.8.0
911
+ * @see https://reactjs.org/docs/hooks-reference.html#usecontext
912
+ */
913
+ function useContext<T>(context: Context<T>/*, (not public API) observedBits?: number|boolean */): T;
914
+ /**
915
+ * Returns a stateful value, and a function to update it.
916
+ *
917
+ * @version 16.8.0
918
+ * @see https://reactjs.org/docs/hooks-reference.html#usestate
919
+ */
920
+ function useState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
921
+ // convenience overload when first argument is ommitted
922
+ /**
923
+ * Returns a stateful value, and a function to update it.
924
+ *
925
+ * @version 16.8.0
926
+ * @see https://reactjs.org/docs/hooks-reference.html#usestate
927
+ */
928
+ function useState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
929
+ /**
930
+ * An alternative to `useState`.
931
+ *
932
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
933
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
934
+ * updates because you can pass `dispatch` down instead of callbacks.
935
+ *
936
+ * @version 16.8.0
937
+ * @see https://reactjs.org/docs/hooks-reference.html#usereducer
938
+ */
939
+ // overload where dispatch could accept 0 arguments.
940
+ function useReducer<R extends ReducerWithoutAction<any>, I>(
941
+ reducer: R,
942
+ initializerArg: I,
943
+ initializer: (arg: I) => ReducerStateWithoutAction<R>
944
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
945
+ /**
946
+ * An alternative to `useState`.
947
+ *
948
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
949
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
950
+ * updates because you can pass `dispatch` down instead of callbacks.
951
+ *
952
+ * @version 16.8.0
953
+ * @see https://reactjs.org/docs/hooks-reference.html#usereducer
954
+ */
955
+ // overload where dispatch could accept 0 arguments.
956
+ function useReducer<R extends ReducerWithoutAction<any>>(
957
+ reducer: R,
958
+ initializerArg: ReducerStateWithoutAction<R>,
959
+ initializer?: undefined
960
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
961
+ /**
962
+ * An alternative to `useState`.
963
+ *
964
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
965
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
966
+ * updates because you can pass `dispatch` down instead of callbacks.
967
+ *
968
+ * @version 16.8.0
969
+ * @see https://reactjs.org/docs/hooks-reference.html#usereducer
970
+ */
971
+ // overload where "I" may be a subset of ReducerState<R>; used to provide autocompletion.
972
+ // If "I" matches ReducerState<R> exactly then the last overload will allow initializer to be ommitted.
973
+ // the last overload effectively behaves as if the identity function (x => x) is the initializer.
974
+ function useReducer<R extends Reducer<any, any>, I>(
975
+ reducer: R,
976
+ initializerArg: I & ReducerState<R>,
977
+ initializer: (arg: I & ReducerState<R>) => ReducerState<R>
978
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
979
+ /**
980
+ * An alternative to `useState`.
981
+ *
982
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
983
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
984
+ * updates because you can pass `dispatch` down instead of callbacks.
985
+ *
986
+ * @version 16.8.0
987
+ * @see https://reactjs.org/docs/hooks-reference.html#usereducer
988
+ */
989
+ // overload for free "I"; all goes as long as initializer converts it into "ReducerState<R>".
990
+ function useReducer<R extends Reducer<any, any>, I>(
991
+ reducer: R,
992
+ initializerArg: I,
993
+ initializer: (arg: I) => ReducerState<R>
994
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
995
+ /**
996
+ * An alternative to `useState`.
997
+ *
998
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
999
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
1000
+ * updates because you can pass `dispatch` down instead of callbacks.
1001
+ *
1002
+ * @version 16.8.0
1003
+ * @see https://reactjs.org/docs/hooks-reference.html#usereducer
1004
+ */
1005
+
1006
+ // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.
1007
+ // The Flow types do have an overload for 3-ary invocation with undefined initializer.
1008
+
1009
+ // NOTE: without the ReducerState indirection, TypeScript would reduce S to be the most common
1010
+ // supertype between the reducer's return type and the initialState (or the initializer's return type),
1011
+ // which would prevent autocompletion from ever working.
1012
+
1013
+ // TODO: double-check if this weird overload logic is necessary. It is possible it's either a bug
1014
+ // in older versions, or a regression in newer versions of the typescript completion service.
1015
+ function useReducer<R extends Reducer<any, any>>(
1016
+ reducer: R,
1017
+ initialState: ReducerState<R>,
1018
+ initializer?: undefined
1019
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
1020
+ /**
1021
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1022
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1023
+ *
1024
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1025
+ * value around similar to how you’d use instance fields in classes.
1026
+ *
1027
+ * @version 16.8.0
1028
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
1029
+ */
1030
+ // TODO (TypeScript 3.0): <T extends unknown>
1031
+ function useRef<T>(initialValue: T): MutableRefObject<T>;
1032
+ // convenience overload for refs given as a ref prop as they typically start with a null value
1033
+ /**
1034
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1035
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1036
+ *
1037
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1038
+ * value around similar to how you’d use instance fields in classes.
1039
+ *
1040
+ * Usage note: if you need the result of useRef to be directly mutable, include `| null` in the type
1041
+ * of the generic argument.
1042
+ *
1043
+ * @version 16.8.0
1044
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
1045
+ */
1046
+ // TODO (TypeScript 3.0): <T extends unknown>
1047
+ function useRef<T>(initialValue: T|null): RefObject<T>;
1048
+ // convenience overload for potentially undefined initialValue / call with 0 arguments
1049
+ // has a default to stop it from defaulting to {} instead
1050
+ /**
1051
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1052
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1053
+ *
1054
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1055
+ * value around similar to how you’d use instance fields in classes.
1056
+ *
1057
+ * @version 16.8.0
1058
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
1059
+ */
1060
+ // TODO (TypeScript 3.0): <T extends unknown>
1061
+ function useRef<T = undefined>(): MutableRefObject<T | undefined>;
1062
+ /**
1063
+ * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
1064
+ * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
1065
+ * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
1066
+ *
1067
+ * Prefer the standard `useEffect` when possible to avoid blocking visual updates.
1068
+ *
1069
+ * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as
1070
+ * `componentDidMount` and `componentDidUpdate`.
1071
+ *
1072
+ * @version 16.8.0
1073
+ * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
1074
+ */
1075
+ function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
1076
+ /**
1077
+ * Accepts a function that contains imperative, possibly effectful code.
1078
+ *
1079
+ * @param effect Imperative function that can return a cleanup function
1080
+ * @param deps If present, effect will only activate if the values in the list change.
1081
+ *
1082
+ * @version 16.8.0
1083
+ * @see https://reactjs.org/docs/hooks-reference.html#useeffect
1084
+ */
1085
+ function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1086
+ // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
1087
+ /**
1088
+ * `useImperativeHandle` customizes the instance value that is exposed to parent components when using
1089
+ * `ref`. As always, imperative code using refs should be avoided in most cases.
1090
+ *
1091
+ * `useImperativeHandle` should be used with `React.forwardRef`.
1092
+ *
1093
+ * @version 16.8.0
1094
+ * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
1095
+ */
1096
+ function useImperativeHandle<T, R extends T>(ref: Ref<T>|undefined, init: () => R, deps?: DependencyList): void;
1097
+ // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key
1098
+ // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y.
1099
+ /**
1100
+ * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
1101
+ * has changed.
1102
+ *
1103
+ * @version 16.8.0
1104
+ * @see https://reactjs.org/docs/hooks-reference.html#usecallback
1105
+ */
1106
+ // TODO (TypeScript 3.0): <T extends (...args: never[]) => unknown>
1107
+ function useCallback<T extends (...args: any[]) => any>(callback: T, deps: DependencyList): T;
1108
+ /**
1109
+ * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1110
+ *
1111
+ * Usage note: if calling `useMemo` with a referentially stable function, also give it as the input in
1112
+ * the second argument.
1113
+ *
1114
+ * ```ts
1115
+ * function expensive () { ... }
1116
+ *
1117
+ * function Component () {
1118
+ * const expensiveResult = useMemo(expensive, [expensive])
1119
+ * return ...
1120
+ * }
1121
+ * ```
1122
+ *
1123
+ * @version 16.8.0
1124
+ * @see https://reactjs.org/docs/hooks-reference.html#usememo
1125
+ */
1126
+ // allow undefined, but don't make it optional as that is very likely a mistake
1127
+ function useMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
1128
+ /**
1129
+ * `useDebugValue` can be used to display a label for custom hooks in React DevTools.
1130
+ *
1131
+ * NOTE: We don’t recommend adding debug values to every custom hook.
1132
+ * It’s most valuable for custom hooks that are part of shared libraries.
1133
+ *
1134
+ * @version 16.8.0
1135
+ * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
1136
+ */
1137
+ // the name of the custom hook is itself derived from the function name at runtime:
1138
+ // it's just the function name without the "use" prefix.
1139
+ function useDebugValue<T>(value: T, format?: (value: T) => any): void;
1140
+
1141
+ //
1142
+ // Event System
1143
+ // ----------------------------------------------------------------------
1144
+ // TODO: change any to unknown when moving to TS v3
1145
+ interface BaseSyntheticEvent<E = object, C = any, T = any> {
1146
+ nativeEvent: E;
1147
+ currentTarget: C;
1148
+ target: T;
1149
+ bubbles: boolean;
1150
+ cancelable: boolean;
1151
+ defaultPrevented: boolean;
1152
+ eventPhase: number;
1153
+ isTrusted: boolean;
1154
+ preventDefault(): void;
1155
+ isDefaultPrevented(): boolean;
1156
+ stopPropagation(): void;
1157
+ isPropagationStopped(): boolean;
1158
+ persist(): void;
1159
+ timeStamp: number;
1160
+ type: string;
1161
+ }
1162
+
1163
+ /**
1164
+ * currentTarget - a reference to the element on which the event listener is registered.
1165
+ *
1166
+ * target - a reference to the element from which the event was originally dispatched.
1167
+ * This might be a child element to the element on which the event listener is registered.
1168
+ * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12239
1169
+ */
1170
+ interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {}
1171
+
1172
+ interface ClipboardEvent<T = Element> extends SyntheticEvent<T, NativeClipboardEvent> {
1173
+ clipboardData: DataTransfer;
1174
+ }
1175
+
1176
+ interface CompositionEvent<T = Element> extends SyntheticEvent<T, NativeCompositionEvent> {
1177
+ data: string;
1178
+ }
1179
+
1180
+ interface DragEvent<T = Element> extends MouseEvent<T, NativeDragEvent> {
1181
+ dataTransfer: DataTransfer;
1182
+ }
1183
+
1184
+ interface PointerEvent<T = Element> extends MouseEvent<T, NativePointerEvent> {
1185
+ pointerId: number;
1186
+ pressure: number;
1187
+ tangentialPressure: number;
1188
+ tiltX: number;
1189
+ tiltY: number;
1190
+ twist: number;
1191
+ width: number;
1192
+ height: number;
1193
+ pointerType: 'mouse' | 'pen' | 'touch';
1194
+ isPrimary: boolean;
1195
+ }
1196
+
1197
+ interface FocusEvent<T = Element> extends SyntheticEvent<T, NativeFocusEvent> {
1198
+ relatedTarget: EventTarget | null;
1199
+ target: EventTarget & T;
1200
+ }
1201
+
1202
+ // tslint:disable-next-line:no-empty-interface
1203
+ interface FormEvent<T = Element> extends SyntheticEvent<T> {
1204
+ }
1205
+
1206
+ interface InvalidEvent<T = Element> extends SyntheticEvent<T> {
1207
+ target: EventTarget & T;
1208
+ }
1209
+
1210
+ interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
1211
+ target: EventTarget & T;
1212
+ }
1213
+
1214
+ interface KeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> {
1215
+ altKey: boolean;
1216
+ charCode: number;
1217
+ ctrlKey: boolean;
1218
+ /**
1219
+ * 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.
1220
+ */
1221
+ getModifierState(key: string): boolean;
1222
+ /**
1223
+ * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1224
+ */
1225
+ key: string;
1226
+ keyCode: number;
1227
+ locale: string;
1228
+ location: number;
1229
+ metaKey: boolean;
1230
+ repeat: boolean;
1231
+ shiftKey: boolean;
1232
+ which: number;
1233
+ }
1234
+
1235
+ interface MouseEvent<T = Element, E = NativeMouseEvent> extends UIEvent<T, E> {
1236
+ altKey: boolean;
1237
+ button: number;
1238
+ buttons: number;
1239
+ clientX: number;
1240
+ clientY: number;
1241
+ ctrlKey: boolean;
1242
+ /**
1243
+ * 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.
1244
+ */
1245
+ getModifierState(key: string): boolean;
1246
+ metaKey: boolean;
1247
+ movementX: number;
1248
+ movementY: number;
1249
+ pageX: number;
1250
+ pageY: number;
1251
+ relatedTarget: EventTarget | null;
1252
+ screenX: number;
1253
+ screenY: number;
1254
+ shiftKey: boolean;
1255
+ }
1256
+
1257
+ interface TouchEvent<T = Element> extends SyntheticEvent<T, NativeTouchEvent> {
1258
+ altKey: boolean;
1259
+ changedTouches: TouchList;
1260
+ ctrlKey: boolean;
1261
+ /**
1262
+ * 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.
1263
+ */
1264
+ getModifierState(key: string): boolean;
1265
+ metaKey: boolean;
1266
+ shiftKey: boolean;
1267
+ targetTouches: TouchList;
1268
+ touches: TouchList;
1269
+ }
1270
+
1271
+ interface UIEvent<T = Element, E = NativeUIEvent> extends SyntheticEvent<T, E> {
1272
+ detail: number;
1273
+ view: AbstractView;
1274
+ }
1275
+
1276
+ interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
1277
+ deltaMode: number;
1278
+ deltaX: number;
1279
+ deltaY: number;
1280
+ deltaZ: number;
1281
+ }
1282
+
1283
+ interface AnimationEvent<T = Element> extends SyntheticEvent<T, NativeAnimationEvent> {
1284
+ animationName: string;
1285
+ elapsedTime: number;
1286
+ pseudoElement: string;
1287
+ }
1288
+
1289
+ interface TransitionEvent<T = Element> extends SyntheticEvent<T, NativeTransitionEvent> {
1290
+ elapsedTime: number;
1291
+ propertyName: string;
1292
+ pseudoElement: string;
1293
+ }
1294
+
1295
+ //
1296
+ // Event Handler Types
1297
+ // ----------------------------------------------------------------------
1298
+
1299
+ type EventHandler<E extends SyntheticEvent<any>> = { bivarianceHack(event: E): void }["bivarianceHack"];
1300
+
1301
+ type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
1302
+
1303
+ type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
1304
+ type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
1305
+ type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
1306
+ type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
1307
+ type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
1308
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
1309
+ type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
1310
+ type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
1311
+ type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
1312
+ type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
1313
+ type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
1314
+ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
1315
+ type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
1316
+ type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
1317
+
1318
+ //
1319
+ // Props / DOM Attributes
1320
+ // ----------------------------------------------------------------------
1321
+
1322
+ /**
1323
+ * @deprecated. This was used to allow clients to pass `ref` and `key`
1324
+ * to `createElement`, which is no longer necessary due to intersection
1325
+ * types. If you need to declare a props object before passing it to
1326
+ * `createElement` or a factory, use `ClassAttributes<T>`:
1327
+ *
1328
+ * ```ts
1329
+ * var b: Button | null;
1330
+ * var props: ButtonProps & ClassAttributes<Button> = {
1331
+ * ref: b => button = b, // ok!
1332
+ * label: "I'm a Button"
1333
+ * };
1334
+ * ```
1335
+ */
1336
+ interface Props<T> {
1337
+ children?: ReactNode;
1338
+ key?: Key;
1339
+ ref?: LegacyRef<T>;
1340
+ }
1341
+
1342
+ interface HTMLProps<T> extends AllHTMLAttributes<T>, ClassAttributes<T> {
1343
+ }
1344
+
1345
+ type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = ClassAttributes<T> & E;
1346
+
1347
+ interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
1348
+ }
1349
+
1350
+ interface DOMAttributes<T> {
1351
+ children?: ReactNode;
1352
+ dangerouslySetInnerHTML?: {
1353
+ __html: string;
1354
+ };
1355
+
1356
+ // Clipboard Events
1357
+ onCopy?: ClipboardEventHandler<T>;
1358
+ onCopyCapture?: ClipboardEventHandler<T>;
1359
+ onCut?: ClipboardEventHandler<T>;
1360
+ onCutCapture?: ClipboardEventHandler<T>;
1361
+ onPaste?: ClipboardEventHandler<T>;
1362
+ onPasteCapture?: ClipboardEventHandler<T>;
1363
+
1364
+ // Composition Events
1365
+ onCompositionEnd?: CompositionEventHandler<T>;
1366
+ onCompositionEndCapture?: CompositionEventHandler<T>;
1367
+ onCompositionStart?: CompositionEventHandler<T>;
1368
+ onCompositionStartCapture?: CompositionEventHandler<T>;
1369
+ onCompositionUpdate?: CompositionEventHandler<T>;
1370
+ onCompositionUpdateCapture?: CompositionEventHandler<T>;
1371
+
1372
+ // Focus Events
1373
+ onFocus?: FocusEventHandler<T>;
1374
+ onFocusCapture?: FocusEventHandler<T>;
1375
+ onBlur?: FocusEventHandler<T>;
1376
+ onBlurCapture?: FocusEventHandler<T>;
1377
+
1378
+ // Form Events
1379
+ onChange?: FormEventHandler<T>;
1380
+ onChangeCapture?: FormEventHandler<T>;
1381
+ onBeforeInput?: FormEventHandler<T>;
1382
+ onBeforeInputCapture?: FormEventHandler<T>;
1383
+ onInput?: FormEventHandler<T>;
1384
+ onInputCapture?: FormEventHandler<T>;
1385
+ onReset?: FormEventHandler<T>;
1386
+ onResetCapture?: FormEventHandler<T>;
1387
+ onSubmit?: FormEventHandler<T>;
1388
+ onSubmitCapture?: FormEventHandler<T>;
1389
+ onInvalid?: FormEventHandler<T>;
1390
+ onInvalidCapture?: FormEventHandler<T>;
1391
+
1392
+ // Image Events
1393
+ onLoad?: ReactEventHandler<T>;
1394
+ onLoadCapture?: ReactEventHandler<T>;
1395
+ onError?: ReactEventHandler<T>; // also a Media Event
1396
+ onErrorCapture?: ReactEventHandler<T>; // also a Media Event
1397
+
1398
+ // Keyboard Events
1399
+ onKeyDown?: KeyboardEventHandler<T>;
1400
+ onKeyDownCapture?: KeyboardEventHandler<T>;
1401
+ onKeyPress?: KeyboardEventHandler<T>;
1402
+ onKeyPressCapture?: KeyboardEventHandler<T>;
1403
+ onKeyUp?: KeyboardEventHandler<T>;
1404
+ onKeyUpCapture?: KeyboardEventHandler<T>;
1405
+
1406
+ // Media Events
1407
+ onAbort?: ReactEventHandler<T>;
1408
+ onAbortCapture?: ReactEventHandler<T>;
1409
+ onCanPlay?: ReactEventHandler<T>;
1410
+ onCanPlayCapture?: ReactEventHandler<T>;
1411
+ onCanPlayThrough?: ReactEventHandler<T>;
1412
+ onCanPlayThroughCapture?: ReactEventHandler<T>;
1413
+ onDurationChange?: ReactEventHandler<T>;
1414
+ onDurationChangeCapture?: ReactEventHandler<T>;
1415
+ onEmptied?: ReactEventHandler<T>;
1416
+ onEmptiedCapture?: ReactEventHandler<T>;
1417
+ onEncrypted?: ReactEventHandler<T>;
1418
+ onEncryptedCapture?: ReactEventHandler<T>;
1419
+ onEnded?: ReactEventHandler<T>;
1420
+ onEndedCapture?: ReactEventHandler<T>;
1421
+ onLoadedData?: ReactEventHandler<T>;
1422
+ onLoadedDataCapture?: ReactEventHandler<T>;
1423
+ onLoadedMetadata?: ReactEventHandler<T>;
1424
+ onLoadedMetadataCapture?: ReactEventHandler<T>;
1425
+ onLoadStart?: ReactEventHandler<T>;
1426
+ onLoadStartCapture?: ReactEventHandler<T>;
1427
+ onPause?: ReactEventHandler<T>;
1428
+ onPauseCapture?: ReactEventHandler<T>;
1429
+ onPlay?: ReactEventHandler<T>;
1430
+ onPlayCapture?: ReactEventHandler<T>;
1431
+ onPlaying?: ReactEventHandler<T>;
1432
+ onPlayingCapture?: ReactEventHandler<T>;
1433
+ onProgress?: ReactEventHandler<T>;
1434
+ onProgressCapture?: ReactEventHandler<T>;
1435
+ onRateChange?: ReactEventHandler<T>;
1436
+ onRateChangeCapture?: ReactEventHandler<T>;
1437
+ onSeeked?: ReactEventHandler<T>;
1438
+ onSeekedCapture?: ReactEventHandler<T>;
1439
+ onSeeking?: ReactEventHandler<T>;
1440
+ onSeekingCapture?: ReactEventHandler<T>;
1441
+ onStalled?: ReactEventHandler<T>;
1442
+ onStalledCapture?: ReactEventHandler<T>;
1443
+ onSuspend?: ReactEventHandler<T>;
1444
+ onSuspendCapture?: ReactEventHandler<T>;
1445
+ onTimeUpdate?: ReactEventHandler<T>;
1446
+ onTimeUpdateCapture?: ReactEventHandler<T>;
1447
+ onVolumeChange?: ReactEventHandler<T>;
1448
+ onVolumeChangeCapture?: ReactEventHandler<T>;
1449
+ onWaiting?: ReactEventHandler<T>;
1450
+ onWaitingCapture?: ReactEventHandler<T>;
1451
+
1452
+ // MouseEvents
1453
+ onAuxClick?: MouseEventHandler<T>;
1454
+ onAuxClickCapture?: MouseEventHandler<T>;
1455
+ onClick?: MouseEventHandler<T>;
1456
+ onClickCapture?: MouseEventHandler<T>;
1457
+ onContextMenu?: MouseEventHandler<T>;
1458
+ onContextMenuCapture?: MouseEventHandler<T>;
1459
+ onDoubleClick?: MouseEventHandler<T>;
1460
+ onDoubleClickCapture?: MouseEventHandler<T>;
1461
+ onDrag?: DragEventHandler<T>;
1462
+ onDragCapture?: DragEventHandler<T>;
1463
+ onDragEnd?: DragEventHandler<T>;
1464
+ onDragEndCapture?: DragEventHandler<T>;
1465
+ onDragEnter?: DragEventHandler<T>;
1466
+ onDragEnterCapture?: DragEventHandler<T>;
1467
+ onDragExit?: DragEventHandler<T>;
1468
+ onDragExitCapture?: DragEventHandler<T>;
1469
+ onDragLeave?: DragEventHandler<T>;
1470
+ onDragLeaveCapture?: DragEventHandler<T>;
1471
+ onDragOver?: DragEventHandler<T>;
1472
+ onDragOverCapture?: DragEventHandler<T>;
1473
+ onDragStart?: DragEventHandler<T>;
1474
+ onDragStartCapture?: DragEventHandler<T>;
1475
+ onDrop?: DragEventHandler<T>;
1476
+ onDropCapture?: DragEventHandler<T>;
1477
+ onMouseDown?: MouseEventHandler<T>;
1478
+ onMouseDownCapture?: MouseEventHandler<T>;
1479
+ onMouseEnter?: MouseEventHandler<T>;
1480
+ onMouseLeave?: MouseEventHandler<T>;
1481
+ onMouseMove?: MouseEventHandler<T>;
1482
+ onMouseMoveCapture?: MouseEventHandler<T>;
1483
+ onMouseOut?: MouseEventHandler<T>;
1484
+ onMouseOutCapture?: MouseEventHandler<T>;
1485
+ onMouseOver?: MouseEventHandler<T>;
1486
+ onMouseOverCapture?: MouseEventHandler<T>;
1487
+ onMouseUp?: MouseEventHandler<T>;
1488
+ onMouseUpCapture?: MouseEventHandler<T>;
1489
+
1490
+ // Selection Events
1491
+ onSelect?: ReactEventHandler<T>;
1492
+ onSelectCapture?: ReactEventHandler<T>;
1493
+
1494
+ // Touch Events
1495
+ onTouchCancel?: TouchEventHandler<T>;
1496
+ onTouchCancelCapture?: TouchEventHandler<T>;
1497
+ onTouchEnd?: TouchEventHandler<T>;
1498
+ onTouchEndCapture?: TouchEventHandler<T>;
1499
+ onTouchMove?: TouchEventHandler<T>;
1500
+ onTouchMoveCapture?: TouchEventHandler<T>;
1501
+ onTouchStart?: TouchEventHandler<T>;
1502
+ onTouchStartCapture?: TouchEventHandler<T>;
1503
+
1504
+ // Pointer Events
1505
+ onPointerDown?: PointerEventHandler<T>;
1506
+ onPointerDownCapture?: PointerEventHandler<T>;
1507
+ onPointerMove?: PointerEventHandler<T>;
1508
+ onPointerMoveCapture?: PointerEventHandler<T>;
1509
+ onPointerUp?: PointerEventHandler<T>;
1510
+ onPointerUpCapture?: PointerEventHandler<T>;
1511
+ onPointerCancel?: PointerEventHandler<T>;
1512
+ onPointerCancelCapture?: PointerEventHandler<T>;
1513
+ onPointerEnter?: PointerEventHandler<T>;
1514
+ onPointerEnterCapture?: PointerEventHandler<T>;
1515
+ onPointerLeave?: PointerEventHandler<T>;
1516
+ onPointerLeaveCapture?: PointerEventHandler<T>;
1517
+ onPointerOver?: PointerEventHandler<T>;
1518
+ onPointerOverCapture?: PointerEventHandler<T>;
1519
+ onPointerOut?: PointerEventHandler<T>;
1520
+ onPointerOutCapture?: PointerEventHandler<T>;
1521
+ onGotPointerCapture?: PointerEventHandler<T>;
1522
+ onGotPointerCaptureCapture?: PointerEventHandler<T>;
1523
+ onLostPointerCapture?: PointerEventHandler<T>;
1524
+ onLostPointerCaptureCapture?: PointerEventHandler<T>;
1525
+
1526
+ // UI Events
1527
+ onScroll?: UIEventHandler<T>;
1528
+ onScrollCapture?: UIEventHandler<T>;
1529
+
1530
+ // Wheel Events
1531
+ onWheel?: WheelEventHandler<T>;
1532
+ onWheelCapture?: WheelEventHandler<T>;
1533
+
1534
+ // Animation Events
1535
+ onAnimationStart?: AnimationEventHandler<T>;
1536
+ onAnimationStartCapture?: AnimationEventHandler<T>;
1537
+ onAnimationEnd?: AnimationEventHandler<T>;
1538
+ onAnimationEndCapture?: AnimationEventHandler<T>;
1539
+ onAnimationIteration?: AnimationEventHandler<T>;
1540
+ onAnimationIterationCapture?: AnimationEventHandler<T>;
1541
+
1542
+ // Transition Events
1543
+ onTransitionEnd?: TransitionEventHandler<T>;
1544
+ onTransitionEndCapture?: TransitionEventHandler<T>;
1545
+ }
1546
+
1547
+ export interface CSSProperties extends CSS.Properties<string | number> {
1548
+ /**
1549
+ * The index signature was removed to enable closed typing for style
1550
+ * using CSSType. You're able to use type assertion or module augmentation
1551
+ * to add properties or an index signature of your own.
1552
+ *
1553
+ * For examples and more information, visit:
1554
+ * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
1555
+ */
1556
+ }
1557
+
1558
+ // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
1559
+ interface AriaAttributes {
1560
+ /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
1561
+ 'aria-activedescendant'?: string;
1562
+ /** 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. */
1563
+ 'aria-atomic'?: boolean | 'false' | 'true';
1564
+ /**
1565
+ * 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
1566
+ * presented if they are made.
1567
+ */
1568
+ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';
1569
+ /** 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. */
1570
+ 'aria-busy'?: boolean | 'false' | 'true';
1571
+ /**
1572
+ * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
1573
+ * @see aria-pressed @see aria-selected.
1574
+ */
1575
+ 'aria-checked'?: boolean | 'false' | 'mixed' | 'true';
1576
+ /**
1577
+ * Defines the total number of columns in a table, grid, or treegrid.
1578
+ * @see aria-colindex.
1579
+ */
1580
+ 'aria-colcount'?: number;
1581
+ /**
1582
+ * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
1583
+ * @see aria-colcount @see aria-colspan.
1584
+ */
1585
+ 'aria-colindex'?: number;
1586
+ /**
1587
+ * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
1588
+ * @see aria-colindex @see aria-rowspan.
1589
+ */
1590
+ 'aria-colspan'?: number;
1591
+ /**
1592
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
1593
+ * @see aria-owns.
1594
+ */
1595
+ 'aria-controls'?: string;
1596
+ /** Indicates the element that represents the current item within a container or set of related elements. */
1597
+ 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time';
1598
+ /**
1599
+ * Identifies the element (or elements) that describes the object.
1600
+ * @see aria-labelledby
1601
+ */
1602
+ 'aria-describedby'?: string;
1603
+ /**
1604
+ * Identifies the element that provides a detailed, extended description for the object.
1605
+ * @see aria-describedby.
1606
+ */
1607
+ 'aria-details'?: string;
1608
+ /**
1609
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
1610
+ * @see aria-hidden @see aria-readonly.
1611
+ */
1612
+ 'aria-disabled'?: boolean | 'false' | 'true';
1613
+ /**
1614
+ * Indicates what functions can be performed when a dragged object is released on the drop target.
1615
+ * @deprecated in ARIA 1.1
1616
+ */
1617
+ 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup';
1618
+ /**
1619
+ * Identifies the element that provides an error message for the object.
1620
+ * @see aria-invalid @see aria-describedby.
1621
+ */
1622
+ 'aria-errormessage'?: string;
1623
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
1624
+ 'aria-expanded'?: boolean | 'false' | 'true';
1625
+ /**
1626
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
1627
+ * allows assistive technology to override the general default of reading in document source order.
1628
+ */
1629
+ 'aria-flowto'?: string;
1630
+ /**
1631
+ * Indicates an element's "grabbed" state in a drag-and-drop operation.
1632
+ * @deprecated in ARIA 1.1
1633
+ */
1634
+ 'aria-grabbed'?: boolean | 'false' | 'true';
1635
+ /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
1636
+ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
1637
+ /**
1638
+ * Indicates whether the element is exposed to an accessibility API.
1639
+ * @see aria-disabled.
1640
+ */
1641
+ 'aria-hidden'?: boolean | 'false' | 'true';
1642
+ /**
1643
+ * Indicates the entered value does not conform to the format expected by the application.
1644
+ * @see aria-errormessage.
1645
+ */
1646
+ 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
1647
+ /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
1648
+ 'aria-keyshortcuts'?: string;
1649
+ /**
1650
+ * Defines a string value that labels the current element.
1651
+ * @see aria-labelledby.
1652
+ */
1653
+ 'aria-label'?: string;
1654
+ /**
1655
+ * Identifies the element (or elements) that labels the current element.
1656
+ * @see aria-describedby.
1657
+ */
1658
+ 'aria-labelledby'?: string;
1659
+ /** Defines the hierarchical level of an element within a structure. */
1660
+ 'aria-level'?: number;
1661
+ /** 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. */
1662
+ 'aria-live'?: 'off' | 'assertive' | 'polite';
1663
+ /** Indicates whether an element is modal when displayed. */
1664
+ 'aria-modal'?: boolean | 'false' | 'true';
1665
+ /** Indicates whether a text box accepts multiple lines of input or only a single line. */
1666
+ 'aria-multiline'?: boolean | 'false' | 'true';
1667
+ /** Indicates that the user may select more than one item from the current selectable descendants. */
1668
+ 'aria-multiselectable'?: boolean | 'false' | 'true';
1669
+ /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
1670
+ 'aria-orientation'?: 'horizontal' | 'vertical';
1671
+ /**
1672
+ * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
1673
+ * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
1674
+ * @see aria-controls.
1675
+ */
1676
+ 'aria-owns'?: string;
1677
+ /**
1678
+ * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
1679
+ * A hint could be a sample value or a brief description of the expected format.
1680
+ */
1681
+ 'aria-placeholder'?: string;
1682
+ /**
1683
+ * 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.
1684
+ * @see aria-setsize.
1685
+ */
1686
+ 'aria-posinset'?: number;
1687
+ /**
1688
+ * Indicates the current "pressed" state of toggle buttons.
1689
+ * @see aria-checked @see aria-selected.
1690
+ */
1691
+ 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true';
1692
+ /**
1693
+ * Indicates that the element is not editable, but is otherwise operable.
1694
+ * @see aria-disabled.
1695
+ */
1696
+ 'aria-readonly'?: boolean | 'false' | 'true';
1697
+ /**
1698
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
1699
+ * @see aria-atomic.
1700
+ */
1701
+ 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text';
1702
+ /** Indicates that user input is required on the element before a form may be submitted. */
1703
+ 'aria-required'?: boolean | 'false' | 'true';
1704
+ /** Defines a human-readable, author-localized description for the role of an element. */
1705
+ 'aria-roledescription'?: string;
1706
+ /**
1707
+ * Defines the total number of rows in a table, grid, or treegrid.
1708
+ * @see aria-rowindex.
1709
+ */
1710
+ 'aria-rowcount'?: number;
1711
+ /**
1712
+ * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
1713
+ * @see aria-rowcount @see aria-rowspan.
1714
+ */
1715
+ 'aria-rowindex'?: number;
1716
+ /**
1717
+ * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
1718
+ * @see aria-rowindex @see aria-colspan.
1719
+ */
1720
+ 'aria-rowspan'?: number;
1721
+ /**
1722
+ * Indicates the current "selected" state of various widgets.
1723
+ * @see aria-checked @see aria-pressed.
1724
+ */
1725
+ 'aria-selected'?: boolean | 'false' | 'true';
1726
+ /**
1727
+ * 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.
1728
+ * @see aria-posinset.
1729
+ */
1730
+ 'aria-setsize'?: number;
1731
+ /** Indicates if items in a table or grid are sorted in ascending or descending order. */
1732
+ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other';
1733
+ /** Defines the maximum allowed value for a range widget. */
1734
+ 'aria-valuemax'?: number;
1735
+ /** Defines the minimum allowed value for a range widget. */
1736
+ 'aria-valuemin'?: number;
1737
+ /**
1738
+ * Defines the current value for a range widget.
1739
+ * @see aria-valuetext.
1740
+ */
1741
+ 'aria-valuenow'?: number;
1742
+ /** Defines the human readable text alternative of aria-valuenow for a range widget. */
1743
+ 'aria-valuetext'?: string;
1744
+ }
1745
+
1746
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1747
+ // React-specific Attributes
1748
+ defaultChecked?: boolean;
1749
+ defaultValue?: string | number | string[];
1750
+ suppressContentEditableWarning?: boolean;
1751
+ suppressHydrationWarning?: boolean;
1752
+
1753
+ // Standard HTML Attributes
1754
+ accessKey?: string;
1755
+ className?: string;
1756
+ contentEditable?: Booleanish | "inherit";
1757
+ contextMenu?: string;
1758
+ dir?: string;
1759
+ draggable?: Booleanish;
1760
+ hidden?: boolean;
1761
+ id?: string;
1762
+ lang?: string;
1763
+ placeholder?: string;
1764
+ slot?: string;
1765
+ spellCheck?: Booleanish;
1766
+ style?: CSSProperties;
1767
+ tabIndex?: number;
1768
+ title?: string;
1769
+ translate?: 'yes' | 'no';
1770
+
1771
+ // Unknown
1772
+ radioGroup?: string; // <command>, <menuitem>
1773
+
1774
+ // WAI-ARIA
1775
+ role?: string;
1776
+
1777
+ // RDFa Attributes
1778
+ about?: string;
1779
+ datatype?: string;
1780
+ inlist?: any;
1781
+ prefix?: string;
1782
+ property?: string;
1783
+ resource?: string;
1784
+ typeof?: string;
1785
+ vocab?: string;
1786
+
1787
+ // Non-standard Attributes
1788
+ autoCapitalize?: string;
1789
+ autoCorrect?: string;
1790
+ autoSave?: string;
1791
+ color?: string;
1792
+ itemProp?: string;
1793
+ itemScope?: boolean;
1794
+ itemType?: string;
1795
+ itemID?: string;
1796
+ itemRef?: string;
1797
+ results?: number;
1798
+ security?: string;
1799
+ unselectable?: 'on' | 'off';
1800
+
1801
+ // Living Standard
1802
+ /**
1803
+ * Hints at the type of data that might be entered by the user while editing the element or its contents
1804
+ * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
1805
+ */
1806
+ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
1807
+ /**
1808
+ * Specify that a standard HTML element should behave like a defined custom built-in element
1809
+ * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
1810
+ */
1811
+ is?: string;
1812
+ }
1813
+
1814
+ interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
1815
+ // Standard HTML Attributes
1816
+ accept?: string;
1817
+ acceptCharset?: string;
1818
+ action?: string;
1819
+ allowFullScreen?: boolean;
1820
+ allowTransparency?: boolean;
1821
+ alt?: string;
1822
+ as?: string;
1823
+ async?: boolean;
1824
+ autoComplete?: string;
1825
+ autoFocus?: boolean;
1826
+ autoPlay?: boolean;
1827
+ capture?: boolean | string;
1828
+ cellPadding?: number | string;
1829
+ cellSpacing?: number | string;
1830
+ charSet?: string;
1831
+ challenge?: string;
1832
+ checked?: boolean;
1833
+ cite?: string;
1834
+ classID?: string;
1835
+ cols?: number;
1836
+ colSpan?: number;
1837
+ content?: string;
1838
+ controls?: boolean;
1839
+ coords?: string;
1840
+ crossOrigin?: string;
1841
+ data?: string;
1842
+ dateTime?: string;
1843
+ default?: boolean;
1844
+ defer?: boolean;
1845
+ disabled?: boolean;
1846
+ download?: any;
1847
+ encType?: string;
1848
+ form?: string;
1849
+ formAction?: string;
1850
+ formEncType?: string;
1851
+ formMethod?: string;
1852
+ formNoValidate?: boolean;
1853
+ formTarget?: string;
1854
+ frameBorder?: number | string;
1855
+ headers?: string;
1856
+ height?: number | string;
1857
+ high?: number;
1858
+ href?: string;
1859
+ hrefLang?: string;
1860
+ htmlFor?: string;
1861
+ httpEquiv?: string;
1862
+ integrity?: string;
1863
+ keyParams?: string;
1864
+ keyType?: string;
1865
+ kind?: string;
1866
+ label?: string;
1867
+ list?: string;
1868
+ loop?: boolean;
1869
+ low?: number;
1870
+ manifest?: string;
1871
+ marginHeight?: number;
1872
+ marginWidth?: number;
1873
+ max?: number | string;
1874
+ maxLength?: number;
1875
+ media?: string;
1876
+ mediaGroup?: string;
1877
+ method?: string;
1878
+ min?: number | string;
1879
+ minLength?: number;
1880
+ multiple?: boolean;
1881
+ muted?: boolean;
1882
+ name?: string;
1883
+ nonce?: string;
1884
+ noValidate?: boolean;
1885
+ open?: boolean;
1886
+ optimum?: number;
1887
+ pattern?: string;
1888
+ placeholder?: string;
1889
+ playsInline?: boolean;
1890
+ poster?: string;
1891
+ preload?: string;
1892
+ readOnly?: boolean;
1893
+ rel?: string;
1894
+ required?: boolean;
1895
+ reversed?: boolean;
1896
+ rows?: number;
1897
+ rowSpan?: number;
1898
+ sandbox?: string;
1899
+ scope?: string;
1900
+ scoped?: boolean;
1901
+ scrolling?: string;
1902
+ seamless?: boolean;
1903
+ selected?: boolean;
1904
+ shape?: string;
1905
+ size?: number;
1906
+ sizes?: string;
1907
+ span?: number;
1908
+ src?: string;
1909
+ srcDoc?: string;
1910
+ srcLang?: string;
1911
+ srcSet?: string;
1912
+ start?: number;
1913
+ step?: number | string;
1914
+ summary?: string;
1915
+ target?: string;
1916
+ type?: string;
1917
+ useMap?: string;
1918
+ value?: string | string[] | number;
1919
+ width?: number | string;
1920
+ wmode?: string;
1921
+ wrap?: string;
1922
+ }
1923
+
1924
+ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
1925
+ download?: any;
1926
+ href?: string;
1927
+ hrefLang?: string;
1928
+ media?: string;
1929
+ ping?: string;
1930
+ rel?: string;
1931
+ target?: string;
1932
+ type?: string;
1933
+ referrerPolicy?: string;
1934
+ }
1935
+
1936
+ // tslint:disable-next-line:no-empty-interface
1937
+ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
1938
+
1939
+ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
1940
+ alt?: string;
1941
+ coords?: string;
1942
+ download?: any;
1943
+ href?: string;
1944
+ hrefLang?: string;
1945
+ media?: string;
1946
+ rel?: string;
1947
+ shape?: string;
1948
+ target?: string;
1949
+ }
1950
+
1951
+ interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
1952
+ href?: string;
1953
+ target?: string;
1954
+ }
1955
+
1956
+ interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
1957
+ cite?: string;
1958
+ }
1959
+
1960
+ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
1961
+ autoFocus?: boolean;
1962
+ disabled?: boolean;
1963
+ form?: string;
1964
+ formAction?: string;
1965
+ formEncType?: string;
1966
+ formMethod?: string;
1967
+ formNoValidate?: boolean;
1968
+ formTarget?: string;
1969
+ name?: string;
1970
+ type?: 'submit' | 'reset' | 'button';
1971
+ value?: string | string[] | number;
1972
+ }
1973
+
1974
+ interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
1975
+ height?: number | string;
1976
+ width?: number | string;
1977
+ }
1978
+
1979
+ interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
1980
+ span?: number;
1981
+ width?: number | string;
1982
+ }
1983
+
1984
+ interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
1985
+ span?: number;
1986
+ }
1987
+
1988
+ interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
1989
+ value?: string | string[] | number;
1990
+ }
1991
+
1992
+ interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
1993
+ open?: boolean;
1994
+ }
1995
+
1996
+ interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
1997
+ cite?: string;
1998
+ dateTime?: string;
1999
+ }
2000
+
2001
+ interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
2002
+ open?: boolean;
2003
+ }
2004
+
2005
+ interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
2006
+ height?: number | string;
2007
+ src?: string;
2008
+ type?: string;
2009
+ width?: number | string;
2010
+ }
2011
+
2012
+ interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
2013
+ disabled?: boolean;
2014
+ form?: string;
2015
+ name?: string;
2016
+ }
2017
+
2018
+ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
2019
+ acceptCharset?: string;
2020
+ action?: string;
2021
+ autoComplete?: string;
2022
+ encType?: string;
2023
+ method?: string;
2024
+ name?: string;
2025
+ noValidate?: boolean;
2026
+ target?: string;
2027
+ }
2028
+
2029
+ interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
2030
+ manifest?: string;
2031
+ }
2032
+
2033
+ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
2034
+ allow?: string;
2035
+ allowFullScreen?: boolean;
2036
+ allowTransparency?: boolean;
2037
+ frameBorder?: number | string;
2038
+ height?: number | string;
2039
+ marginHeight?: number;
2040
+ marginWidth?: number;
2041
+ name?: string;
2042
+ referrerPolicy?: string;
2043
+ sandbox?: string;
2044
+ scrolling?: string;
2045
+ seamless?: boolean;
2046
+ src?: string;
2047
+ srcDoc?: string;
2048
+ width?: number | string;
2049
+ }
2050
+
2051
+ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
2052
+ alt?: string;
2053
+ crossOrigin?: "anonymous" | "use-credentials" | "";
2054
+ decoding?: "async" | "auto" | "sync";
2055
+ height?: number | string;
2056
+ loading?: "eager" | "lazy";
2057
+ referrerPolicy?: "no-referrer" | "origin" | "unsafe-url";
2058
+ sizes?: string;
2059
+ src?: string;
2060
+ srcSet?: string;
2061
+ useMap?: string;
2062
+ width?: number | string;
2063
+ }
2064
+
2065
+ interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
2066
+ cite?: string;
2067
+ dateTime?: string;
2068
+ }
2069
+
2070
+ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
2071
+ accept?: string;
2072
+ alt?: string;
2073
+ autoComplete?: string;
2074
+ autoFocus?: boolean;
2075
+ capture?: boolean | string; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
2076
+ checked?: boolean;
2077
+ crossOrigin?: string;
2078
+ disabled?: boolean;
2079
+ form?: string;
2080
+ formAction?: string;
2081
+ formEncType?: string;
2082
+ formMethod?: string;
2083
+ formNoValidate?: boolean;
2084
+ formTarget?: string;
2085
+ height?: number | string;
2086
+ list?: string;
2087
+ max?: number | string;
2088
+ maxLength?: number;
2089
+ min?: number | string;
2090
+ minLength?: number;
2091
+ multiple?: boolean;
2092
+ name?: string;
2093
+ pattern?: string;
2094
+ placeholder?: string;
2095
+ readOnly?: boolean;
2096
+ required?: boolean;
2097
+ size?: number;
2098
+ src?: string;
2099
+ step?: number | string;
2100
+ type?: string;
2101
+ value?: string | string[] | number;
2102
+ width?: number | string;
2103
+
2104
+ onChange?: ChangeEventHandler<T>;
2105
+ }
2106
+
2107
+ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
2108
+ autoFocus?: boolean;
2109
+ challenge?: string;
2110
+ disabled?: boolean;
2111
+ form?: string;
2112
+ keyType?: string;
2113
+ keyParams?: string;
2114
+ name?: string;
2115
+ }
2116
+
2117
+ interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
2118
+ form?: string;
2119
+ htmlFor?: string;
2120
+ }
2121
+
2122
+ interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
2123
+ value?: string | string[] | number;
2124
+ }
2125
+
2126
+ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
2127
+ as?: string;
2128
+ crossOrigin?: string;
2129
+ href?: string;
2130
+ hrefLang?: string;
2131
+ integrity?: string;
2132
+ media?: string;
2133
+ rel?: string;
2134
+ sizes?: string;
2135
+ type?: string;
2136
+ charSet?: string;
2137
+ }
2138
+
2139
+ interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
2140
+ name?: string;
2141
+ }
2142
+
2143
+ interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
2144
+ type?: string;
2145
+ }
2146
+
2147
+ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
2148
+ autoPlay?: boolean;
2149
+ controls?: boolean;
2150
+ controlsList?: string;
2151
+ crossOrigin?: string;
2152
+ loop?: boolean;
2153
+ mediaGroup?: string;
2154
+ muted?: boolean;
2155
+ playsInline?: boolean;
2156
+ preload?: string;
2157
+ src?: string;
2158
+ }
2159
+
2160
+ interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2161
+ charSet?: string;
2162
+ content?: string;
2163
+ httpEquiv?: string;
2164
+ name?: string;
2165
+ }
2166
+
2167
+ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
2168
+ form?: string;
2169
+ high?: number;
2170
+ low?: number;
2171
+ max?: number | string;
2172
+ min?: number | string;
2173
+ optimum?: number;
2174
+ value?: string | string[] | number;
2175
+ }
2176
+
2177
+ interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
2178
+ cite?: string;
2179
+ }
2180
+
2181
+ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
2182
+ classID?: string;
2183
+ data?: string;
2184
+ form?: string;
2185
+ height?: number | string;
2186
+ name?: string;
2187
+ type?: string;
2188
+ useMap?: string;
2189
+ width?: number | string;
2190
+ wmode?: string;
2191
+ }
2192
+
2193
+ interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
2194
+ reversed?: boolean;
2195
+ start?: number;
2196
+ type?: '1' | 'a' | 'A' | 'i' | 'I';
2197
+ }
2198
+
2199
+ interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
2200
+ disabled?: boolean;
2201
+ label?: string;
2202
+ }
2203
+
2204
+ interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
2205
+ disabled?: boolean;
2206
+ label?: string;
2207
+ selected?: boolean;
2208
+ value?: string | string[] | number;
2209
+ }
2210
+
2211
+ interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
2212
+ form?: string;
2213
+ htmlFor?: string;
2214
+ name?: string;
2215
+ }
2216
+
2217
+ interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
2218
+ name?: string;
2219
+ value?: string | string[] | number;
2220
+ }
2221
+
2222
+ interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
2223
+ max?: number | string;
2224
+ value?: string | string[] | number;
2225
+ }
2226
+
2227
+ interface SlotHTMLAttributes<T> extends HTMLAttributes<T> {
2228
+ name?: string;
2229
+ }
2230
+
2231
+ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
2232
+ async?: boolean;
2233
+ charSet?: string;
2234
+ crossOrigin?: string;
2235
+ defer?: boolean;
2236
+ integrity?: string;
2237
+ noModule?: boolean;
2238
+ nonce?: string;
2239
+ src?: string;
2240
+ type?: string;
2241
+ }
2242
+
2243
+ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
2244
+ autoComplete?: string;
2245
+ autoFocus?: boolean;
2246
+ disabled?: boolean;
2247
+ form?: string;
2248
+ multiple?: boolean;
2249
+ name?: string;
2250
+ required?: boolean;
2251
+ size?: number;
2252
+ value?: string | string[] | number;
2253
+ onChange?: ChangeEventHandler<T>;
2254
+ }
2255
+
2256
+ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
2257
+ media?: string;
2258
+ sizes?: string;
2259
+ src?: string;
2260
+ srcSet?: string;
2261
+ type?: string;
2262
+ }
2263
+
2264
+ interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
2265
+ media?: string;
2266
+ nonce?: string;
2267
+ scoped?: boolean;
2268
+ type?: string;
2269
+ }
2270
+
2271
+ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
2272
+ cellPadding?: number | string;
2273
+ cellSpacing?: number | string;
2274
+ summary?: string;
2275
+ }
2276
+
2277
+ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
2278
+ autoComplete?: string;
2279
+ autoFocus?: boolean;
2280
+ cols?: number;
2281
+ dirName?: string;
2282
+ disabled?: boolean;
2283
+ form?: string;
2284
+ maxLength?: number;
2285
+ minLength?: number;
2286
+ name?: string;
2287
+ placeholder?: string;
2288
+ readOnly?: boolean;
2289
+ required?: boolean;
2290
+ rows?: number;
2291
+ value?: string | string[] | number;
2292
+ wrap?: string;
2293
+
2294
+ onChange?: ChangeEventHandler<T>;
2295
+ }
2296
+
2297
+ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
2298
+ align?: "left" | "center" | "right" | "justify" | "char";
2299
+ colSpan?: number;
2300
+ headers?: string;
2301
+ rowSpan?: number;
2302
+ scope?: string;
2303
+ abbr?: string;
2304
+ valign?: "top" | "middle" | "bottom" | "baseline";
2305
+ }
2306
+
2307
+ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
2308
+ align?: "left" | "center" | "right" | "justify" | "char";
2309
+ colSpan?: number;
2310
+ headers?: string;
2311
+ rowSpan?: number;
2312
+ scope?: string;
2313
+ abbr?: string;
2314
+ }
2315
+
2316
+ interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
2317
+ dateTime?: string;
2318
+ }
2319
+
2320
+ interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
2321
+ default?: boolean;
2322
+ kind?: string;
2323
+ label?: string;
2324
+ src?: string;
2325
+ srcLang?: string;
2326
+ }
2327
+
2328
+ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
2329
+ height?: number | string;
2330
+ playsInline?: boolean;
2331
+ poster?: string;
2332
+ width?: number | string;
2333
+ disablePictureInPicture?: boolean;
2334
+ }
2335
+
2336
+ // this list is "complete" in that it contains every SVG attribute
2337
+ // that React supports, but the types can be improved.
2338
+ // Full list here: https://facebook.github.io/react/docs/dom-elements.html
2339
+ //
2340
+ // The three broad type categories are (in order of restrictiveness):
2341
+ // - "number | string"
2342
+ // - "string"
2343
+ // - union of string literals
2344
+ interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
2345
+ // Attributes which also defined in HTMLAttributes
2346
+ // See comment in SVGDOMPropertyConfig.js
2347
+ className?: string;
2348
+ color?: string;
2349
+ height?: number | string;
2350
+ id?: string;
2351
+ lang?: string;
2352
+ max?: number | string;
2353
+ media?: string;
2354
+ method?: string;
2355
+ min?: number | string;
2356
+ name?: string;
2357
+ style?: CSSProperties;
2358
+ target?: string;
2359
+ type?: string;
2360
+ width?: number | string;
2361
+
2362
+ // Other HTML properties supported by SVG elements in browsers
2363
+ role?: string;
2364
+ tabIndex?: number;
2365
+ crossOrigin?: "anonymous" | "use-credentials" | "";
2366
+
2367
+ // SVG Specific attributes
2368
+ accentHeight?: number | string;
2369
+ accumulate?: "none" | "sum";
2370
+ additive?: "replace" | "sum";
2371
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" |
2372
+ "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit";
2373
+ allowReorder?: "no" | "yes";
2374
+ alphabetic?: number | string;
2375
+ amplitude?: number | string;
2376
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated";
2377
+ ascent?: number | string;
2378
+ attributeName?: string;
2379
+ attributeType?: string;
2380
+ autoReverse?: Booleanish;
2381
+ azimuth?: number | string;
2382
+ baseFrequency?: number | string;
2383
+ baselineShift?: number | string;
2384
+ baseProfile?: number | string;
2385
+ bbox?: number | string;
2386
+ begin?: number | string;
2387
+ bias?: number | string;
2388
+ by?: number | string;
2389
+ calcMode?: number | string;
2390
+ capHeight?: number | string;
2391
+ clip?: number | string;
2392
+ clipPath?: string;
2393
+ clipPathUnits?: number | string;
2394
+ clipRule?: number | string;
2395
+ colorInterpolation?: number | string;
2396
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit";
2397
+ colorProfile?: number | string;
2398
+ colorRendering?: number | string;
2399
+ contentScriptType?: number | string;
2400
+ contentStyleType?: number | string;
2401
+ cursor?: number | string;
2402
+ cx?: number | string;
2403
+ cy?: number | string;
2404
+ d?: string;
2405
+ decelerate?: number | string;
2406
+ descent?: number | string;
2407
+ diffuseConstant?: number | string;
2408
+ direction?: number | string;
2409
+ display?: number | string;
2410
+ divisor?: number | string;
2411
+ dominantBaseline?: number | string;
2412
+ dur?: number | string;
2413
+ dx?: number | string;
2414
+ dy?: number | string;
2415
+ edgeMode?: number | string;
2416
+ elevation?: number | string;
2417
+ enableBackground?: number | string;
2418
+ end?: number | string;
2419
+ exponent?: number | string;
2420
+ externalResourcesRequired?: Booleanish;
2421
+ fill?: string;
2422
+ fillOpacity?: number | string;
2423
+ fillRule?: "nonzero" | "evenodd" | "inherit";
2424
+ filter?: string;
2425
+ filterRes?: number | string;
2426
+ filterUnits?: number | string;
2427
+ floodColor?: number | string;
2428
+ floodOpacity?: number | string;
2429
+ focusable?: Booleanish | "auto";
2430
+ fontFamily?: string;
2431
+ fontSize?: number | string;
2432
+ fontSizeAdjust?: number | string;
2433
+ fontStretch?: number | string;
2434
+ fontStyle?: number | string;
2435
+ fontVariant?: number | string;
2436
+ fontWeight?: number | string;
2437
+ format?: number | string;
2438
+ from?: number | string;
2439
+ fx?: number | string;
2440
+ fy?: number | string;
2441
+ g1?: number | string;
2442
+ g2?: number | string;
2443
+ glyphName?: number | string;
2444
+ glyphOrientationHorizontal?: number | string;
2445
+ glyphOrientationVertical?: number | string;
2446
+ glyphRef?: number | string;
2447
+ gradientTransform?: string;
2448
+ gradientUnits?: string;
2449
+ hanging?: number | string;
2450
+ horizAdvX?: number | string;
2451
+ horizOriginX?: number | string;
2452
+ href?: string;
2453
+ ideographic?: number | string;
2454
+ imageRendering?: number | string;
2455
+ in2?: number | string;
2456
+ in?: string;
2457
+ intercept?: number | string;
2458
+ k1?: number | string;
2459
+ k2?: number | string;
2460
+ k3?: number | string;
2461
+ k4?: number | string;
2462
+ k?: number | string;
2463
+ kernelMatrix?: number | string;
2464
+ kernelUnitLength?: number | string;
2465
+ kerning?: number | string;
2466
+ keyPoints?: number | string;
2467
+ keySplines?: number | string;
2468
+ keyTimes?: number | string;
2469
+ lengthAdjust?: number | string;
2470
+ letterSpacing?: number | string;
2471
+ lightingColor?: number | string;
2472
+ limitingConeAngle?: number | string;
2473
+ local?: number | string;
2474
+ markerEnd?: string;
2475
+ markerHeight?: number | string;
2476
+ markerMid?: string;
2477
+ markerStart?: string;
2478
+ markerUnits?: number | string;
2479
+ markerWidth?: number | string;
2480
+ mask?: string;
2481
+ maskContentUnits?: number | string;
2482
+ maskUnits?: number | string;
2483
+ mathematical?: number | string;
2484
+ mode?: number | string;
2485
+ numOctaves?: number | string;
2486
+ offset?: number | string;
2487
+ opacity?: number | string;
2488
+ operator?: number | string;
2489
+ order?: number | string;
2490
+ orient?: number | string;
2491
+ orientation?: number | string;
2492
+ origin?: number | string;
2493
+ overflow?: number | string;
2494
+ overlinePosition?: number | string;
2495
+ overlineThickness?: number | string;
2496
+ paintOrder?: number | string;
2497
+ panose1?: number | string;
2498
+ path?: string;
2499
+ pathLength?: number | string;
2500
+ patternContentUnits?: string;
2501
+ patternTransform?: number | string;
2502
+ patternUnits?: string;
2503
+ pointerEvents?: number | string;
2504
+ points?: string;
2505
+ pointsAtX?: number | string;
2506
+ pointsAtY?: number | string;
2507
+ pointsAtZ?: number | string;
2508
+ preserveAlpha?: Booleanish;
2509
+ preserveAspectRatio?: string;
2510
+ primitiveUnits?: number | string;
2511
+ r?: number | string;
2512
+ radius?: number | string;
2513
+ refX?: number | string;
2514
+ refY?: number | string;
2515
+ renderingIntent?: number | string;
2516
+ repeatCount?: number | string;
2517
+ repeatDur?: number | string;
2518
+ requiredExtensions?: number | string;
2519
+ requiredFeatures?: number | string;
2520
+ restart?: number | string;
2521
+ result?: string;
2522
+ rotate?: number | string;
2523
+ rx?: number | string;
2524
+ ry?: number | string;
2525
+ scale?: number | string;
2526
+ seed?: number | string;
2527
+ shapeRendering?: number | string;
2528
+ slope?: number | string;
2529
+ spacing?: number | string;
2530
+ specularConstant?: number | string;
2531
+ specularExponent?: number | string;
2532
+ speed?: number | string;
2533
+ spreadMethod?: string;
2534
+ startOffset?: number | string;
2535
+ stdDeviation?: number | string;
2536
+ stemh?: number | string;
2537
+ stemv?: number | string;
2538
+ stitchTiles?: number | string;
2539
+ stopColor?: string;
2540
+ stopOpacity?: number | string;
2541
+ strikethroughPosition?: number | string;
2542
+ strikethroughThickness?: number | string;
2543
+ string?: number | string;
2544
+ stroke?: string;
2545
+ strokeDasharray?: string | number;
2546
+ strokeDashoffset?: string | number;
2547
+ strokeLinecap?: "butt" | "round" | "square" | "inherit";
2548
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit";
2549
+ strokeMiterlimit?: number | string;
2550
+ strokeOpacity?: number | string;
2551
+ strokeWidth?: number | string;
2552
+ surfaceScale?: number | string;
2553
+ systemLanguage?: number | string;
2554
+ tableValues?: number | string;
2555
+ targetX?: number | string;
2556
+ targetY?: number | string;
2557
+ textAnchor?: string;
2558
+ textDecoration?: number | string;
2559
+ textLength?: number | string;
2560
+ textRendering?: number | string;
2561
+ to?: number | string;
2562
+ transform?: string;
2563
+ u1?: number | string;
2564
+ u2?: number | string;
2565
+ underlinePosition?: number | string;
2566
+ underlineThickness?: number | string;
2567
+ unicode?: number | string;
2568
+ unicodeBidi?: number | string;
2569
+ unicodeRange?: number | string;
2570
+ unitsPerEm?: number | string;
2571
+ vAlphabetic?: number | string;
2572
+ values?: string;
2573
+ vectorEffect?: number | string;
2574
+ version?: string;
2575
+ vertAdvY?: number | string;
2576
+ vertOriginX?: number | string;
2577
+ vertOriginY?: number | string;
2578
+ vHanging?: number | string;
2579
+ vIdeographic?: number | string;
2580
+ viewBox?: string;
2581
+ viewTarget?: number | string;
2582
+ visibility?: number | string;
2583
+ vMathematical?: number | string;
2584
+ widths?: number | string;
2585
+ wordSpacing?: number | string;
2586
+ writingMode?: number | string;
2587
+ x1?: number | string;
2588
+ x2?: number | string;
2589
+ x?: number | string;
2590
+ xChannelSelector?: string;
2591
+ xHeight?: number | string;
2592
+ xlinkActuate?: string;
2593
+ xlinkArcrole?: string;
2594
+ xlinkHref?: string;
2595
+ xlinkRole?: string;
2596
+ xlinkShow?: string;
2597
+ xlinkTitle?: string;
2598
+ xlinkType?: string;
2599
+ xmlBase?: string;
2600
+ xmlLang?: string;
2601
+ xmlns?: string;
2602
+ xmlnsXlink?: string;
2603
+ xmlSpace?: string;
2604
+ y1?: number | string;
2605
+ y2?: number | string;
2606
+ y?: number | string;
2607
+ yChannelSelector?: string;
2608
+ z?: number | string;
2609
+ zoomAndPan?: string;
2610
+ }
2611
+
2612
+ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
2613
+ allowFullScreen?: boolean;
2614
+ allowpopups?: boolean;
2615
+ autoFocus?: boolean;
2616
+ autosize?: boolean;
2617
+ blinkfeatures?: string;
2618
+ disableblinkfeatures?: string;
2619
+ disableguestresize?: boolean;
2620
+ disablewebsecurity?: boolean;
2621
+ guestinstance?: string;
2622
+ httpreferrer?: string;
2623
+ nodeintegration?: boolean;
2624
+ partition?: string;
2625
+ plugins?: boolean;
2626
+ preload?: string;
2627
+ src?: string;
2628
+ useragent?: string;
2629
+ webpreferences?: string;
2630
+ }
2631
+
2632
+ //
2633
+ // React.DOM
2634
+ // ----------------------------------------------------------------------
2635
+
2636
+ interface ReactHTML {
2637
+ a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
2638
+ abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2639
+ address: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2640
+ area: DetailedHTMLFactory<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
2641
+ article: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2642
+ aside: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2643
+ audio: DetailedHTMLFactory<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
2644
+ b: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2645
+ base: DetailedHTMLFactory<BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
2646
+ bdi: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2647
+ bdo: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2648
+ big: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2649
+ blockquote: DetailedHTMLFactory<BlockquoteHTMLAttributes<HTMLElement>, HTMLElement>;
2650
+ body: DetailedHTMLFactory<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
2651
+ br: DetailedHTMLFactory<HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
2652
+ button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
2653
+ canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
2654
+ caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2655
+ cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2656
+ code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2657
+ col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2658
+ colgroup: DetailedHTMLFactory<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2659
+ data: DetailedHTMLFactory<DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
2660
+ datalist: DetailedHTMLFactory<HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
2661
+ dd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2662
+ del: DetailedHTMLFactory<DelHTMLAttributes<HTMLElement>, HTMLElement>;
2663
+ details: DetailedHTMLFactory<DetailsHTMLAttributes<HTMLElement>, HTMLElement>;
2664
+ dfn: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2665
+ dialog: DetailedHTMLFactory<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
2666
+ div: DetailedHTMLFactory<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
2667
+ dl: DetailedHTMLFactory<HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
2668
+ dt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2669
+ em: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2670
+ embed: DetailedHTMLFactory<EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
2671
+ fieldset: DetailedHTMLFactory<FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
2672
+ figcaption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2673
+ figure: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2674
+ footer: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2675
+ form: DetailedHTMLFactory<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
2676
+ h1: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2677
+ h2: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2678
+ h3: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2679
+ h4: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2680
+ h5: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2681
+ h6: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2682
+ head: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLHeadElement>;
2683
+ header: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2684
+ hgroup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2685
+ hr: DetailedHTMLFactory<HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
2686
+ html: DetailedHTMLFactory<HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
2687
+ i: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2688
+ iframe: DetailedHTMLFactory<IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
2689
+ img: DetailedHTMLFactory<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
2690
+ input: DetailedHTMLFactory<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2691
+ ins: DetailedHTMLFactory<InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
2692
+ kbd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2693
+ keygen: DetailedHTMLFactory<KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
2694
+ label: DetailedHTMLFactory<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
2695
+ legend: DetailedHTMLFactory<HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
2696
+ li: DetailedHTMLFactory<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
2697
+ link: DetailedHTMLFactory<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
2698
+ main: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2699
+ map: DetailedHTMLFactory<MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
2700
+ mark: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2701
+ menu: DetailedHTMLFactory<MenuHTMLAttributes<HTMLElement>, HTMLElement>;
2702
+ menuitem: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2703
+ meta: DetailedHTMLFactory<MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
2704
+ meter: DetailedHTMLFactory<MeterHTMLAttributes<HTMLElement>, HTMLElement>;
2705
+ nav: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2706
+ noscript: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2707
+ object: DetailedHTMLFactory<ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
2708
+ ol: DetailedHTMLFactory<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
2709
+ optgroup: DetailedHTMLFactory<OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
2710
+ option: DetailedHTMLFactory<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
2711
+ output: DetailedHTMLFactory<OutputHTMLAttributes<HTMLElement>, HTMLElement>;
2712
+ p: DetailedHTMLFactory<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
2713
+ param: DetailedHTMLFactory<ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
2714
+ picture: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2715
+ pre: DetailedHTMLFactory<HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
2716
+ progress: DetailedHTMLFactory<ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
2717
+ q: DetailedHTMLFactory<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
2718
+ rp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2719
+ rt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2720
+ ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2721
+ s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2722
+ samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2723
+ slot: DetailedHTMLFactory<SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
2724
+ script: DetailedHTMLFactory<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
2725
+ section: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2726
+ select: DetailedHTMLFactory<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
2727
+ small: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2728
+ source: DetailedHTMLFactory<SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
2729
+ span: DetailedHTMLFactory<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
2730
+ strong: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2731
+ style: DetailedHTMLFactory<StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
2732
+ sub: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2733
+ summary: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2734
+ sup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2735
+ table: DetailedHTMLFactory<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
2736
+ template: DetailedHTMLFactory<HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
2737
+ tbody: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2738
+ td: DetailedHTMLFactory<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
2739
+ textarea: DetailedHTMLFactory<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
2740
+ tfoot: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2741
+ th: DetailedHTMLFactory<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
2742
+ thead: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2743
+ time: DetailedHTMLFactory<TimeHTMLAttributes<HTMLElement>, HTMLElement>;
2744
+ title: DetailedHTMLFactory<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
2745
+ tr: DetailedHTMLFactory<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
2746
+ track: DetailedHTMLFactory<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
2747
+ u: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2748
+ ul: DetailedHTMLFactory<HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
2749
+ "var": DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2750
+ video: DetailedHTMLFactory<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
2751
+ wbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2752
+ webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
2753
+ }
2754
+
2755
+ interface ReactSVG {
2756
+ animate: SVGFactory;
2757
+ circle: SVGFactory;
2758
+ clipPath: SVGFactory;
2759
+ defs: SVGFactory;
2760
+ desc: SVGFactory;
2761
+ ellipse: SVGFactory;
2762
+ feBlend: SVGFactory;
2763
+ feColorMatrix: SVGFactory;
2764
+ feComponentTransfer: SVGFactory;
2765
+ feComposite: SVGFactory;
2766
+ feConvolveMatrix: SVGFactory;
2767
+ feDiffuseLighting: SVGFactory;
2768
+ feDisplacementMap: SVGFactory;
2769
+ feDistantLight: SVGFactory;
2770
+ feDropShadow: SVGFactory;
2771
+ feFlood: SVGFactory;
2772
+ feFuncA: SVGFactory;
2773
+ feFuncB: SVGFactory;
2774
+ feFuncG: SVGFactory;
2775
+ feFuncR: SVGFactory;
2776
+ feGaussianBlur: SVGFactory;
2777
+ feImage: SVGFactory;
2778
+ feMerge: SVGFactory;
2779
+ feMergeNode: SVGFactory;
2780
+ feMorphology: SVGFactory;
2781
+ feOffset: SVGFactory;
2782
+ fePointLight: SVGFactory;
2783
+ feSpecularLighting: SVGFactory;
2784
+ feSpotLight: SVGFactory;
2785
+ feTile: SVGFactory;
2786
+ feTurbulence: SVGFactory;
2787
+ filter: SVGFactory;
2788
+ foreignObject: SVGFactory;
2789
+ g: SVGFactory;
2790
+ image: SVGFactory;
2791
+ line: SVGFactory;
2792
+ linearGradient: SVGFactory;
2793
+ marker: SVGFactory;
2794
+ mask: SVGFactory;
2795
+ metadata: SVGFactory;
2796
+ path: SVGFactory;
2797
+ pattern: SVGFactory;
2798
+ polygon: SVGFactory;
2799
+ polyline: SVGFactory;
2800
+ radialGradient: SVGFactory;
2801
+ rect: SVGFactory;
2802
+ stop: SVGFactory;
2803
+ svg: SVGFactory;
2804
+ switch: SVGFactory;
2805
+ symbol: SVGFactory;
2806
+ text: SVGFactory;
2807
+ textPath: SVGFactory;
2808
+ tspan: SVGFactory;
2809
+ use: SVGFactory;
2810
+ view: SVGFactory;
2811
+ }
2812
+
2813
+ interface ReactDOM extends ReactHTML, ReactSVG { }
2814
+
2815
+ //
2816
+ // React.PropTypes
2817
+ // ----------------------------------------------------------------------
2818
+
2819
+ type Validator<T> = PropTypes.Validator<T>;
2820
+
2821
+ type Requireable<T> = PropTypes.Requireable<T>;
2822
+
2823
+ type ValidationMap<T> = PropTypes.ValidationMap<T>;
2824
+
2825
+ type WeakValidationMap<T> = {
2826
+ [K in keyof T]?: null extends T[K]
2827
+ ? Validator<T[K] | null | undefined>
2828
+ : undefined extends T[K]
2829
+ ? Validator<T[K] | null | undefined>
2830
+ : Validator<T[K]>
2831
+ };
2832
+
2833
+ interface ReactPropTypes {
2834
+ any: typeof PropTypes.any;
2835
+ array: typeof PropTypes.array;
2836
+ bool: typeof PropTypes.bool;
2837
+ func: typeof PropTypes.func;
2838
+ number: typeof PropTypes.number;
2839
+ object: typeof PropTypes.object;
2840
+ string: typeof PropTypes.string;
2841
+ node: typeof PropTypes.node;
2842
+ element: typeof PropTypes.element;
2843
+ instanceOf: typeof PropTypes.instanceOf;
2844
+ oneOf: typeof PropTypes.oneOf;
2845
+ oneOfType: typeof PropTypes.oneOfType;
2846
+ arrayOf: typeof PropTypes.arrayOf;
2847
+ objectOf: typeof PropTypes.objectOf;
2848
+ shape: typeof PropTypes.shape;
2849
+ exact: typeof PropTypes.exact;
2850
+ }
2851
+
2852
+ //
2853
+ // React.Children
2854
+ // ----------------------------------------------------------------------
2855
+
2856
+ interface ReactChildren {
2857
+ map<T, C>(children: C | C[], fn: (child: C, index: number) => T):
2858
+ C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
2859
+ forEach<C>(children: C | C[], fn: (child: C, index: number) => void): void;
2860
+ count(children: any): number;
2861
+ only<C>(children: C): C extends any[] ? never : C;
2862
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
2863
+ }
2864
+
2865
+ //
2866
+ // Browser Interfaces
2867
+ // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
2868
+ // ----------------------------------------------------------------------
2869
+
2870
+ interface AbstractView {
2871
+ styleMedia: StyleMedia;
2872
+ document: Document;
2873
+ }
2874
+
2875
+ interface Touch {
2876
+ identifier: number;
2877
+ target: EventTarget;
2878
+ screenX: number;
2879
+ screenY: number;
2880
+ clientX: number;
2881
+ clientY: number;
2882
+ pageX: number;
2883
+ pageY: number;
2884
+ }
2885
+
2886
+ interface TouchList {
2887
+ [index: number]: Touch;
2888
+ length: number;
2889
+ item(index: number): Touch;
2890
+ identifiedTouch(identifier: number): Touch;
2891
+ }
2892
+
2893
+ //
2894
+ // Error Interfaces
2895
+ // ----------------------------------------------------------------------
2896
+ interface ErrorInfo {
2897
+ /**
2898
+ * Captures which component contained the exception, and its ancestors.
2899
+ */
2900
+ componentStack: string;
2901
+ }
2902
+ }
2903
+
2904
+ // naked 'any' type in a conditional type will short circuit and union both the then/else branches
2905
+ // so boolean is only resolved for T = any
2906
+ type IsExactlyAny<T> = boolean extends (T extends never ? true : false) ? true : false;
2907
+
2908
+ type ExactlyAnyPropertyKeys<T> = { [K in keyof T]: IsExactlyAny<T[K]> extends true ? K : never }[keyof T];
2909
+ type NotExactlyAnyPropertyKeys<T> = Exclude<keyof T, ExactlyAnyPropertyKeys<T>>;
2910
+
2911
+ // Try to resolve ill-defined props like for JS users: props can be any, or sometimes objects with properties of type any
2912
+ type MergePropTypes<P, T> =
2913
+ // Distribute over P in case it is a union type
2914
+ P extends any
2915
+ // If props is type any, use propTypes definitions
2916
+ ? IsExactlyAny<P> extends true ? T :
2917
+ // If declared props have indexed properties, ignore inferred props entirely as keyof gets widened
2918
+ string extends keyof P ? P :
2919
+ // Prefer declared types which are not exactly any
2920
+ & Pick<P, NotExactlyAnyPropertyKeys<P>>
2921
+ // For props which are exactly any, use the type inferred from propTypes if present
2922
+ & Pick<T, Exclude<keyof T, NotExactlyAnyPropertyKeys<P>>>
2923
+ // Keep leftover props not specified in propTypes
2924
+ & Pick<P, Exclude<keyof P, keyof T>>
2925
+ : never;
2926
+
2927
+ // Any prop that has a default prop becomes optional, but its type is unchanged
2928
+ // Undeclared default props are augmented into the resulting allowable attributes
2929
+ // If declared props have indexed properties, ignore default props entirely as keyof gets widened
2930
+ // Wrap in an outer-level conditional type to allow distribution over props that are unions
2931
+ type Defaultize<P, D> = P extends any
2932
+ ? string extends keyof P ? P :
2933
+ & Pick<P, Exclude<keyof P, keyof D>>
2934
+ & Partial<Pick<P, Extract<keyof P, keyof D>>>
2935
+ & Partial<Pick<D, Exclude<keyof D, keyof P>>>
2936
+ : never;
2937
+
2938
+ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
2939
+ ? Defaultize<MergePropTypes<P, PropTypes.InferProps<T>>, D>
2940
+ : C extends { propTypes: infer T; }
2941
+ ? MergePropTypes<P, PropTypes.InferProps<T>>
2942
+ : C extends { defaultProps: infer D; }
2943
+ ? Defaultize<P, D>
2944
+ : P;
2945
+
2946
+ declare global {
2947
+ namespace JSX {
2948
+ // tslint:disable-next-line:no-empty-interface
2949
+ interface Element extends React.ReactElement<any, any> { }
2950
+ interface ElementClass extends React.Component<any> {
2951
+ render(): React.ReactNode;
2952
+ }
2953
+ interface ElementAttributesProperty { props: {}; }
2954
+ interface ElementChildrenAttribute { children: {}; }
2955
+
2956
+ // We can't recurse forever because `type` can't be self-referential;
2957
+ // let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa
2958
+ //@ts-ignore
2959
+ type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
2960
+ ? T extends React.MemoExoticComponent<infer U> | React.LazyExoticComponent<infer U>
2961
+ ? ReactManagedAttributes<U, P>
2962
+ : ReactManagedAttributes<T, P>
2963
+ : ReactManagedAttributes<C, P>;
2964
+
2965
+ // tslint:disable-next-line:no-empty-interface
2966
+ interface IntrinsicAttributes extends React.Attributes { }
2967
+ // tslint:disable-next-line:no-empty-interface
2968
+ interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
2969
+
2970
+ interface IntrinsicElements {
2971
+ // HTML
2972
+ a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
2973
+ abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2974
+ address: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2975
+ area: React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
2976
+ article: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2977
+ aside: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2978
+ audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
2979
+ b: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2980
+ base: React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
2981
+ bdi: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2982
+ bdo: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2983
+ big: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2984
+ blockquote: React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLElement>, HTMLElement>;
2985
+ body: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
2986
+ br: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
2987
+ button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
2988
+ canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
2989
+ caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2990
+ cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2991
+ code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2992
+ col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2993
+ colgroup: React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2994
+ data: React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
2995
+ datalist: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
2996
+ dd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2997
+ del: React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLElement>, HTMLElement>;
2998
+ details: React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLElement>, HTMLElement>;
2999
+ dfn: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3000
+ dialog: React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
3001
+ div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3002
+ dl: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
3003
+ dt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3004
+ em: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3005
+ embed: React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
3006
+ fieldset: React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
3007
+ figcaption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3008
+ figure: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3009
+ footer: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3010
+ form: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
3011
+ h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3012
+ h2: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3013
+ h3: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3014
+ h4: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3015
+ h5: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3016
+ h6: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3017
+ head: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>;
3018
+ header: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3019
+ hgroup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3020
+ hr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
3021
+ html: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
3022
+ i: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3023
+ iframe: React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
3024
+ img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
3025
+ input: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3026
+ ins: React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
3027
+ kbd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3028
+ keygen: React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
3029
+ label: React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
3030
+ legend: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
3031
+ li: React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
3032
+ link: React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
3033
+ main: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3034
+ map: React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
3035
+ mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3036
+ menu: React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>;
3037
+ menuitem: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3038
+ meta: React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
3039
+ meter: React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLElement>, HTMLElement>;
3040
+ nav: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3041
+ noindex: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3042
+ noscript: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3043
+ object: React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
3044
+ ol: React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
3045
+ optgroup: React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
3046
+ option: React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
3047
+ output: React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLElement>, HTMLElement>;
3048
+ p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
3049
+ param: React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
3050
+ picture: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3051
+ pre: React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
3052
+ progress: React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
3053
+ q: React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
3054
+ rp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3055
+ rt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3056
+ ruby: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3057
+ s: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3058
+ samp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3059
+ slot: React.DetailedHTMLProps<React.SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
3060
+ script: React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
3061
+ section: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3062
+ select: React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
3063
+ small: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3064
+ source: React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
3065
+ span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
3066
+ strong: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3067
+ style: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
3068
+ sub: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3069
+ summary: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3070
+ sup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3071
+ table: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
3072
+ template: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
3073
+ tbody: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3074
+ td: React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
3075
+ textarea: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
3076
+ tfoot: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3077
+ th: React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
3078
+ thead: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3079
+ time: React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLElement>, HTMLElement>;
3080
+ title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
3081
+ tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
3082
+ track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
3083
+ u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3084
+ ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
3085
+ "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3086
+ video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
3087
+ wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3088
+ webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
3089
+
3090
+ // SVG
3091
+ svg: React.SVGProps<SVGSVGElement>;
3092
+
3093
+ animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.
3094
+ animateMotion: React.SVGProps<SVGElement>;
3095
+ animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.
3096
+ circle: React.SVGProps<SVGCircleElement>;
3097
+ clipPath: React.SVGProps<SVGClipPathElement>;
3098
+ defs: React.SVGProps<SVGDefsElement>;
3099
+ desc: React.SVGProps<SVGDescElement>;
3100
+ ellipse: React.SVGProps<SVGEllipseElement>;
3101
+ feBlend: React.SVGProps<SVGFEBlendElement>;
3102
+ feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;
3103
+ feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;
3104
+ feComposite: React.SVGProps<SVGFECompositeElement>;
3105
+ feConvolveMatrix: React.SVGProps<SVGFEConvolveMatrixElement>;
3106
+ feDiffuseLighting: React.SVGProps<SVGFEDiffuseLightingElement>;
3107
+ feDisplacementMap: React.SVGProps<SVGFEDisplacementMapElement>;
3108
+ feDistantLight: React.SVGProps<SVGFEDistantLightElement>;
3109
+ feDropShadow: React.SVGProps<SVGFEDropShadowElement>;
3110
+ feFlood: React.SVGProps<SVGFEFloodElement>;
3111
+ feFuncA: React.SVGProps<SVGFEFuncAElement>;
3112
+ feFuncB: React.SVGProps<SVGFEFuncBElement>;
3113
+ feFuncG: React.SVGProps<SVGFEFuncGElement>;
3114
+ feFuncR: React.SVGProps<SVGFEFuncRElement>;
3115
+ feGaussianBlur: React.SVGProps<SVGFEGaussianBlurElement>;
3116
+ feImage: React.SVGProps<SVGFEImageElement>;
3117
+ feMerge: React.SVGProps<SVGFEMergeElement>;
3118
+ feMergeNode: React.SVGProps<SVGFEMergeNodeElement>;
3119
+ feMorphology: React.SVGProps<SVGFEMorphologyElement>;
3120
+ feOffset: React.SVGProps<SVGFEOffsetElement>;
3121
+ fePointLight: React.SVGProps<SVGFEPointLightElement>;
3122
+ feSpecularLighting: React.SVGProps<SVGFESpecularLightingElement>;
3123
+ feSpotLight: React.SVGProps<SVGFESpotLightElement>;
3124
+ feTile: React.SVGProps<SVGFETileElement>;
3125
+ feTurbulence: React.SVGProps<SVGFETurbulenceElement>;
3126
+ filter: React.SVGProps<SVGFilterElement>;
3127
+ foreignObject: React.SVGProps<SVGForeignObjectElement>;
3128
+ g: React.SVGProps<SVGGElement>;
3129
+ image: React.SVGProps<SVGImageElement>;
3130
+ line: React.SVGProps<SVGLineElement>;
3131
+ linearGradient: React.SVGProps<SVGLinearGradientElement>;
3132
+ marker: React.SVGProps<SVGMarkerElement>;
3133
+ mask: React.SVGProps<SVGMaskElement>;
3134
+ metadata: React.SVGProps<SVGMetadataElement>;
3135
+ mpath: React.SVGProps<SVGElement>;
3136
+ path: React.SVGProps<SVGPathElement>;
3137
+ pattern: React.SVGProps<SVGPatternElement>;
3138
+ polygon: React.SVGProps<SVGPolygonElement>;
3139
+ polyline: React.SVGProps<SVGPolylineElement>;
3140
+ radialGradient: React.SVGProps<SVGRadialGradientElement>;
3141
+ rect: React.SVGProps<SVGRectElement>;
3142
+ stop: React.SVGProps<SVGStopElement>;
3143
+ switch: React.SVGProps<SVGSwitchElement>;
3144
+ symbol: React.SVGProps<SVGSymbolElement>;
3145
+ text: React.SVGProps<SVGTextElement>;
3146
+ textPath: React.SVGProps<SVGTextPathElement>;
3147
+ tspan: React.SVGProps<SVGTSpanElement>;
3148
+ use: React.SVGProps<SVGUseElement>;
3149
+ view: React.SVGProps<SVGViewElement>;
3150
+ }
3151
+ }
3152
+ }