Cleanup
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-07-22 20:22:47 +02:00
parent aa8feb79fa
commit 8737e8893b
2 changed files with 7 additions and 21 deletions
+2 -16
View File
@@ -341,14 +341,11 @@ export const withOptions: {
export const useFC: {
<E, R, P extends {}>(
self: Component<E, R, P> & Suspense.Suspense
): Effect.Effect<React.FC<P & Suspense.Suspense.Props>, never, Exclude<R, Scope.Scope>>
<E, R, P extends {}>(
self: Component<E, R, P>
): Effect.Effect<React.FC<P>, never, Exclude<R, Scope.Scope>>
} = Effect.fn("useFC")(function* <E, R, P extends {}>(
self: Component<E, R, P> & (Memoized.Memoized<P> | Suspense.Suspense | {})
self: Component<E, R, P>
) {
const runtimeRef = React.useRef<Runtime.Runtime<Exclude<R, Scope.Scope>>>(null!)
runtimeRef.current = yield* Effect.runtime<Exclude<R, Scope.Scope>>()
@@ -395,10 +392,6 @@ export const useFC: {
})
export const use: {
<E, R, P extends {}>(
self: Component<E, R, P> & Suspense.Suspense,
fn: (Component: React.FC<P & Suspense.Suspense.Props>) => React.ReactNode,
): Effect.Effect<React.ReactNode, never, Exclude<R, Scope.Scope>>
<E, R, P extends {}>(
self: Component<E, R, P>,
fn: (Component: React.FC<P>) => React.ReactNode,
@@ -408,16 +401,9 @@ export const use: {
})
export const withRuntime: {
<T extends Component<any, R, any>, R>(
context: React.Context<Runtime.Runtime<R>>,
): (self: T) => React.FC<T extends Suspense.Suspense
? Component.Props<T> & Suspense.Suspense.Props
: Component.Props<T>
>
<E, R, P extends {}>(
self: Component<E, R, P> & Suspense.Suspense,
context: React.Context<Runtime.Runtime<R>>,
): React.FC<P & Suspense.Suspense.Props>
): (self: Component<E, R, P>) => React.FC<P>
<E, R, P extends {}>(
self: Component<E, R, P>,
context: React.Context<Runtime.Runtime<R>>,