Skip to content

Commit

Permalink
feat: sync Vue 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Apr 9, 2024
1 parent 4d5ac3e commit 9066b65
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
3 changes: 1 addition & 2 deletions tsconfig.json
Expand Up @@ -11,8 +11,7 @@
"types": ["node"],
"strict": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"skipLibCheck": true
"esModuleInterop": true
},
"include": ["src", "tests"]
}
26 changes: 20 additions & 6 deletions types.d.ts
@@ -1,8 +1,13 @@
import type {
ComputedGetter,
ComputedRefSymbol,
DebuggerOptions,
RawSymbol,
ReactiveEffect,
RefSymbol,
RefUnwrapBailTypes,
ShallowReactiveMarker,
ShallowRefMarker,
WritableComputedOptions,
} from '@vue/reactivity/dist/reactivity'
import type { IfAny } from '@vue/shared'
Expand Down Expand Up @@ -40,14 +45,16 @@ export {
ReactiveEffectOptions,
effect,
ITERATE_KEY,
ShallowRefMarker,
RawSymbol,
RefSymbol,
ShallowReactiveMarker,
ComputedRefImpl,
ComputedRefSymbol,
pauseScheduling,
resetScheduling,
} from '@vue/reactivity/dist/reactivity'

declare const ComputedRefSymbol: unique symbol
declare const RawSymbol: unique symbol
declare const RefSymbol: unique symbol
declare const ShallowReactiveMarker: unique symbol
declare const ShallowRefMarker: unique symbol

declare type Primitive =
| string
| number
Expand Down Expand Up @@ -284,3 +291,10 @@ declare type UnwrapRefSimple<T> = T extends
export declare interface WritableComputedRef<T> extends Ref<T> {
readonly effect: ReactiveEffect<T>
}

export type MaybeRef<T = any> = T | Ref<T>
export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T)

export declare function toValue<T>(
source: MaybeRefOrGetter<T> | ComputedRef<T>,
): T

0 comments on commit 9066b65

Please sign in to comment.