@types/react 17.0.3 → 17.0.7
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/LICENSE +0 -0
- react/README.md +2 -2
- react/experimental.d.ts +3 -14
- react/global.d.ts +0 -0
- react/index.d.ts +77 -3
- react/jsx-dev-runtime.d.ts +0 -0
- react/jsx-runtime.d.ts +0 -0
- react/package.json +7 -2
react/LICENSE
CHANGED
File without changes
|
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: Tue, 25 May 2021 12:31:21 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
@@ -106,17 +106,6 @@ declare module '.' {
|
|
106
106
|
*/
|
107
107
|
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
108
108
|
|
109
|
-
export interface SuspenseConfig {
|
110
|
-
busyDelayMs?: number;
|
111
|
-
busyMinDurationMs?: number;
|
112
|
-
}
|
113
|
-
|
114
|
-
// undocumented, considered for removal
|
115
|
-
export function unstable_withSuspenseConfig(
|
116
|
-
scope: () => VoidOrUndefinedOnly,
|
117
|
-
config: SuspenseConfig | null | undefined,
|
118
|
-
): void;
|
119
|
-
|
120
109
|
// must be synchronous
|
121
110
|
export type TransitionFunction = () => VoidOrUndefinedOnly;
|
122
111
|
// strange definition to allow vscode to show documentation on the invocation
|
@@ -153,8 +142,8 @@ declare module '.' {
|
|
153
142
|
*
|
154
143
|
* The `useTransition` hook returns two values in an array.
|
155
144
|
*
|
156
|
-
* The first is
|
157
|
-
* 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.
|
158
147
|
*
|
159
148
|
* **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
|
160
149
|
*
|
@@ -162,7 +151,7 @@ declare module '.' {
|
|
162
151
|
*
|
163
152
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition
|
164
153
|
*/
|
165
|
-
export function unstable_useTransition(
|
154
|
+
export function unstable_useTransition(): [boolean, TransitionStartFunction];
|
166
155
|
|
167
156
|
const opaqueIdentifierBranding: unique symbol;
|
168
157
|
/**
|
react/global.d.ts
CHANGED
File without changes
|
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,
|
@@ -1737,6 +1738,79 @@ declare namespace React {
|
|
1737
1738
|
'aria-valuetext'?: string;
|
1738
1739
|
}
|
1739
1740
|
|
1741
|
+
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
|
1742
|
+
type AriaRole =
|
1743
|
+
| 'alert'
|
1744
|
+
| 'alertdialog'
|
1745
|
+
| 'application'
|
1746
|
+
| 'article'
|
1747
|
+
| 'banner'
|
1748
|
+
| 'button'
|
1749
|
+
| 'cell'
|
1750
|
+
| 'checkbox'
|
1751
|
+
| 'columnheader'
|
1752
|
+
| 'combobox'
|
1753
|
+
| 'complementary'
|
1754
|
+
| 'contentinfo'
|
1755
|
+
| 'definition'
|
1756
|
+
| 'dialog'
|
1757
|
+
| 'directory'
|
1758
|
+
| 'document'
|
1759
|
+
| 'feed'
|
1760
|
+
| 'figure'
|
1761
|
+
| 'form'
|
1762
|
+
| 'grid'
|
1763
|
+
| 'gridcell'
|
1764
|
+
| 'group'
|
1765
|
+
| 'heading'
|
1766
|
+
| 'img'
|
1767
|
+
| 'link'
|
1768
|
+
| 'list'
|
1769
|
+
| 'listbox'
|
1770
|
+
| 'listitem'
|
1771
|
+
| 'log'
|
1772
|
+
| 'main'
|
1773
|
+
| 'marquee'
|
1774
|
+
| 'math'
|
1775
|
+
| 'menu'
|
1776
|
+
| 'menubar'
|
1777
|
+
| 'menuitem'
|
1778
|
+
| 'menuitemcheckbox'
|
1779
|
+
| 'menuitemradio'
|
1780
|
+
| 'navigation'
|
1781
|
+
| 'none'
|
1782
|
+
| 'note'
|
1783
|
+
| 'option'
|
1784
|
+
| 'presentation'
|
1785
|
+
| 'progressbar'
|
1786
|
+
| 'radio'
|
1787
|
+
| 'radiogroup'
|
1788
|
+
| 'region'
|
1789
|
+
| 'row'
|
1790
|
+
| 'rowgroup'
|
1791
|
+
| 'rowheader'
|
1792
|
+
| 'scrollbar'
|
1793
|
+
| 'search'
|
1794
|
+
| 'searchbox'
|
1795
|
+
| 'separator'
|
1796
|
+
| 'slider'
|
1797
|
+
| 'spinbutton'
|
1798
|
+
| 'status'
|
1799
|
+
| 'switch'
|
1800
|
+
| 'tab'
|
1801
|
+
| 'table'
|
1802
|
+
| 'tablist'
|
1803
|
+
| 'tabpanel'
|
1804
|
+
| 'term'
|
1805
|
+
| 'textbox'
|
1806
|
+
| 'timer'
|
1807
|
+
| 'toolbar'
|
1808
|
+
| 'tooltip'
|
1809
|
+
| 'tree'
|
1810
|
+
| 'treegrid'
|
1811
|
+
| 'treeitem'
|
1812
|
+
| (string & {});
|
1813
|
+
|
1740
1814
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
1741
1815
|
// React-specific Attributes
|
1742
1816
|
defaultChecked?: boolean;
|
@@ -1766,7 +1840,7 @@ declare namespace React {
|
|
1766
1840
|
radioGroup?: string; // <command>, <menuitem>
|
1767
1841
|
|
1768
1842
|
// WAI-ARIA
|
1769
|
-
role?:
|
1843
|
+
role?: AriaRole;
|
1770
1844
|
|
1771
1845
|
// RDFa Attributes
|
1772
1846
|
about?: string;
|
@@ -2379,7 +2453,7 @@ declare namespace React {
|
|
2379
2453
|
width?: number | string;
|
2380
2454
|
|
2381
2455
|
// Other HTML properties supported by SVG elements in browsers
|
2382
|
-
role?:
|
2456
|
+
role?: AriaRole;
|
2383
2457
|
tabIndex?: number;
|
2384
2458
|
crossOrigin?: "anonymous" | "use-credentials" | "";
|
2385
2459
|
|
react/jsx-dev-runtime.d.ts
CHANGED
File without changes
|
react/jsx-runtime.d.ts
CHANGED
File without changes
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.7",
|
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": "53fa0ca6f95f43ca1d6bb65289b682d451af9b827f566f06b37ba765cd69cd50",
|
149
154
|
"typeScriptVersion": "3.5"
|
150
155
|
}
|