@types/react 16.14.12 → 16.14.16
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 v16.14/README.md +1 -1
- react v16.14/index.d.ts +39 -4
- react v16.14/package.json +3 -3
react v16.14/README.md
CHANGED
@@ -8,7 +8,7 @@ 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/v16.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Sun, 03 Oct 2021 13:31:19 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
|
|
react v16.14/index.d.ts
CHANGED
@@ -837,6 +837,14 @@ declare namespace React {
|
|
837
837
|
type ComponentPropsWithoutRef<T extends ElementType> =
|
838
838
|
PropsWithoutRef<ComponentProps<T>>;
|
839
839
|
|
840
|
+
type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<
|
841
|
+
ComponentPropsWithoutRef<T> & RefAttributes<infer Method>
|
842
|
+
>
|
843
|
+
? Method
|
844
|
+
: ComponentPropsWithRef<T> extends RefAttributes<infer Method>
|
845
|
+
? Method
|
846
|
+
: never;
|
847
|
+
|
840
848
|
// will show `Memo(${Component.displayName || Component.name})` in devtools by default,
|
841
849
|
// but can be given its own specific name
|
842
850
|
type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
|
@@ -1183,9 +1191,9 @@ declare namespace React {
|
|
1183
1191
|
isPrimary: boolean;
|
1184
1192
|
}
|
1185
1193
|
|
1186
|
-
interface FocusEvent<
|
1187
|
-
relatedTarget: EventTarget | null;
|
1188
|
-
target: EventTarget &
|
1194
|
+
interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, NativeFocusEvent> {
|
1195
|
+
relatedTarget: (EventTarget & RelatedTarget) | null;
|
1196
|
+
target: EventTarget & Target;
|
1189
1197
|
}
|
1190
1198
|
|
1191
1199
|
// tslint:disable-next-line:no-empty-interface
|
@@ -2157,6 +2165,31 @@ declare namespace React {
|
|
2157
2165
|
dateTime?: string | undefined;
|
2158
2166
|
}
|
2159
2167
|
|
2168
|
+
type HTMLInputTypeAttribute =
|
2169
|
+
| 'button'
|
2170
|
+
| 'checkbox'
|
2171
|
+
| 'color'
|
2172
|
+
| 'date'
|
2173
|
+
| 'datetime-local'
|
2174
|
+
| 'email'
|
2175
|
+
| 'file'
|
2176
|
+
| 'hidden'
|
2177
|
+
| 'image'
|
2178
|
+
| 'month'
|
2179
|
+
| 'number'
|
2180
|
+
| 'password'
|
2181
|
+
| 'radio'
|
2182
|
+
| 'range'
|
2183
|
+
| 'reset'
|
2184
|
+
| 'search'
|
2185
|
+
| 'submit'
|
2186
|
+
| 'tel'
|
2187
|
+
| 'text'
|
2188
|
+
| 'time'
|
2189
|
+
| 'url'
|
2190
|
+
| 'week'
|
2191
|
+
| (string & {});
|
2192
|
+
|
2160
2193
|
interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
2161
2194
|
accept?: string | undefined;
|
2162
2195
|
alt?: string | undefined;
|
@@ -2187,7 +2220,7 @@ declare namespace React {
|
|
2187
2220
|
size?: number | undefined;
|
2188
2221
|
src?: string | undefined;
|
2189
2222
|
step?: number | string | undefined;
|
2190
|
-
type?:
|
2223
|
+
type?: HTMLInputTypeAttribute | undefined;
|
2191
2224
|
value?: string | ReadonlyArray<string> | number | undefined;
|
2192
2225
|
width?: number | string | undefined;
|
2193
2226
|
|
@@ -2348,11 +2381,13 @@ declare namespace React {
|
|
2348
2381
|
}
|
2349
2382
|
|
2350
2383
|
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
2384
|
+
height?: number | string | undefined;
|
2351
2385
|
media?: string | undefined;
|
2352
2386
|
sizes?: string | undefined;
|
2353
2387
|
src?: string | undefined;
|
2354
2388
|
srcSet?: string | undefined;
|
2355
2389
|
type?: string | undefined;
|
2390
|
+
width?: number | string | undefined;
|
2356
2391
|
}
|
2357
2392
|
|
2358
2393
|
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
react v16.14/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "16.14.
|
3
|
+
"version": "16.14.16",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,6 +146,6 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
150
|
-
"typeScriptVersion": "3.
|
149
|
+
"typesPublisherContentHash": "ec41b3ffa3c87c9c877cfd9d4db4936ac43a2ad430d21b05eece9ddeb5f3179d",
|
150
|
+
"typeScriptVersion": "3.7"
|
151
151
|
}
|