@@ -505,7 +505,7 @@ export declare namespace withSignature {
|
||||
|
||||
export type Result<
|
||||
T extends Component<any, any, any, any>,
|
||||
F extends React.FC,
|
||||
F extends Signature,
|
||||
> = Omit<T, "use" | "asFunctionComponent"> & {
|
||||
readonly use: Effect.Effect<F, never, Exclude<Component.Context<T>, Scope.Scope>>
|
||||
asFunctionComponent(
|
||||
@@ -521,7 +521,9 @@ export const withSignature: {
|
||||
<F extends withSignature.Signature, T extends Component<any, any, any, any>>(
|
||||
self: T
|
||||
): withSignature.Result<T, F>
|
||||
} = Function.dual(1, identity)
|
||||
} = (self?: Component<any, any, any, any>): any => self === undefined
|
||||
? identity
|
||||
: self
|
||||
|
||||
/**
|
||||
* Creates a new component with modified configuration options while preserving all original behavior.
|
||||
|
||||
Reference in New Issue
Block a user