@types/react 17.0.5 → 17.0.9
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 +6 -6
- react/index.d.ts +76 -5
- react/package.json +9 -3
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, 02 Jun 2021 02:01:32 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
@@ -104,7 +104,7 @@ declare module '.' {
|
|
104
104
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
105
105
|
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
106
106
|
*/
|
107
|
-
export const
|
107
|
+
export const SuspenseList: ExoticComponent<SuspenseListProps>;
|
108
108
|
|
109
109
|
// must be synchronous
|
110
110
|
export type TransitionFunction = () => VoidOrUndefinedOnly;
|
@@ -132,7 +132,7 @@ declare module '.' {
|
|
132
132
|
*
|
133
133
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usedeferredvalue
|
134
134
|
*/
|
135
|
-
export function
|
135
|
+
export function useDeferredValue<T>(value: T): T;
|
136
136
|
|
137
137
|
/**
|
138
138
|
* Allows components to avoid undesirable loading states by waiting for content to load
|
@@ -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
|
154
|
+
export function useTransition(): [boolean, TransitionStartFunction];
|
155
155
|
|
156
156
|
const opaqueIdentifierBranding: unique symbol;
|
157
157
|
/**
|
@@ -177,5 +177,5 @@ declare module '.' {
|
|
177
177
|
*
|
178
178
|
* @param callback A _synchronous_ function which causes state updates that can be deferred.
|
179
179
|
*/
|
180
|
-
export function
|
180
|
+
export function startTransition(scope: TransitionFunction): void;
|
181
181
|
}
|
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
|
|
@@ -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,7 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.9",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
5
6
|
"license": "MIT",
|
6
7
|
"contributors": [
|
7
8
|
{
|
@@ -130,6 +131,11 @@
|
|
130
131
|
"name": "Dale Tan",
|
131
132
|
"url": "https://github.com/hellatan",
|
132
133
|
"githubUsername": "hellatan"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"name": "Priyanshu Rav",
|
137
|
+
"url": "https://github.com/priyanshurav",
|
138
|
+
"githubUsername": "priyanshurav"
|
133
139
|
}
|
134
140
|
],
|
135
141
|
"main": "",
|
@@ -145,6 +151,6 @@
|
|
145
151
|
"@types/scheduler": "*",
|
146
152
|
"csstype": "^3.0.2"
|
147
153
|
},
|
148
|
-
"typesPublisherContentHash": "
|
149
|
-
"typeScriptVersion": "3.
|
154
|
+
"typesPublisherContentHash": "038ae5d73fcd277965868acc0a792295891497f18063a518274a7dd89d756c2d",
|
155
|
+
"typeScriptVersion": "3.6"
|
150
156
|
}
|