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