@types/react 17.0.4 → 17.0.8
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.
- react/README.md +2 -2
- react/experimental.d.ts +3 -3
- react/index.d.ts +77 -6
- react/package.json +7 -2
react/README.md
CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for React (http://facebook.github.io/reac
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Wed, 26 May 2021 00:31:36 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
|
13
13
|
* Global values: `React`
|
14
14
|
|
15
15
|
# Credits
|
16
|
-
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Digiguru](https://github.com/digiguru), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag),
|
16
|
+
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Digiguru](https://github.com/digiguru), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Dale Tan](https://github.com/hellatan), and [Priyanshu Rav](https://github.com/priyanshurav).
|
react/experimental.d.ts
CHANGED
@@ -142,8 +142,8 @@ declare module '.' {
|
|
142
142
|
*
|
143
143
|
* The `useTransition` hook returns two values in an array.
|
144
144
|
*
|
145
|
-
* The first is
|
146
|
-
* The seconda
|
145
|
+
* The first is boolean, React’s way of informing us whether we’re waiting for the transition to finish.
|
146
|
+
* The seconda is a function that takes a callback. We can use it to tell React which state we want to defer.
|
147
147
|
*
|
148
148
|
* **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
|
149
149
|
*
|
@@ -151,7 +151,7 @@ declare module '.' {
|
|
151
151
|
*
|
152
152
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition
|
153
153
|
*/
|
154
|
-
export function unstable_useTransition(): [
|
154
|
+
export function unstable_useTransition(): [boolean, TransitionStartFunction];
|
155
155
|
|
156
156
|
const opaqueIdentifierBranding: unique symbol;
|
157
157
|
/**
|
react/index.d.ts
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
// JongChan Choi <https://github.com/disjukr>
|
27
27
|
// Victor Magalhães <https://github.com/vhfmag>
|
28
28
|
// Dale Tan <https://github.com/hellatan>
|
29
|
+
// Priyanshu Rav <https://github.com/priyanshurav>
|
29
30
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
30
31
|
// TypeScript Version: 2.8
|
31
32
|
|
@@ -399,7 +400,7 @@ declare namespace React {
|
|
399
400
|
const version: string;
|
400
401
|
|
401
402
|
/**
|
402
|
-
* {@link https://
|
403
|
+
* {@link https://reactjs.org/docs/profiler.html#onrender-callback Profiler API}
|
403
404
|
*/
|
404
405
|
type ProfilerOnRenderCallback = (
|
405
406
|
id: string,
|
@@ -1018,7 +1019,6 @@ declare namespace React {
|
|
1018
1019
|
* @version 16.8.0
|
1019
1020
|
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
1020
1021
|
*/
|
1021
|
-
// TODO (TypeScript 3.0): <T extends unknown>
|
1022
1022
|
function useRef<T>(initialValue: T): MutableRefObject<T>;
|
1023
1023
|
// convenience overload for refs given as a ref prop as they typically start with a null value
|
1024
1024
|
/**
|
@@ -1034,7 +1034,6 @@ declare namespace React {
|
|
1034
1034
|
* @version 16.8.0
|
1035
1035
|
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
1036
1036
|
*/
|
1037
|
-
// TODO (TypeScript 3.0): <T extends unknown>
|
1038
1037
|
function useRef<T>(initialValue: T|null): RefObject<T>;
|
1039
1038
|
// convenience overload for potentially undefined initialValue / call with 0 arguments
|
1040
1039
|
// has a default to stop it from defaulting to {} instead
|
@@ -1048,7 +1047,6 @@ declare namespace React {
|
|
1048
1047
|
* @version 16.8.0
|
1049
1048
|
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
1050
1049
|
*/
|
1051
|
-
// TODO (TypeScript 3.0): <T extends unknown>
|
1052
1050
|
function useRef<T = undefined>(): MutableRefObject<T | undefined>;
|
1053
1051
|
/**
|
1054
1052
|
* The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
|
@@ -1737,6 +1735,79 @@ declare namespace React {
|
|
1737
1735
|
'aria-valuetext'?: string;
|
1738
1736
|
}
|
1739
1737
|
|
1738
|
+
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
|
1739
|
+
type AriaRole =
|
1740
|
+
| 'alert'
|
1741
|
+
| 'alertdialog'
|
1742
|
+
| 'application'
|
1743
|
+
| 'article'
|
1744
|
+
| 'banner'
|
1745
|
+
| 'button'
|
1746
|
+
| 'cell'
|
1747
|
+
| 'checkbox'
|
1748
|
+
| 'columnheader'
|
1749
|
+
| 'combobox'
|
1750
|
+
| 'complementary'
|
1751
|
+
| 'contentinfo'
|
1752
|
+
| 'definition'
|
1753
|
+
| 'dialog'
|
1754
|
+
| 'directory'
|
1755
|
+
| 'document'
|
1756
|
+
| 'feed'
|
1757
|
+
| 'figure'
|
1758
|
+
| 'form'
|
1759
|
+
| 'grid'
|
1760
|
+
| 'gridcell'
|
1761
|
+
| 'group'
|
1762
|
+
| 'heading'
|
1763
|
+
| 'img'
|
1764
|
+
| 'link'
|
1765
|
+
| 'list'
|
1766
|
+
| 'listbox'
|
1767
|
+
| 'listitem'
|
1768
|
+
| 'log'
|
1769
|
+
| 'main'
|
1770
|
+
| 'marquee'
|
1771
|
+
| 'math'
|
1772
|
+
| 'menu'
|
1773
|
+
| 'menubar'
|
1774
|
+
| 'menuitem'
|
1775
|
+
| 'menuitemcheckbox'
|
1776
|
+
| 'menuitemradio'
|
1777
|
+
| 'navigation'
|
1778
|
+
| 'none'
|
1779
|
+
| 'note'
|
1780
|
+
| 'option'
|
1781
|
+
| 'presentation'
|
1782
|
+
| 'progressbar'
|
1783
|
+
| 'radio'
|
1784
|
+
| 'radiogroup'
|
1785
|
+
| 'region'
|
1786
|
+
| 'row'
|
1787
|
+
| 'rowgroup'
|
1788
|
+
| 'rowheader'
|
1789
|
+
| 'scrollbar'
|
1790
|
+
| 'search'
|
1791
|
+
| 'searchbox'
|
1792
|
+
| 'separator'
|
1793
|
+
| 'slider'
|
1794
|
+
| 'spinbutton'
|
1795
|
+
| 'status'
|
1796
|
+
| 'switch'
|
1797
|
+
| 'tab'
|
1798
|
+
| 'table'
|
1799
|
+
| 'tablist'
|
1800
|
+
| 'tabpanel'
|
1801
|
+
| 'term'
|
1802
|
+
| 'textbox'
|
1803
|
+
| 'timer'
|
1804
|
+
| 'toolbar'
|
1805
|
+
| 'tooltip'
|
1806
|
+
| 'tree'
|
1807
|
+
| 'treegrid'
|
1808
|
+
| 'treeitem'
|
1809
|
+
| (string & {});
|
1810
|
+
|
1740
1811
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
1741
1812
|
// React-specific Attributes
|
1742
1813
|
defaultChecked?: boolean;
|
@@ -1766,7 +1837,7 @@ declare namespace React {
|
|
1766
1837
|
radioGroup?: string; // <command>, <menuitem>
|
1767
1838
|
|
1768
1839
|
// WAI-ARIA
|
1769
|
-
role?:
|
1840
|
+
role?: AriaRole;
|
1770
1841
|
|
1771
1842
|
// RDFa Attributes
|
1772
1843
|
about?: string;
|
@@ -2379,7 +2450,7 @@ declare namespace React {
|
|
2379
2450
|
width?: number | string;
|
2380
2451
|
|
2381
2452
|
// Other HTML properties supported by SVG elements in browsers
|
2382
|
-
role?:
|
2453
|
+
role?: AriaRole;
|
2383
2454
|
tabIndex?: number;
|
2384
2455
|
crossOrigin?: "anonymous" | "use-credentials" | "";
|
2385
2456
|
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.8",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -130,6 +130,11 @@
|
|
130
130
|
"name": "Dale Tan",
|
131
131
|
"url": "https://github.com/hellatan",
|
132
132
|
"githubUsername": "hellatan"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"name": "Priyanshu Rav",
|
136
|
+
"url": "https://github.com/priyanshurav",
|
137
|
+
"githubUsername": "priyanshurav"
|
133
138
|
}
|
134
139
|
],
|
135
140
|
"main": "",
|
@@ -145,6 +150,6 @@
|
|
145
150
|
"@types/scheduler": "*",
|
146
151
|
"csstype": "^3.0.2"
|
147
152
|
},
|
148
|
-
"typesPublisherContentHash": "
|
153
|
+
"typesPublisherContentHash": "f78a9c242ef5a7f26dc323a60aa18505b8e2c2b745817400473a32fa8ffac6c3",
|
149
154
|
"typeScriptVersion": "3.5"
|
150
155
|
}
|