alicezetion 1.8.7 → 1.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/.cache/replit/modules/{nodejs-20:v25-20240206-fdbd396.res → nodejs-20:v28-20240213-3f08513.res} +1 -1
  2. package/.cache/replit/modules/replit:v5-20240209-9e3a339.res +1 -0
  3. package/.cache/typescript/5.3/node_modules/.package-lock.json +32 -3
  4. package/.cache/typescript/5.3/node_modules/@types/prop-types/LICENSE +21 -0
  5. package/.cache/typescript/5.3/node_modules/@types/prop-types/README.md +15 -0
  6. package/.cache/typescript/5.3/node_modules/@types/prop-types/index.d.ts +98 -0
  7. package/.cache/typescript/5.3/node_modules/@types/prop-types/package.json +35 -0
  8. package/.cache/typescript/5.3/node_modules/@types/react/LICENSE +21 -0
  9. package/.cache/typescript/5.3/node_modules/@types/react/README.md +15 -0
  10. package/.cache/typescript/5.3/node_modules/@types/react/canary.d.ts +112 -0
  11. package/.cache/typescript/5.3/node_modules/@types/react/experimental.d.ts +126 -0
  12. package/.cache/typescript/5.3/node_modules/@types/react/global.d.ts +158 -0
  13. package/.cache/typescript/5.3/node_modules/@types/react/index.d.ts +4351 -0
  14. package/.cache/typescript/5.3/node_modules/@types/react/jsx-dev-runtime.d.ts +13 -0
  15. package/.cache/typescript/5.3/node_modules/@types/react/jsx-runtime.d.ts +13 -0
  16. package/.cache/typescript/5.3/node_modules/@types/react/package.json +206 -0
  17. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/canary.d.ts +112 -0
  18. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/experimental.d.ts +126 -0
  19. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/global.d.ts +158 -0
  20. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/index.d.ts +4333 -0
  21. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +12 -0
  22. package/.cache/typescript/5.3/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +12 -0
  23. package/.cache/typescript/5.3/node_modules/@types/scheduler/LICENSE +21 -0
  24. package/.cache/typescript/5.3/node_modules/@types/scheduler/README.md +15 -0
  25. package/.cache/typescript/5.3/node_modules/@types/scheduler/index.d.ts +30 -0
  26. package/.cache/typescript/5.3/node_modules/@types/scheduler/package.json +30 -0
  27. package/.cache/typescript/5.3/node_modules/@types/scheduler/tracing.d.ts +127 -0
  28. package/.cache/typescript/5.3/node_modules/csstype/LICENSE +19 -0
  29. package/.cache/typescript/5.3/node_modules/csstype/README.md +277 -0
  30. package/.cache/typescript/5.3/node_modules/csstype/index.d.ts +21297 -0
  31. package/.cache/typescript/5.3/node_modules/csstype/index.js.flow +6612 -0
  32. package/.cache/typescript/5.3/node_modules/csstype/package.json +66 -0
  33. package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -1
  34. package/.cache/typescript/5.3/node_modules/types-registry/package.json +2 -2
  35. package/.cache/typescript/5.3/package-lock.json +34 -4
  36. package/.cache/typescript/5.3/package.json +1 -1
  37. package/leiamnash/listenMqtt.js +823 -814
  38. package/package.json +1 -1
  39. package/.cache/replit/modules/replit:v4-20240206-fdbd396.res +0 -1
@@ -1 +1 @@
1
- {"type":"resolve","resolvedModuleId":"nodejs-20:v25-20240206-fdbd396","inputHash":"","resolutionPath":["nodejs-20:v8-20230920-bd784b9","nodejs-20:v9-20231020-a3526c9","nodejs-20:v10-20231103-2b03dda","nodejs-20:v11-20231122-8e4093b","nodejs-20:v12-20231130-57acee0","nodejs-20:v13-20231201-3b22c78","nodejs-20:v14-20231206-9a12353","nodejs-20:v15-20231206-d8b5d0b","nodejs-20:v16-20231207-cf9ab20","nodejs-20:v17-20231207-25d440f","nodejs-20:v18-20231211-ac14ad7","nodejs-20:v19-20231216-fb57c71","nodejs-20:v20-20231219-faac932","nodejs-20:v21-20240102-fd07a42","nodejs-20:v22-20240103-2da4911","nodejs-20:v23-20240116-9f73277","nodejs-20:v24-20240117-0bd73cd","nodejs-20:v25-20240206-fdbd396"],"error":"","Changed":true}
1
+ {"type":"resolve","resolvedModuleId":"nodejs-20:v28-20240213-3f08513","inputHash":"","resolutionPath":["nodejs-20:v8-20230920-bd784b9","nodejs-20:v9-20231020-a3526c9","nodejs-20:v10-20231103-2b03dda","nodejs-20:v11-20231122-8e4093b","nodejs-20:v12-20231130-57acee0","nodejs-20:v13-20231201-3b22c78","nodejs-20:v14-20231206-9a12353","nodejs-20:v15-20231206-d8b5d0b","nodejs-20:v16-20231207-cf9ab20","nodejs-20:v17-20231207-25d440f","nodejs-20:v18-20231211-ac14ad7","nodejs-20:v19-20231216-fb57c71","nodejs-20:v20-20231219-faac932","nodejs-20:v21-20240102-fd07a42","nodejs-20:v22-20240103-2da4911","nodejs-20:v23-20240116-9f73277","nodejs-20:v24-20240117-0bd73cd","nodejs-20:v25-20240206-fdbd396","nodejs-20:v26-20240209-9e3a339","nodejs-20:v27-20240213-5e75727","nodejs-20:v28-20240213-3f08513"],"error":"","Changed":true}
@@ -0,0 +1 @@
1
+ {"type":"resolve","resolvedModuleId":"replit:v5-20240209-9e3a339","inputHash":"","resolutionPath":["replit","replit:v1-20231211-d5ddcff","replit:v2-20240117-0bd73cd","replit:v3-20240123-c72e35a","replit:v4-20240206-fdbd396","replit:v5-20240209-9e3a339"],"error":"","Changed":true}
@@ -42,6 +42,23 @@
42
42
  "@types/node": "*"
43
43
  }
44
44
  },
45
+ "node_modules/@types/prop-types": {
46
+ "version": "15.7.11",
47
+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
48
+ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
49
+ "dev": true
50
+ },
51
+ "node_modules/@types/react": {
52
+ "version": "18.2.55",
53
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz",
54
+ "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==",
55
+ "dev": true,
56
+ "dependencies": {
57
+ "@types/prop-types": "*",
58
+ "@types/scheduler": "*",
59
+ "csstype": "^3.0.2"
60
+ }
61
+ },
45
62
  "node_modules/@types/request": {
46
63
  "version": "2.48.12",
47
64
  "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz",
@@ -54,6 +71,12 @@
54
71
  "form-data": "^2.5.0"
55
72
  }
56
73
  },
74
+ "node_modules/@types/scheduler": {
75
+ "version": "0.16.8",
76
+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
77
+ "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
78
+ "dev": true
79
+ },
57
80
  "node_modules/@types/tough-cookie": {
58
81
  "version": "4.0.5",
59
82
  "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
@@ -78,6 +101,12 @@
78
101
  "node": ">= 0.8"
79
102
  }
80
103
  },
104
+ "node_modules/csstype": {
105
+ "version": "3.1.3",
106
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
107
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
108
+ "dev": true
109
+ },
81
110
  "node_modules/delayed-stream": {
82
111
  "version": "1.0.0",
83
112
  "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -123,9 +152,9 @@
123
152
  }
124
153
  },
125
154
  "node_modules/types-registry": {
126
- "version": "0.1.682",
127
- "resolved": "https://registry.npmjs.org/types-registry/-/types-registry-0.1.682.tgz",
128
- "integrity": "sha512-D01VRFJ0OZzCa55z+FLFgdLYPVvPOpIBlm9v3uST942q0AdQn24eWLlV/mm2AL4YUwiA0VwyMJvZfrpPrRH7iw=="
155
+ "version": "0.1.684",
156
+ "resolved": "https://registry.npmjs.org/types-registry/-/types-registry-0.1.684.tgz",
157
+ "integrity": "sha512-B6v+g9M+7IJSc1w2THOmTuRKvd/ACxZTGXM18E8MzpHWx1mGUvGGT+RXsSnxNpyqtbjWLeXj8uyyu/MxVOS3xw=="
129
158
  },
130
159
  "node_modules/undici-types": {
131
160
  "version": "5.26.5",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,15 @@
1
+ # Installation
2
+ > `npm install --save @types/prop-types`
3
+
4
+ # Summary
5
+ This package contains type definitions for prop-types (https://github.com/reactjs/prop-types).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types.
9
+
10
+ ### Additional Details
11
+ * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon).
@@ -0,0 +1,98 @@
1
+ export type ReactComponentLike =
2
+ | string
3
+ | ((props: any, context?: any) => any)
4
+ | (new(props: any, context?: any) => any);
5
+
6
+ export interface ReactElementLike {
7
+ type: ReactComponentLike;
8
+ props: any;
9
+ key: string | null;
10
+ }
11
+
12
+ export interface ReactNodeArray extends Iterable<ReactNodeLike> {}
13
+
14
+ export type ReactNodeLike =
15
+ | ReactElementLike
16
+ | ReactNodeArray
17
+ | string
18
+ | number
19
+ | boolean
20
+ | null
21
+ | undefined;
22
+
23
+ export const nominalTypeHack: unique symbol;
24
+
25
+ export type IsOptional<T> = undefined extends T ? true : false;
26
+
27
+ export type RequiredKeys<V> = {
28
+ [K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T> ? IsOptional<T> extends true ? never : K
29
+ : never;
30
+ }[keyof V];
31
+ export type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>;
32
+ export type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]> };
33
+
34
+ export interface Validator<T> {
35
+ (
36
+ props: { [key: string]: any },
37
+ propName: string,
38
+ componentName: string,
39
+ location: string,
40
+ propFullName: string,
41
+ ): Error | null;
42
+ [nominalTypeHack]?: {
43
+ type: T;
44
+ } | undefined;
45
+ }
46
+
47
+ export interface Requireable<T> extends Validator<T | undefined | null> {
48
+ isRequired: Validator<NonNullable<T>>;
49
+ }
50
+
51
+ export type ValidationMap<T> = { [K in keyof T]?: Validator<T[K]> };
52
+
53
+ export type InferType<V> = V extends Validator<infer T> ? T : any;
54
+ export type InferProps<V> =
55
+ & InferPropsInner<Pick<V, RequiredKeys<V>>>
56
+ & Partial<InferPropsInner<Pick<V, OptionalKeys<V>>>>;
57
+
58
+ export const any: Requireable<any>;
59
+ export const array: Requireable<any[]>;
60
+ export const bool: Requireable<boolean>;
61
+ export const func: Requireable<(...args: any[]) => any>;
62
+ export const number: Requireable<number>;
63
+ export const object: Requireable<object>;
64
+ export const string: Requireable<string>;
65
+ export const node: Requireable<ReactNodeLike>;
66
+ export const element: Requireable<ReactElementLike>;
67
+ export const symbol: Requireable<symbol>;
68
+ export const elementType: Requireable<ReactComponentLike>;
69
+ export function instanceOf<T>(expectedClass: new(...args: any[]) => T): Requireable<T>;
70
+ export function oneOf<T>(types: readonly T[]): Requireable<T>;
71
+ export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
72
+ export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
73
+ export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T }>;
74
+ export function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>;
75
+ export function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>;
76
+
77
+ /**
78
+ * Assert that the values match with the type specs.
79
+ * Error messages are memorized and will only be shown once.
80
+ *
81
+ * @param typeSpecs Map of name to a ReactPropType
82
+ * @param values Runtime values that need to be type-checked
83
+ * @param location e.g. "prop", "context", "child context"
84
+ * @param componentName Name of the component for error messages
85
+ * @param getStack Returns the component stack
86
+ */
87
+ export function checkPropTypes(
88
+ typeSpecs: any,
89
+ values: any,
90
+ location: string,
91
+ componentName: string,
92
+ getStack?: () => any,
93
+ ): void;
94
+
95
+ /**
96
+ * Only available if NODE_ENV=production
97
+ */
98
+ export function resetWarningCache(): void;
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@types/prop-types",
3
+ "version": "15.7.11",
4
+ "description": "TypeScript definitions for prop-types",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "DovydasNavickas",
10
+ "githubUsername": "DovydasNavickas",
11
+ "url": "https://github.com/DovydasNavickas"
12
+ },
13
+ {
14
+ "name": "Ferdy Budhidharma",
15
+ "githubUsername": "ferdaber",
16
+ "url": "https://github.com/ferdaber"
17
+ },
18
+ {
19
+ "name": "Sebastian Silbermann",
20
+ "githubUsername": "eps1lon",
21
+ "url": "https://github.com/eps1lon"
22
+ }
23
+ ],
24
+ "main": "",
25
+ "types": "index.d.ts",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
29
+ "directory": "types/prop-types"
30
+ },
31
+ "scripts": {},
32
+ "dependencies": {},
33
+ "typesPublisherContentHash": "a098c8938982c7e7bc31f162c77bc407178535e98c85370e3b456598ee52e7c0",
34
+ "typeScriptVersion": "4.5"
35
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,15 @@
1
+ # Installation
2
+ > `npm install --save @types/react`
3
+
4
+ # Summary
5
+ This package contains type definitions for react (https://react.dev/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 06 Feb 2024 09:35:42 GMT
12
+ * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler), [csstype](https://npmjs.com/package/csstype)
13
+
14
+ # Credits
15
+ 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), [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), [Priyanshu Rav](https://github.com/priyanshurav), and [Dmitry Semigradsky](https://github.com/Semigradsky).
@@ -0,0 +1,112 @@
1
+ /**
2
+ * These are types for things that are present in the React `canary` release channel.
3
+ *
4
+ * To load the types declared here in an actual project, there are three ways. The easiest one,
5
+ * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
6
+ * is to add `"react/canary"` to the `"types"` array.
7
+ *
8
+ * Alternatively, a specific import syntax can to be used from a typescript file.
9
+ * This module does not exist in reality, which is why the {} is important:
10
+ *
11
+ * ```ts
12
+ * import {} from 'react/canary'
13
+ * ```
14
+ *
15
+ * It is also possible to include it through a triple-slash reference:
16
+ *
17
+ * ```ts
18
+ * /// <reference types="react/canary" />
19
+ * ```
20
+ *
21
+ * Either the import or the reference only needs to appear once, anywhere in the project.
22
+ */
23
+
24
+ // See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
25
+
26
+ import React = require(".");
27
+
28
+ export {};
29
+
30
+ declare const UNDEFINED_VOID_ONLY: unique symbol;
31
+ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
32
+
33
+ declare module "." {
34
+ interface ThenableImpl<T> {
35
+ then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
36
+ }
37
+ interface UntrackedThenable<T> extends ThenableImpl<T> {
38
+ status?: void;
39
+ }
40
+
41
+ export interface PendingThenable<T> extends ThenableImpl<T> {
42
+ status: "pending";
43
+ }
44
+
45
+ export interface FulfilledThenable<T> extends ThenableImpl<T> {
46
+ status: "fulfilled";
47
+ value: T;
48
+ }
49
+
50
+ export interface RejectedThenable<T> extends ThenableImpl<T> {
51
+ status: "rejected";
52
+ reason: unknown;
53
+ }
54
+
55
+ export type Thenable<T> = UntrackedThenable<T> | PendingThenable<T> | FulfilledThenable<T> | RejectedThenable<T>;
56
+
57
+ export type Usable<T> = Thenable<T> | Context<T>;
58
+
59
+ export function use<T>(usable: Usable<T>): T;
60
+
61
+ interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
62
+ export type ServerContextJSONValue =
63
+ | string
64
+ | boolean
65
+ | number
66
+ | null
67
+ | ServerContextJSONArray
68
+ | { [key: string]: ServerContextJSONValue };
69
+ export interface ServerContext<T extends ServerContextJSONValue> {
70
+ Provider: Provider<T>;
71
+ }
72
+ /**
73
+ * Accepts a context object (the value returned from `React.createContext` or `React.createServerContext`) and returns the current
74
+ * context value, as given by the nearest context provider for the given context.
75
+ *
76
+ * @version 16.8.0
77
+ * @see https://react.dev/reference/react/useContext
78
+ */
79
+ function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;
80
+ export function createServerContext<T extends ServerContextJSONValue>(
81
+ globalName: string,
82
+ defaultValue: T,
83
+ ): ServerContext<T>;
84
+
85
+ // eslint-disable-next-line @typescript-eslint/ban-types
86
+ export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
87
+
88
+ export function unstable_useCacheRefresh(): () => void;
89
+
90
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
91
+ functions: (formData: FormData) => void;
92
+ }
93
+
94
+ export interface TransitionStartFunction {
95
+ /**
96
+ * Marks all state updates inside the async function as transitions
97
+ *
98
+ * @see {https://react.dev/reference/react/useTransition#starttransition}
99
+ *
100
+ * @param callback
101
+ */
102
+ (callback: () => Promise<VoidOrUndefinedOnly>): void;
103
+ }
104
+
105
+ function useOptimistic<State>(
106
+ passthrough: State,
107
+ ): [State, (action: State | ((pendingState: State) => State)) => void];
108
+ function useOptimistic<State, Action>(
109
+ passthrough: State,
110
+ reducer: (state: State, action: Action) => State,
111
+ ): [State, (action: Action) => void];
112
+ }
@@ -0,0 +1,126 @@
1
+ /**
2
+ * These are types for things that are present in the `experimental` builds of React but not yet
3
+ * on a stable build.
4
+ *
5
+ * Once they are promoted to stable they can just be moved to the main index file.
6
+ *
7
+ * To load the types declared here in an actual project, there are three ways. The easiest one,
8
+ * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
9
+ * is to add `"react/experimental"` to the `"types"` array.
10
+ *
11
+ * Alternatively, a specific import syntax can to be used from a typescript file.
12
+ * This module does not exist in reality, which is why the {} is important:
13
+ *
14
+ * ```ts
15
+ * import {} from 'react/experimental'
16
+ * ```
17
+ *
18
+ * It is also possible to include it through a triple-slash reference:
19
+ *
20
+ * ```ts
21
+ * /// <reference types="react/experimental" />
22
+ * ```
23
+ *
24
+ * Either the import or the reference only needs to appear once, anywhere in the project.
25
+ */
26
+
27
+ // See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
28
+ // and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
29
+ // flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
30
+ //
31
+ // For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
32
+ // is a good place to start looking for details; it generally calls prop validation functions or delegates
33
+ // all tasks done as part of the render phase (the concurrent part of the React update cycle).
34
+ //
35
+ // Suspense-related handling can be found in ReactFiberThrow.js.
36
+
37
+ import React = require("./canary");
38
+
39
+ export {};
40
+
41
+ declare const UNDEFINED_VOID_ONLY: unique symbol;
42
+ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
43
+
44
+ declare module "." {
45
+ // Need an interface to not cause ReactNode to be a self-referential type.
46
+ interface PromiseLikeOfReactNode extends PromiseLike<ReactNode> {}
47
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
48
+ promises: PromiseLikeOfReactNode;
49
+ }
50
+
51
+ export interface SuspenseProps {
52
+ /**
53
+ * The presence of this prop indicates that the content is computationally expensive to render.
54
+ * In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
55
+ * @see {@link https://github.com/facebook/react/pull/19936}
56
+ */
57
+ unstable_expectedLoadTime?: number | undefined;
58
+ }
59
+
60
+ export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
61
+ export type SuspenseListTailMode = "collapsed" | "hidden";
62
+
63
+ export interface SuspenseListCommonProps {
64
+ /**
65
+ * Note that SuspenseList require more than one child;
66
+ * it is a runtime warning to provide only a single child.
67
+ *
68
+ * It does, however, allow those children to be wrapped inside a single
69
+ * level of `<React.Fragment>`.
70
+ */
71
+ children: ReactElement | Iterable<ReactElement>;
72
+ }
73
+
74
+ interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
75
+ /**
76
+ * Defines the order in which the `SuspenseList` children should be revealed.
77
+ */
78
+ revealOrder: "forwards" | "backwards";
79
+ /**
80
+ * Dictates how unloaded items in a SuspenseList is shown.
81
+ *
82
+ * - By default, `SuspenseList` will show all fallbacks in the list.
83
+ * - `collapsed` shows only the next fallback in the list.
84
+ * - `hidden` doesn’t show any unloaded items.
85
+ */
86
+ tail?: SuspenseListTailMode | undefined;
87
+ }
88
+
89
+ interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
90
+ /**
91
+ * Defines the order in which the `SuspenseList` children should be revealed.
92
+ */
93
+ revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
94
+ /**
95
+ * The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
96
+ */
97
+ tail?: never | undefined;
98
+ }
99
+
100
+ export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
101
+
102
+ /**
103
+ * `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
104
+ * in which these components are revealed to the user.
105
+ *
106
+ * When multiple components need to fetch data, this data may arrive in an unpredictable order.
107
+ * However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
108
+ * until previous items have been displayed (this behavior is adjustable).
109
+ *
110
+ * @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
111
+ * @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
112
+ */
113
+ export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
114
+
115
+ // eslint-disable-next-line @typescript-eslint/ban-types
116
+ export function experimental_useEffectEvent<T extends Function>(event: T): T;
117
+
118
+ type Reference = object;
119
+ type TaintableUniqueValue = string | bigint | ArrayBufferView;
120
+ function experimental_taintUniqueValue(
121
+ message: string | undefined,
122
+ lifetime: Reference,
123
+ value: TaintableUniqueValue,
124
+ ): void;
125
+ function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
126
+ }