Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/vuePublic

Commit42942e9

Browse files
fix(types): fixshallowRef type error
1 parent305e4ae commit42942e9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/v3/reactivity/ref.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ declare const ShallowRefMarker: unique symbol
5151

5252
exporttypeShallowRef<T=any>=Ref<T>&{[ShallowRefMarker]?:true}
5353

54-
exportfunctionshallowRef<T>(value:T|Ref<T>):Ref<T>|ShallowRef<T>
55-
exportfunctionshallowRef<TextendsRef>(value:T):T
56-
exportfunctionshallowRef<T>(value:T):ShallowRef<T>
54+
exportfunctionshallowRef<T>(
55+
value:T
56+
):1extends(TextendsRef ?1 :0)
57+
?TextendsRef
58+
?IfAny<T,ShallowRef<T>,T>
59+
:ShallowRef<T>
60+
:ShallowRef<T>
5761
exportfunctionshallowRef<T=any>():ShallowRef<T|undefined>
5862
exportfunctionshallowRef(value?:unknown){
5963
returncreateRef(value,true)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp