@types/react 15.7.22 → 15.7.23
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 v15.7/LICENSE +0 -0
- react v15.7/README.md +1 -1
- react v15.7/index.d.ts +219 -109
- react v15.7/jsx-dev-runtime.d.ts +1 -1
- react v15.7/jsx-runtime.d.ts +1 -1
- react v15.7/package.json +3 -3
react v15.7/LICENSE
CHANGED
File without changes
|
react v15.7/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (https://react.dev/).
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react/v15.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Tue,
|
11
|
+
* Last updated: Tue, 26 Sep 2023 14:05:46 GMT
|
12
12
|
* Dependencies: none
|
13
13
|
* Global values: `React`
|
14
14
|
|
react v15.7/index.d.ts
CHANGED
@@ -62,7 +62,7 @@ type NativeTouchEvent = TouchEvent;
|
|
62
62
|
type NativeTransitionEvent = TransitionEvent;
|
63
63
|
type NativeUIEvent = UIEvent;
|
64
64
|
type NativeWheelEvent = WheelEvent;
|
65
|
-
type CrossOrigin =
|
65
|
+
type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined;
|
66
66
|
|
67
67
|
// eslint-disable-next-line @definitelytyped/export-just-namespace
|
68
68
|
export = React;
|
@@ -118,7 +118,7 @@ declare namespace React {
|
|
118
118
|
}
|
119
119
|
|
120
120
|
// ReactHTML for ReactHTMLElement
|
121
|
-
interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> {
|
121
|
+
interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> {}
|
122
122
|
|
123
123
|
interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> {
|
124
124
|
type: keyof ReactHTML;
|
@@ -156,14 +156,18 @@ declare namespace React {
|
|
156
156
|
|
157
157
|
type SFCFactory<P> = (props?: Attributes & P, ...children: ReactNode[]) => SFCElement<P>;
|
158
158
|
|
159
|
-
type ComponentFactory<P, T extends Component<P, ComponentState>> =
|
160
|
-
|
159
|
+
type ComponentFactory<P, T extends Component<P, ComponentState>> = (
|
160
|
+
props?: ClassAttributes<T> & P,
|
161
|
+
...children: ReactNode[]
|
162
|
+
) => CElement<P, T>;
|
161
163
|
|
162
164
|
type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
|
163
165
|
type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
|
164
166
|
|
165
|
-
type DOMFactory<P extends DOMAttributes<T>, T extends Element> =
|
166
|
-
|
167
|
+
type DOMFactory<P extends DOMAttributes<T>, T extends Element> = (
|
168
|
+
props?: ClassAttributes<T> & P | null,
|
169
|
+
...children: ReactNode[]
|
170
|
+
) => DOMElement<P, T>;
|
167
171
|
|
168
172
|
interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
|
169
173
|
|
@@ -172,7 +176,10 @@ declare namespace React {
|
|
172
176
|
}
|
173
177
|
|
174
178
|
interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
|
175
|
-
(
|
179
|
+
(
|
180
|
+
props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null,
|
181
|
+
...children: ReactNode[]
|
182
|
+
): ReactSVGElement;
|
176
183
|
}
|
177
184
|
|
178
185
|
//
|
@@ -195,93 +202,113 @@ declare namespace React {
|
|
195
202
|
|
196
203
|
// DOM Elements
|
197
204
|
function createFactory<T extends HTMLElement>(
|
198
|
-
type: keyof ReactHTML
|
205
|
+
type: keyof ReactHTML,
|
206
|
+
): HTMLFactory<T>;
|
199
207
|
function createFactory(
|
200
|
-
type: keyof ReactSVG
|
208
|
+
type: keyof ReactSVG,
|
209
|
+
): SVGFactory;
|
201
210
|
function createFactory<P extends DOMAttributes<T>, T extends Element>(
|
202
|
-
type: string
|
211
|
+
type: string,
|
212
|
+
): DOMFactory<P, T>;
|
203
213
|
|
204
214
|
// Custom components
|
205
215
|
function createFactory<P>(type: SFC<P>): SFCFactory<P>;
|
206
216
|
function createFactory<P>(
|
207
|
-
type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P
|
217
|
+
type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
|
218
|
+
): CFactory<P, ClassicComponent<P, ComponentState>>;
|
208
219
|
function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
|
209
|
-
type: ClassType<P, T, C
|
220
|
+
type: ClassType<P, T, C>,
|
221
|
+
): CFactory<P, T>;
|
210
222
|
function createFactory<P>(type: ComponentClass<P>): Factory<P>;
|
211
223
|
|
212
224
|
// DOM Elements
|
213
225
|
// TODO: generalize this to everything in `keyof ReactHTML`, not just "input"
|
214
226
|
function createElement(
|
215
|
-
|
216
|
-
|
217
|
-
|
227
|
+
type: "input",
|
228
|
+
props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>,
|
229
|
+
...children: ReactNode[]
|
230
|
+
): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
218
231
|
|
219
232
|
function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
|
220
233
|
type: keyof ReactHTML,
|
221
234
|
props?: ClassAttributes<T> & P,
|
222
|
-
...children: ReactNode[]
|
235
|
+
...children: ReactNode[]
|
236
|
+
): DetailedReactHTMLElement<P, T>;
|
223
237
|
function createElement<P extends SVGAttributes<T>, T extends SVGElement>(
|
224
238
|
type: keyof ReactSVG,
|
225
239
|
props?: ClassAttributes<T> & P,
|
226
|
-
...children: ReactNode[]
|
240
|
+
...children: ReactNode[]
|
241
|
+
): ReactSVGElement;
|
227
242
|
function createElement<P extends DOMAttributes<T>, T extends Element>(
|
228
243
|
type: string,
|
229
244
|
props?: ClassAttributes<T> & P,
|
230
|
-
...children: ReactNode[]
|
245
|
+
...children: ReactNode[]
|
246
|
+
): DOMElement<P, T>;
|
231
247
|
|
232
248
|
// Custom components
|
233
249
|
function createElement<P>(
|
234
250
|
type: SFC<P>,
|
235
251
|
props?: Attributes & P,
|
236
|
-
...children: ReactNode[]
|
252
|
+
...children: ReactNode[]
|
253
|
+
): SFCElement<P>;
|
237
254
|
function createElement<P>(
|
238
255
|
type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
|
239
256
|
props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P,
|
240
|
-
...children: ReactNode[]
|
257
|
+
...children: ReactNode[]
|
258
|
+
): CElement<P, ClassicComponent<P, ComponentState>>;
|
241
259
|
function createElement<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
|
242
260
|
type: ClassType<P, T, C>,
|
243
261
|
props?: ClassAttributes<T> & P,
|
244
|
-
...children: ReactNode[]
|
262
|
+
...children: ReactNode[]
|
263
|
+
): CElement<P, T>;
|
245
264
|
function createElement<P>(
|
246
265
|
type: SFC<P> | ComponentClass<P> | string,
|
247
266
|
props?: Attributes & P,
|
248
|
-
...children: ReactNode[]
|
267
|
+
...children: ReactNode[]
|
268
|
+
): ReactElement<P>;
|
249
269
|
|
250
270
|
// DOM Elements
|
251
271
|
// ReactHTMLElement
|
252
272
|
function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
|
253
273
|
element: DetailedReactHTMLElement<P, T>,
|
254
274
|
props?: P,
|
255
|
-
...children: ReactNode[]
|
275
|
+
...children: ReactNode[]
|
276
|
+
): DetailedReactHTMLElement<P, T>;
|
256
277
|
// ReactHTMLElement, less specific
|
257
278
|
function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
|
258
279
|
element: ReactHTMLElement<T>,
|
259
280
|
props?: P,
|
260
|
-
...children: ReactNode[]
|
281
|
+
...children: ReactNode[]
|
282
|
+
): ReactHTMLElement<T>;
|
261
283
|
// SVGElement
|
262
284
|
function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>(
|
263
285
|
element: ReactSVGElement,
|
264
286
|
props?: P,
|
265
|
-
...children: ReactNode[]
|
287
|
+
...children: ReactNode[]
|
288
|
+
): ReactSVGElement;
|
266
289
|
// DOM Element (has to be the last, because type checking stops at first overload that fits)
|
267
290
|
function cloneElement<P extends DOMAttributes<T>, T extends Element>(
|
268
291
|
element: DOMElement<P, T>,
|
269
292
|
props?: DOMAttributes<T> & P,
|
270
|
-
...children: ReactNode[]
|
293
|
+
...children: ReactNode[]
|
294
|
+
): DOMElement<P, T>;
|
271
295
|
|
272
296
|
// Custom components
|
273
297
|
function cloneElement<P extends Q, Q>(
|
274
298
|
element: SFCElement<P>,
|
275
299
|
props?: Q, // should be Q & Attributes, but then Q is inferred as {}
|
276
|
-
...children: ReactNode[]
|
300
|
+
...children: ReactNode[]
|
301
|
+
): SFCElement<P>;
|
277
302
|
function cloneElement<P extends Q, Q, T extends Component<P, ComponentState>>(
|
278
303
|
element: CElement<P, T>,
|
279
304
|
props?: Q, // should be Q & ClassAttributes<T>
|
280
|
-
...children: ReactNode[]
|
305
|
+
...children: ReactNode[]
|
306
|
+
): CElement<P, T>;
|
281
307
|
function cloneElement<P extends Q, Q>(
|
282
308
|
element: ReactElement<P>,
|
283
309
|
props?: Q, // should be Q & Attributes
|
284
|
-
...children: ReactNode[]
|
310
|
+
...children: ReactNode[]
|
311
|
+
): ReactElement<P>;
|
285
312
|
|
286
313
|
function isValidElement<P>(object: {}): object is ReactElement<P>;
|
287
314
|
|
@@ -297,7 +324,7 @@ declare namespace React {
|
|
297
324
|
type ReactInstance = Component<any> | Element;
|
298
325
|
|
299
326
|
// Base component for plain JS classes
|
300
|
-
interface Component<P = {}, S = {}> extends ComponentLifecycle<P, S> {
|
327
|
+
interface Component<P = {}, S = {}> extends ComponentLifecycle<P, S> {}
|
301
328
|
class Component<P, S> {
|
302
329
|
constructor(props?: P, context?: any);
|
303
330
|
|
@@ -305,8 +332,8 @@ declare namespace React {
|
|
305
332
|
// See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
|
306
333
|
// Also, the ` | S` allows intellisense to not be dumbisense
|
307
334
|
setState<K extends keyof S>(
|
308
|
-
state: ((prevState: Readonly<S>, props: P) =>
|
309
|
-
callback?: () => any
|
335
|
+
state: ((prevState: Readonly<S>, props: P) => Pick<S, K> | S) | (Pick<S, K> | S),
|
336
|
+
callback?: () => any,
|
310
337
|
): void;
|
311
338
|
|
312
339
|
forceUpdate(callBack?: () => any): void;
|
@@ -321,11 +348,11 @@ declare namespace React {
|
|
321
348
|
state: Readonly<S>;
|
322
349
|
context: any;
|
323
350
|
refs: {
|
324
|
-
[key: string]: ReactInstance
|
351
|
+
[key: string]: ReactInstance;
|
325
352
|
};
|
326
353
|
}
|
327
354
|
|
328
|
-
class PureComponent<P = {}, S = {}> extends Component<P, S> {
|
355
|
+
class PureComponent<P = {}, S = {}> extends Component<P, S> {}
|
329
356
|
|
330
357
|
interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
|
331
358
|
replaceState(nextState: S, callback?: () => any): void;
|
@@ -351,7 +378,7 @@ declare namespace React {
|
|
351
378
|
}
|
352
379
|
|
353
380
|
interface ComponentClass<P = {}> {
|
354
|
-
new
|
381
|
+
new(props?: P, context?: any): Component<P, ComponentState>;
|
355
382
|
propTypes?: ValidationMap<P> | undefined;
|
356
383
|
contextTypes?: ValidationMap<any> | undefined;
|
357
384
|
childContextTypes?: ValidationMap<any> | undefined;
|
@@ -360,7 +387,7 @@ declare namespace React {
|
|
360
387
|
}
|
361
388
|
|
362
389
|
interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
|
363
|
-
new
|
390
|
+
new(props?: P, context?: any): ClassicComponent<P, ComponentState>;
|
364
391
|
getDefaultProps?(): P;
|
365
392
|
}
|
366
393
|
|
@@ -370,9 +397,9 @@ declare namespace React {
|
|
370
397
|
* See https://github.com/Microsoft/TypeScript/issues/7234 for more info.
|
371
398
|
*/
|
372
399
|
type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> =
|
373
|
-
C
|
374
|
-
(new
|
375
|
-
(new
|
400
|
+
& C
|
401
|
+
& (new(props?: P, context?: any) => T)
|
402
|
+
& (new(props?: P, context?: any) => { props: P });
|
376
403
|
|
377
404
|
//
|
378
405
|
// Component Specs and Lifecycle
|
@@ -463,7 +490,21 @@ declare namespace React {
|
|
463
490
|
target: EventTarget & T;
|
464
491
|
}
|
465
492
|
|
466
|
-
type ModifierKey =
|
493
|
+
type ModifierKey =
|
494
|
+
| "Alt"
|
495
|
+
| "AltGraph"
|
496
|
+
| "CapsLock"
|
497
|
+
| "Control"
|
498
|
+
| "Fn"
|
499
|
+
| "FnLock"
|
500
|
+
| "Hyper"
|
501
|
+
| "Meta"
|
502
|
+
| "NumLock"
|
503
|
+
| "ScrollLock"
|
504
|
+
| "Shift"
|
505
|
+
| "Super"
|
506
|
+
| "Symbol"
|
507
|
+
| "SymbolLock";
|
467
508
|
|
468
509
|
interface KeyboardEvent<T> extends SyntheticEvent<T> {
|
469
510
|
altKey: boolean;
|
@@ -786,7 +827,15 @@ declare namespace React {
|
|
786
827
|
/**
|
787
828
|
* Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.
|
788
829
|
*/
|
789
|
-
alignContent?:
|
830
|
+
alignContent?:
|
831
|
+
| CSSWideKeyword
|
832
|
+
| "flex-start"
|
833
|
+
| "flex-end"
|
834
|
+
| "center"
|
835
|
+
| "space-between"
|
836
|
+
| "space-around"
|
837
|
+
| "stretch"
|
838
|
+
| undefined;
|
790
839
|
|
791
840
|
/**
|
792
841
|
* Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis.
|
@@ -1417,10 +1466,20 @@ declare namespace React {
|
|
1417
1466
|
* Specifies the size of the font. Used to compute em and ex units.
|
1418
1467
|
* See CSS 3 font-size property https://www.w3.org/TR/css-fonts-3/#propdef-font-size
|
1419
1468
|
*/
|
1420
|
-
fontSize?:
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1469
|
+
fontSize?:
|
1470
|
+
| CSSWideKeyword
|
1471
|
+
| "xx-small"
|
1472
|
+
| "x-small"
|
1473
|
+
| "small"
|
1474
|
+
| "medium"
|
1475
|
+
| "large"
|
1476
|
+
| "x-large"
|
1477
|
+
| "xx-large"
|
1478
|
+
| "larger"
|
1479
|
+
| "smaller"
|
1480
|
+
| CSSLength
|
1481
|
+
| CSSPercentage
|
1482
|
+
| undefined;
|
1424
1483
|
|
1425
1484
|
/**
|
1426
1485
|
* The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family,
|
@@ -1434,9 +1493,18 @@ declare namespace React {
|
|
1434
1493
|
* Allows you to expand or condense the widths for a normal, condensed, or expanded font face.
|
1435
1494
|
* See CSS 3 font-stretch property https://drafts.csswg.org/css-fonts-3/#propdef-font-stretch
|
1436
1495
|
*/
|
1437
|
-
fontStretch?:
|
1438
|
-
|
1439
|
-
|
1496
|
+
fontStretch?:
|
1497
|
+
| CSSWideKeyword
|
1498
|
+
| "normal"
|
1499
|
+
| "ultra-condensed"
|
1500
|
+
| "extra-condensed"
|
1501
|
+
| "condensed"
|
1502
|
+
| "semi-condensed"
|
1503
|
+
| "semi-expanded"
|
1504
|
+
| "expanded"
|
1505
|
+
| "extra-expanded"
|
1506
|
+
| "ultra-expanded"
|
1507
|
+
| undefined;
|
1440
1508
|
|
1441
1509
|
/**
|
1442
1510
|
* The font-style property allows normal, italic, or oblique faces to be selected.
|
@@ -1465,7 +1533,22 @@ declare namespace React {
|
|
1465
1533
|
* Specifies the weight or boldness of the font.
|
1466
1534
|
* See CSS 3 'font-weight' property https://www.w3.org/TR/css-fonts-3/#propdef-font-weight
|
1467
1535
|
*/
|
1468
|
-
fontWeight?:
|
1536
|
+
fontWeight?:
|
1537
|
+
| CSSWideKeyword
|
1538
|
+
| "normal"
|
1539
|
+
| "bold"
|
1540
|
+
| "bolder"
|
1541
|
+
| "lighter"
|
1542
|
+
| 100
|
1543
|
+
| 200
|
1544
|
+
| 300
|
1545
|
+
| 400
|
1546
|
+
| 500
|
1547
|
+
| 600
|
1548
|
+
| 700
|
1549
|
+
| 800
|
1550
|
+
| 900
|
1551
|
+
| undefined;
|
1469
1552
|
|
1470
1553
|
/**
|
1471
1554
|
* Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration.
|
@@ -1562,7 +1645,15 @@ declare namespace React {
|
|
1562
1645
|
* along the main-axis of their container.
|
1563
1646
|
* See CSS justify-content property https://www.w3.org/TR/css-flexbox-1/#justify-content-property
|
1564
1647
|
*/
|
1565
|
-
justifyContent?:
|
1648
|
+
justifyContent?:
|
1649
|
+
| CSSWideKeyword
|
1650
|
+
| "flex-start"
|
1651
|
+
| "flex-end"
|
1652
|
+
| "center"
|
1653
|
+
| "space-between"
|
1654
|
+
| "space-around"
|
1655
|
+
| "space-evenly"
|
1656
|
+
| undefined;
|
1566
1657
|
|
1567
1658
|
layoutGrid?: CSSWideKeyword | any;
|
1568
1659
|
|
@@ -2401,189 +2492,189 @@ declare namespace React {
|
|
2401
2492
|
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
|
2402
2493
|
interface AriaAttributes {
|
2403
2494
|
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
|
2404
|
-
|
2495
|
+
"aria-activedescendant"?: string | undefined;
|
2405
2496
|
/** 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. */
|
2406
|
-
|
2497
|
+
"aria-atomic"?: boolean | "false" | "true" | undefined;
|
2407
2498
|
/**
|
2408
2499
|
* 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
|
2409
2500
|
* presented if they are made.
|
2410
2501
|
*/
|
2411
|
-
|
2502
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
2412
2503
|
/** 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. */
|
2413
|
-
|
2504
|
+
"aria-busy"?: boolean | "false" | "true" | undefined;
|
2414
2505
|
/**
|
2415
2506
|
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
|
2416
2507
|
* @see aria-pressed @see aria-selected.
|
2417
2508
|
*/
|
2418
|
-
|
2509
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
2419
2510
|
/**
|
2420
2511
|
* Defines the total number of columns in a table, grid, or treegrid.
|
2421
2512
|
* @see aria-colindex.
|
2422
2513
|
*/
|
2423
|
-
|
2514
|
+
"aria-colcount"?: number | undefined;
|
2424
2515
|
/**
|
2425
2516
|
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
|
2426
2517
|
* @see aria-colcount @see aria-colspan.
|
2427
2518
|
*/
|
2428
|
-
|
2519
|
+
"aria-colindex"?: number | undefined;
|
2429
2520
|
/**
|
2430
2521
|
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
|
2431
2522
|
* @see aria-colindex @see aria-rowspan.
|
2432
2523
|
*/
|
2433
|
-
|
2524
|
+
"aria-colspan"?: number | undefined;
|
2434
2525
|
/**
|
2435
2526
|
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
|
2436
2527
|
* @see aria-owns.
|
2437
2528
|
*/
|
2438
|
-
|
2529
|
+
"aria-controls"?: string | undefined;
|
2439
2530
|
/** Indicates the element that represents the current item within a container or set of related elements. */
|
2440
|
-
|
2531
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
2441
2532
|
/**
|
2442
2533
|
* Identifies the element (or elements) that describes the object.
|
2443
2534
|
* @see aria-labelledby
|
2444
2535
|
*/
|
2445
|
-
|
2536
|
+
"aria-describedby"?: string | undefined;
|
2446
2537
|
/**
|
2447
2538
|
* Identifies the element that provides a detailed, extended description for the object.
|
2448
2539
|
* @see aria-describedby.
|
2449
2540
|
*/
|
2450
|
-
|
2541
|
+
"aria-details"?: string | undefined;
|
2451
2542
|
/**
|
2452
2543
|
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
2453
2544
|
* @see aria-hidden @see aria-readonly.
|
2454
2545
|
*/
|
2455
|
-
|
2546
|
+
"aria-disabled"?: boolean | "false" | "true" | undefined;
|
2456
2547
|
/**
|
2457
2548
|
* Indicates what functions can be performed when a dragged object is released on the drop target.
|
2458
2549
|
* @deprecated in ARIA 1.1
|
2459
2550
|
*/
|
2460
|
-
|
2551
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
2461
2552
|
/**
|
2462
2553
|
* Identifies the element that provides an error message for the object.
|
2463
2554
|
* @see aria-invalid @see aria-describedby.
|
2464
2555
|
*/
|
2465
|
-
|
2556
|
+
"aria-errormessage"?: string | undefined;
|
2466
2557
|
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
2467
|
-
|
2558
|
+
"aria-expanded"?: boolean | "false" | "true" | undefined;
|
2468
2559
|
/**
|
2469
2560
|
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
|
2470
2561
|
* allows assistive technology to override the general default of reading in document source order.
|
2471
2562
|
*/
|
2472
|
-
|
2563
|
+
"aria-flowto"?: string | undefined;
|
2473
2564
|
/**
|
2474
2565
|
* Indicates an element's "grabbed" state in a drag-and-drop operation.
|
2475
2566
|
* @deprecated in ARIA 1.1
|
2476
2567
|
*/
|
2477
|
-
|
2568
|
+
"aria-grabbed"?: boolean | "false" | "true" | undefined;
|
2478
2569
|
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
2479
|
-
|
2570
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
2480
2571
|
/**
|
2481
2572
|
* Indicates whether the element is exposed to an accessibility API.
|
2482
2573
|
* @see aria-disabled.
|
2483
2574
|
*/
|
2484
|
-
|
2575
|
+
"aria-hidden"?: boolean | "false" | "true" | undefined;
|
2485
2576
|
/**
|
2486
2577
|
* Indicates the entered value does not conform to the format expected by the application.
|
2487
2578
|
* @see aria-errormessage.
|
2488
2579
|
*/
|
2489
|
-
|
2580
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
2490
2581
|
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
|
2491
|
-
|
2582
|
+
"aria-keyshortcuts"?: string | undefined;
|
2492
2583
|
/**
|
2493
2584
|
* Defines a string value that labels the current element.
|
2494
2585
|
* @see aria-labelledby.
|
2495
2586
|
*/
|
2496
|
-
|
2587
|
+
"aria-label"?: string | undefined;
|
2497
2588
|
/**
|
2498
2589
|
* Identifies the element (or elements) that labels the current element.
|
2499
2590
|
* @see aria-describedby.
|
2500
2591
|
*/
|
2501
|
-
|
2592
|
+
"aria-labelledby"?: string | undefined;
|
2502
2593
|
/** Defines the hierarchical level of an element within a structure. */
|
2503
|
-
|
2594
|
+
"aria-level"?: number | undefined;
|
2504
2595
|
/** 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. */
|
2505
|
-
|
2596
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
2506
2597
|
/** Indicates whether an element is modal when displayed. */
|
2507
|
-
|
2598
|
+
"aria-modal"?: boolean | "false" | "true" | undefined;
|
2508
2599
|
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
|
2509
|
-
|
2600
|
+
"aria-multiline"?: boolean | "false" | "true" | undefined;
|
2510
2601
|
/** Indicates that the user may select more than one item from the current selectable descendants. */
|
2511
|
-
|
2602
|
+
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
|
2512
2603
|
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
2513
|
-
|
2604
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
2514
2605
|
/**
|
2515
2606
|
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
|
2516
2607
|
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
|
2517
2608
|
* @see aria-controls.
|
2518
2609
|
*/
|
2519
|
-
|
2610
|
+
"aria-owns"?: string | undefined;
|
2520
2611
|
/**
|
2521
2612
|
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
|
2522
2613
|
* A hint could be a sample value or a brief description of the expected format.
|
2523
2614
|
*/
|
2524
|
-
|
2615
|
+
"aria-placeholder"?: string | undefined;
|
2525
2616
|
/**
|
2526
2617
|
* 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.
|
2527
2618
|
* @see aria-setsize.
|
2528
2619
|
*/
|
2529
|
-
|
2620
|
+
"aria-posinset"?: number | undefined;
|
2530
2621
|
/**
|
2531
2622
|
* Indicates the current "pressed" state of toggle buttons.
|
2532
2623
|
* @see aria-checked @see aria-selected.
|
2533
2624
|
*/
|
2534
|
-
|
2625
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
2535
2626
|
/**
|
2536
2627
|
* Indicates that the element is not editable, but is otherwise operable.
|
2537
2628
|
* @see aria-disabled.
|
2538
2629
|
*/
|
2539
|
-
|
2630
|
+
"aria-readonly"?: boolean | "false" | "true" | undefined;
|
2540
2631
|
/**
|
2541
2632
|
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
2542
2633
|
* @see aria-atomic.
|
2543
2634
|
*/
|
2544
|
-
|
2635
|
+
"aria-relevant"?: "additions" | "additions text" | "all" | "removals" | "text" | undefined;
|
2545
2636
|
/** Indicates that user input is required on the element before a form may be submitted. */
|
2546
|
-
|
2637
|
+
"aria-required"?: boolean | "false" | "true" | undefined;
|
2547
2638
|
/** Defines a human-readable, author-localized description for the role of an element. */
|
2548
|
-
|
2639
|
+
"aria-roledescription"?: string | undefined;
|
2549
2640
|
/**
|
2550
2641
|
* Defines the total number of rows in a table, grid, or treegrid.
|
2551
2642
|
* @see aria-rowindex.
|
2552
2643
|
*/
|
2553
|
-
|
2644
|
+
"aria-rowcount"?: number | undefined;
|
2554
2645
|
/**
|
2555
2646
|
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
|
2556
2647
|
* @see aria-rowcount @see aria-rowspan.
|
2557
2648
|
*/
|
2558
|
-
|
2649
|
+
"aria-rowindex"?: number | undefined;
|
2559
2650
|
/**
|
2560
2651
|
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
|
2561
2652
|
* @see aria-rowindex @see aria-colspan.
|
2562
2653
|
*/
|
2563
|
-
|
2654
|
+
"aria-rowspan"?: number | undefined;
|
2564
2655
|
/**
|
2565
2656
|
* Indicates the current "selected" state of various widgets.
|
2566
2657
|
* @see aria-checked @see aria-pressed.
|
2567
2658
|
*/
|
2568
|
-
|
2659
|
+
"aria-selected"?: boolean | "false" | "true" | undefined;
|
2569
2660
|
/**
|
2570
2661
|
* 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.
|
2571
2662
|
* @see aria-posinset.
|
2572
2663
|
*/
|
2573
|
-
|
2664
|
+
"aria-setsize"?: number | undefined;
|
2574
2665
|
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
|
2575
|
-
|
2666
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
2576
2667
|
/** Defines the maximum allowed value for a range widget. */
|
2577
|
-
|
2668
|
+
"aria-valuemax"?: number | undefined;
|
2578
2669
|
/** Defines the minimum allowed value for a range widget. */
|
2579
|
-
|
2670
|
+
"aria-valuemin"?: number | undefined;
|
2580
2671
|
/**
|
2581
2672
|
* Defines the current value for a range widget.
|
2582
2673
|
* @see aria-valuetext.
|
2583
2674
|
*/
|
2584
|
-
|
2675
|
+
"aria-valuenow"?: number | undefined;
|
2585
2676
|
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
2586
|
-
|
2677
|
+
"aria-valuetext"?: string | undefined;
|
2587
2678
|
}
|
2588
2679
|
|
2589
2680
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
@@ -2647,7 +2738,7 @@ declare namespace React {
|
|
2647
2738
|
* Hints at the type of data that might be entered by the user while editing the element or its contents
|
2648
2739
|
* @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
|
2649
2740
|
*/
|
2650
|
-
inputMode?:
|
2741
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
2651
2742
|
/**
|
2652
2743
|
* Specify that a standard HTML element should behave like a defined custom built-in element
|
2653
2744
|
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
|
@@ -3172,8 +3263,21 @@ declare namespace React {
|
|
3172
3263
|
accentHeight?: number | string | undefined;
|
3173
3264
|
accumulate?: "none" | "sum" | undefined;
|
3174
3265
|
additive?: "replace" | "sum" | undefined;
|
3175
|
-
alignmentBaseline?:
|
3176
|
-
|
3266
|
+
alignmentBaseline?:
|
3267
|
+
| "auto"
|
3268
|
+
| "baseline"
|
3269
|
+
| "before-edge"
|
3270
|
+
| "text-before-edge"
|
3271
|
+
| "middle"
|
3272
|
+
| "central"
|
3273
|
+
| "after-edge"
|
3274
|
+
| "text-after-edge"
|
3275
|
+
| "ideographic"
|
3276
|
+
| "alphabetic"
|
3277
|
+
| "hanging"
|
3278
|
+
| "mathematical"
|
3279
|
+
| "inherit"
|
3280
|
+
| undefined;
|
3177
3281
|
allowReorder?: "no" | "yes" | undefined;
|
3178
3282
|
alphabetic?: number | string | undefined;
|
3179
3283
|
amplitude?: number | string | undefined;
|
@@ -3559,19 +3663,21 @@ declare namespace React {
|
|
3559
3663
|
use: SVGFactory;
|
3560
3664
|
}
|
3561
3665
|
|
3562
|
-
interface ReactDOM extends ReactHTML, ReactSVG {
|
3666
|
+
interface ReactDOM extends ReactHTML, ReactSVG {}
|
3563
3667
|
|
3564
3668
|
//
|
3565
3669
|
// React.PropTypes
|
3566
3670
|
// ----------------------------------------------------------------------
|
3567
3671
|
|
3568
|
-
type Validator<T> = {
|
3672
|
+
type Validator<T> = {
|
3673
|
+
bivarianceHack(object: T, key: string, componentName: string, ...rest: any[]): Error | null;
|
3674
|
+
}["bivarianceHack"];
|
3569
3675
|
|
3570
3676
|
interface Requireable<T> extends Validator<T> {
|
3571
3677
|
isRequired: Validator<T>;
|
3572
3678
|
}
|
3573
3679
|
|
3574
|
-
type ValidationMap<T> = {[K in keyof T]?: Validator<T> };
|
3680
|
+
type ValidationMap<T> = { [K in keyof T]?: Validator<T> };
|
3575
3681
|
|
3576
3682
|
interface ReactPropTypes {
|
3577
3683
|
any: Requireable<any>;
|
@@ -3649,15 +3755,19 @@ declare global {
|
|
3649
3755
|
* @deprecated Use `React.JSX` instead of the global `JSX` namespace.
|
3650
3756
|
*/
|
3651
3757
|
namespace JSX {
|
3652
|
-
interface Element extends React.ReactElement {
|
3758
|
+
interface Element extends React.ReactElement {}
|
3653
3759
|
interface ElementClass extends React.Component<any> {
|
3654
3760
|
render(): JSX.Element | null | false;
|
3655
3761
|
}
|
3656
|
-
interface ElementAttributesProperty {
|
3657
|
-
|
3762
|
+
interface ElementAttributesProperty {
|
3763
|
+
props: {};
|
3764
|
+
}
|
3765
|
+
interface ElementChildrenAttribute {
|
3766
|
+
children: {};
|
3767
|
+
}
|
3658
3768
|
|
3659
|
-
interface IntrinsicAttributes extends React.Attributes {
|
3660
|
-
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {
|
3769
|
+
interface IntrinsicAttributes extends React.Attributes {}
|
3770
|
+
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {}
|
3661
3771
|
|
3662
3772
|
interface IntrinsicElements {
|
3663
3773
|
// HTML
|
react v15.7/jsx-dev-runtime.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Expose `JSX` namespace in `global` namespace
|
2
|
-
import
|
2
|
+
import "./";
|
react v15.7/jsx-runtime.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Expose `JSX` namespace in `global` namespace
|
2
|
-
import
|
2
|
+
import "./";
|
react v15.7/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "15.7.
|
3
|
+
"version": "15.7.23",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -62,8 +62,8 @@
|
|
62
62
|
},
|
63
63
|
"scripts": {},
|
64
64
|
"dependencies": {},
|
65
|
-
"typesPublisherContentHash": "
|
66
|
-
"typeScriptVersion": "4.
|
65
|
+
"typesPublisherContentHash": "cac0ad925de77abaacd42d57680504d24e495534068f547184fdbf386e4a1ebe",
|
66
|
+
"typeScriptVersion": "4.5",
|
67
67
|
"exports": {
|
68
68
|
".": {
|
69
69
|
"types": {
|