@@ -20,7 +20,7 @@ export interface ComputedRef<T = any> extends WritableComputedRef<T> {
20
20
[ ComputedRefSymbol ] : true
21
21
}
22
22
23
- export interface WritableComputedRef < T > extends Ref < T > {
23
+ export interface WritableComputedRef < T , S = T > extends Ref < T , S > {
24
24
/**
25
25
* @deprecated computed no longer uses effect
26
26
*/
@@ -30,9 +30,9 @@ export interface WritableComputedRef<T> extends Ref<T> {
30
30
export type ComputedGetter < T > = ( oldValue ?: T ) => T
31
31
export type ComputedSetter < T > = ( newValue : T ) => void
32
32
33
- export interface WritableComputedOptions < T > {
33
+ export interface WritableComputedOptions < T , S = T > {
34
34
get : ComputedGetter < T >
35
- set : ComputedSetter < T >
35
+ set : ComputedSetter < S >
36
36
}
37
37
38
38
/**
@@ -175,10 +175,10 @@ export function computed<T>(
175
175
getter : ComputedGetter < T > ,
176
176
debugOptions ?: DebuggerOptions ,
177
177
) : ComputedRef < T >
178
- export function computed < T > (
179
- options : WritableComputedOptions < T > ,
178
+ export function computed < T , S = T > (
179
+ options : WritableComputedOptions < T , S > ,
180
180
debugOptions ?: DebuggerOptions ,
181
- ) : WritableComputedRef < T >
181
+ ) : WritableComputedRef < T , S >
182
182
export function computed < T > (
183
183
getterOrOptions : ComputedGetter < T > | WritableComputedOptions < T > ,
184
184
debugOptions ?: DebuggerOptions ,
0 commit comments