Make effect decorator generic

This commit is contained in:
Seth Posner 2023-05-07 06:58:13 -07:00 committed by thepaperpilot
parent 006bfdf65d
commit d7a2049ca2

View file

@ -27,8 +27,8 @@ export type Decorator<
export type GenericDecorator = Decorator<unknown>; export type GenericDecorator = Decorator<unknown>;
export interface EffectFeatureOptions { export interface EffectFeatureOptions<T = unknown> {
effect: Computable<unknown>; effect: Computable<T>;
} }
export type EffectFeature<T extends EffectFeatureOptions> = Replace< export type EffectFeature<T extends EffectFeatureOptions> = Replace<
@ -36,9 +36,9 @@ export type EffectFeature<T extends EffectFeatureOptions> = Replace<
{ effect: GetComputableType<T["effect"]> } { effect: GetComputableType<T["effect"]> }
>; >;
export type GenericEffectFeature = Replace< export type GenericEffectFeature<T = unknown> = Replace<
EffectFeature<EffectFeatureOptions>, EffectFeature<EffectFeatureOptions>,
{ effect: ProcessedComputable<unknown> } { effect: ProcessedComputable<T> }
>; >;
/** /**