File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const Demo = createComponent({
3636## Reference
3737
3838``` typescript
39- function usePrevious<T >(state : T | Wrapper < T >) : Wrapper <T | undefined >;
39+ function usePrevious<T >(state : Wrapper < T > | (() => T )) : Wrapper <T >;
4040```
4141
4242### ` Arguments `
@@ -45,11 +45,10 @@ function usePrevious<T>(state: T | Wrapper<T>): Wrapper<T | undefined>;
4545
4646 ` props ` or ` Wrapper<any> `
4747
48- - Type: [ ` T | Wrapper<T> ` ] ( https://github.com/vuejs/vue-function-api/blob/1d532fe684e2343973ae46fc3ef93e497e6514b1/src/wrappers/index.ts#L5-L7 )
49- - Default: ` undefined `
48+ - Type: [ ` Wrapper<T> | (() => T) ` ] ( https://github.com/vuejs/vue-function-api/blob/1d532fe684e2343973ae46fc3ef93e497e6514b1/src/wrappers/index.ts#L5-L7 )
5049
5150### ` ReturnValue `
5251
53- - [ ` Wrapper<T | undefined > ` ] ( https://github.com/vuejs/vue-function-api/blob/1d532fe684e2343973ae46fc3ef93e497e6514b1/src/wrappers/index.ts#L5-L7 )
52+ - [ ` Wrapper<T> ` ] ( https://github.com/vuejs/vue-function-api/blob/1d532fe684e2343973ae46fc3ef93e497e6514b1/src/wrappers/index.ts#L5-L7 )
5453
5554_ [ ` T ` ] ( https://www.typescriptlang.org/docs/handbook/generics.html ) depends on your ` arguments ` type_
You can’t perform that action at this time.
0 commit comments