UNPKG

1.17 kBTypeScriptView Raw
1/**
2 * These are types for things that are present in the React 18 alpha.
3 *
4 * Once React 18 is released they can just be moved to the main index file.
5 *
6 * To load the types declared here in an actual project, there are three ways. The easiest one,
7 * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
8 * is to add `"react-is/next"` to the `"types"` array.
9 *
10 * Alternatively, a specific import syntax can to be used from a typescript file.
11 * This module does not exist in reality, which is why the {} is important:
12 *
13 * ```ts
14 * import {} from 'react-is/next'
15 * ```
16 *
17 * It is also possible to include it through a triple-slash reference:
18 *
19 * ```ts
20 * /// <reference types="react-is/next" />
21 * ```
22 *
23 * Either the import or the reference only needs to appear once, anywhere in the project.
24 */
25
26// See https://github.com/facebook/react/blob/master/packages/react-is/src/ReactIs.js to see how the exports are declared,
27
28import ReactIs = require('.');
29import { ReactElement } from 'react';
30
31export {};
32
33declare module '.' {
34 function isSuspenseList(value: any): value is ReactElement;
35
36 const SuspenseList: symbol;
37}