Skip to content

Commit 9066b65

Browse files
committed
feat: sync Vue 3.4
1 parent 4d5ac3e commit 9066b65

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"types": ["node"],
1212
"strict": true,
1313
"noUnusedLocals": true,
14-
"esModuleInterop": true,
15-
"skipLibCheck": true
14+
"esModuleInterop": true
1615
},
1716
"include": ["src", "tests"]
1817
}

types.d.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import type {
22
ComputedGetter,
3+
ComputedRefSymbol,
34
DebuggerOptions,
5+
RawSymbol,
46
ReactiveEffect,
7+
RefSymbol,
58
RefUnwrapBailTypes,
9+
ShallowReactiveMarker,
10+
ShallowRefMarker,
611
WritableComputedOptions,
712
} from '@vue/reactivity/dist/reactivity'
813
import type { IfAny } from '@vue/shared'
@@ -40,14 +45,16 @@ export {
4045
ReactiveEffectOptions,
4146
effect,
4247
ITERATE_KEY,
48+
ShallowRefMarker,
49+
RawSymbol,
50+
RefSymbol,
51+
ShallowReactiveMarker,
52+
ComputedRefImpl,
53+
ComputedRefSymbol,
54+
pauseScheduling,
55+
resetScheduling,
4356
} from '@vue/reactivity/dist/reactivity'
4457

45-
declare const ComputedRefSymbol: unique symbol
46-
declare const RawSymbol: unique symbol
47-
declare const RefSymbol: unique symbol
48-
declare const ShallowReactiveMarker: unique symbol
49-
declare const ShallowRefMarker: unique symbol
50-
5158
declare type Primitive =
5259
| string
5360
| number
@@ -284,3 +291,10 @@ declare type UnwrapRefSimple<T> = T extends
284291
export declare interface WritableComputedRef<T> extends Ref<T> {
285292
readonly effect: ReactiveEffect<T>
286293
}
294+
295+
export type MaybeRef<T = any> = T | Ref<T>
296+
export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T)
297+
298+
export declare function toValue<T>(
299+
source: MaybeRefOrGetter<T> | ComputedRef<T>,
300+
): T

0 commit comments

Comments
 (0)