0.1.0 #1
@@ -112,8 +112,8 @@ export interface Suspense {
|
|||||||
|
|
||||||
export type SuspenseProps = Omit<React.SuspenseProps, "children">
|
export type SuspenseProps = Omit<React.SuspenseProps, "children">
|
||||||
|
|
||||||
export const suspense = <T extends Component<any, any, any>>(
|
export const suspense = <T extends Component<any, any, P>, P extends {}>(
|
||||||
self: ExcludeKeys<T, keyof Suspense>
|
self: ExcludeKeys<T, keyof Suspense> & Component<any, any, ExcludeKeys<P, keyof SuspenseProps>>
|
||||||
): T & Suspense => Object.setPrototypeOf(
|
): T & Suspense => Object.setPrototypeOf(
|
||||||
{ ...self, suspense: true },
|
{ ...self, suspense: true },
|
||||||
Object.getPrototypeOf(self),
|
Object.getPrototypeOf(self),
|
||||||
@@ -121,9 +121,6 @@ export const suspense = <T extends Component<any, any, any>>(
|
|||||||
|
|
||||||
|
|
||||||
export const useFC: {
|
export const useFC: {
|
||||||
<E, R, P extends {}>(
|
|
||||||
self: Component<E, R, ExcludeKeys<P, keyof SuspenseProps>> & Suspense
|
|
||||||
): Effect.Effect<React.FC<P & SuspenseProps>, never, Exclude<R, Scope.Scope>>
|
|
||||||
<E, R, P extends {}>(
|
<E, R, P extends {}>(
|
||||||
self: Component<E, R, P>
|
self: Component<E, R, P>
|
||||||
): Effect.Effect<React.FC<P>, never, Exclude<R, Scope.Scope>>
|
): Effect.Effect<React.FC<P>, never, Exclude<R, Scope.Scope>>
|
||||||
|
|||||||
Reference in New Issue
Block a user