This commit is contained in:
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,13 +331,20 @@ export const withOptions: {
|
|||||||
export const withRuntime: {
|
export const withRuntime: {
|
||||||
<E, R, P extends {}>(
|
<E, R, P extends {}>(
|
||||||
context: React.Context<Runtime.Runtime<R>>,
|
context: React.Context<Runtime.Runtime<R>>,
|
||||||
): (self: Component<E, R | Scope.Scope, P>) => React.FC<P>
|
): (self: Component<E, R, P> & Suspense) => React.FC<P & SuspenseProps>
|
||||||
<E, R, P extends {}>(
|
<E, R, P extends {}>(
|
||||||
self: Component<E, R | Scope.Scope, P>,
|
context: React.Context<Runtime.Runtime<R>>,
|
||||||
|
): (self: Component<E, R, P>) => React.FC<P>
|
||||||
|
<E, R, P extends {}>(
|
||||||
|
self: Component<E, R, P> & Suspense,
|
||||||
|
context: React.Context<Runtime.Runtime<R>>,
|
||||||
|
): React.FC<P & SuspenseProps>
|
||||||
|
<E, R, P extends {}>(
|
||||||
|
self: Component<E, R, P>,
|
||||||
context: React.Context<Runtime.Runtime<R>>,
|
context: React.Context<Runtime.Runtime<R>>,
|
||||||
): React.FC<P>
|
): React.FC<P>
|
||||||
} = Function.dual(2, <E, R, P extends {}>(
|
} = Function.dual(2, <E, R, P extends {}>(
|
||||||
self: Component<E, R | Scope.Scope, P>,
|
self: Component<E, R, P>,
|
||||||
context: React.Context<Runtime.Runtime<R>>,
|
context: React.Context<Runtime.Runtime<R>>,
|
||||||
): React.FC<P> => function WithRuntime(props) {
|
): React.FC<P> => function WithRuntime(props) {
|
||||||
const runtime = React.useContext(context)
|
const runtime = React.useContext(context)
|
||||||
|
|||||||
Reference in New Issue
Block a user