@types/react 17.0.35 → 17.0.36
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 +1 -1
- react/next.d.ts +1 -18
- react/package.json +3 -3
react/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.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Sun, 21 Nov 2021 17:01:07 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/next.d.ts
CHANGED
@@ -151,24 +151,7 @@ declare module '.' {
|
|
151
151
|
*/
|
152
152
|
export function startTransition(scope: TransitionFunction): void;
|
153
153
|
|
154
|
-
|
155
|
-
/**
|
156
|
-
* WARNING: Don't use this as a `string`.
|
157
|
-
*
|
158
|
-
* This is an opaque type that is not supposed to type-check structurally.
|
159
|
-
* It is only valid if returned from React methods and passed to React e.g. `<button aria-labelledby={opaqueIdentifier} />`
|
160
|
-
*/
|
161
|
-
// We can't create a type that would be rejected for string concatenation or `.toString()` calls.
|
162
|
-
// So in order to not have to add `string | OpaqueIdentifier` to every react-dom host prop we intersect it with `string`.
|
163
|
-
type OpaqueIdentifier = string & {
|
164
|
-
readonly [opaqueIdentifierBranding]: unknown;
|
165
|
-
// While this would cause `const stringified: string = opaqueIdentifier.toString()` to not type-check it also adds completions while typing.
|
166
|
-
// It would also still allow string concatenation.
|
167
|
-
// Unsure which is better. Not type-checking or not suggesting.
|
168
|
-
// toString(): void;
|
169
|
-
};
|
170
|
-
|
171
|
-
export function unstable_useOpaqueIdentifier(): OpaqueIdentifier;
|
154
|
+
export function useId(): string;
|
172
155
|
|
173
156
|
/**
|
174
157
|
* this should be an internal type
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.36",
|
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": "ecb4da04a2bc805bdcfa83d8a2f7e56a558d3caaa63780a585284dce673e3285",
|
150
|
+
"typeScriptVersion": "3.8"
|
151
151
|
}
|