fix(types): fix `shallowRef` type error(#9839)

Merged
Merging
Alfred-Skyblue:fix/types/shallowRef
into
main
-42%
IMPROVEMENTS
0
REGRESSIONS
1
UNTOUCHED
52
NEW
0
DROPPED
0

Benchmarks

Failing

write reactive obj, read 1000 computeds
Regression
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, read 1000 computeds
-42%
39.5 ms
68.6 ms

Passing

1000 refs, 1 computed
packages/reactivity/__tests__/computed.bench.ts::computed::1000 refs, 1 computed
0%
14.7 ms
14.7 ms
create computed
packages/reactivity/__tests__/computed.bench.ts::computed::create computed
0%
37.8 µs
37.8 µs
write independent ref dep
packages/reactivity/__tests__/computed.bench.ts::computed::write independent ref dep
0%
55.8 µs
55.7 µs
write ref, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read 1000 computeds (invoked)
0%
3.4 ms
3.4 ms
write ref, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read 1000 computeds (never invoked)
0%
61.5 µs
61.6 µs
write ref, don't read computed (invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read computed (invoked)
-1%
122 µs
122.6 µs
write ref, don't read computed (never invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read computed (never invoked)
0%
54.4 µs
54.3 µs
write ref, read 1000 computeds
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, read 1000 computeds
0%
29.7 ms
29.7 ms
write ref, read computed
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, read computed
0%
285.1 µs
285.4 µs
reduce *raw* array, copied, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 10 elements
0%
378.6 µs
379.2 µs
reduce *raw* array, copied, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 100 elements
0%
247.5 µs
247.9 µs
reduce *raw* array, copied, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 1000 elements
0%
952.3 µs
952.6 µs
reduce *raw* array, manually triggered, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 10 elements
0%
1.2 ms
1.2 ms
reduce *raw* array, manually triggered, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 100 elements
0%
288.7 µs
288.7 µs
reduce *raw* array, manually triggered, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 1000 elements
0%
1.1 ms
1.1 ms
reduce *reactive* array, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 10 elements
0%
3.5 ms
3.5 ms
reduce *reactive* array, 10 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 10 elements, only change first value
0%
656.9 µs
656.6 µs
reduce *reactive* array, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 100 elements
0%
11.7 ms
11.7 ms
reduce *reactive* array, 100 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 100 elements, only change first value
0%
3.8 ms
3.8 ms
reduce *reactive* array, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 1000 elements
0%
122.6 ms
123.2 ms
reduce *reactive* array, 1000 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 1000 elements, only change first value
0%
35.4 ms
35.4 ms
reduce *readonly* array, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 10 elements
0%
1.1 ms
1.1 ms
reduce *readonly* array, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 100 elements
0%
6.7 ms
6.7 ms
reduce *readonly* array, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 1000 elements
0%
64 ms
64 ms
1000 reactive maps, 1 computed
packages/reactivity/__tests__/reactiveMap.bench.ts::1000 reactive maps, 1 computed
0%
31.7 ms
31.7 ms
create reactive map
packages/reactivity/__tests__/reactiveMap.bench.ts::create reactive map
0%
57.5 µs
57.5 µs
write reactive map (10'000 items), read computed
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map (10'000 items), read computed
0%
40.4 ms
40.4 ms
write reactive map property
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map property
0%
85.8 µs
85.7 µs
write reactive map, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read 1000 computeds (invoked)
0%
4.9 ms
4.9 ms
write reactive map, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read 1000 computeds (never invoked)
0%
76.5 µs
76.5 µs
write reactive map, don't read computed (invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read computed (invoked)
0%
178.1 µs
178.4 µs
write reactive map, don't read computed (never invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read computed (never invoked)
0%
62 µs
62 µs
write reactive map, read 1000 computeds
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, read 1000 computeds
0%
48.6 ms
48.6 ms
write reactive map, read computed
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, read computed
0%
303.3 µs
303.2 µs
1000 reactive objs, 1 computed
packages/reactivity/__tests__/reactiveObject.bench.ts::1000 reactive objs, 1 computed
0%
24.1 ms
24.1 ms
create reactive obj
packages/reactivity/__tests__/reactiveObject.bench.ts::create reactive obj
0%
50 µs
49.9 µs
write reactive obj property
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj property
-1%
93.4 µs
94 µs
write reactive obj, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read 1000 computeds (invoked)
+1%
3.5 ms
3.4 ms
write reactive obj, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read 1000 computeds (never invoked)
0%
123.5 µs
123.1 µs
write reactive obj, don't read computed (invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read computed (invoked)
0%
189.3 µs
189 µs
write reactive obj, don't read computed (never invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read computed (never invoked)
0%
92.6 µs
92.7 µs
write reactive obj, read computed
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, read computed
0%
297.7 µs
297.7 µs
create ref
packages/reactivity/__tests__/ref.bench.ts::ref::create ref
0%
41.7 µs
41.5 µs
read ref
packages/reactivity/__tests__/ref.bench.ts::ref::read ref
0%
22.2 µs
22.1 µs
write ref
packages/reactivity/__tests__/ref.bench.ts::ref::write ref
0%
88.8 µs
89 µs
write/read ref
packages/reactivity/__tests__/ref.bench.ts::ref::write/read ref
+1%
89.9 µs
89 µs
create watchEffect
packages/runtime-core/__tests__/apiWatch.bench.ts::create watchEffect
0%
107.1 µs
106.7 µs
create watcher
packages/runtime-core/__tests__/apiWatch.bench.ts::create watcher
0%
226.8 µs
226.4 µs
update ref to trigger watchEffect (executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watchEffect (executed)
0%
233.5 µs
233 µs
update ref to trigger watchEffect (scheduled but not executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watchEffect (scheduled but not executed)
0%
1.2 ms
1.2 ms
update ref to trigger watcher (executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watcher (executed)
0%
1.6 ms
1.6 ms
update ref to trigger watcher (scheduled but not executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watcher (scheduled but not executed)
0%
297.3 µs
296.7 µs

Commits

Click on a commit to change the comparison range
fix(sfc/cssVars): fix loss of CSS v-bind variables when setting inline style with string value (#9824) close #9821
base
0a387df
3 months ago by Alfred-Skyblue
-42%
fix(types): fix `shallowRef` type error
6c3b32e
3 months ago by Alfred-Skyblue
0%
Merge branch 'main' into fix/types/shallowRef
01d82a7
3 months ago by Alfred-Skyblue
0%
test(shallowRef): add test case
bf0cbde
3 months ago by Alfred-Skyblue
0%
Update ref.test-d.ts
09d913b
3 months ago by yyx990803
ResourcesHomePricingDocsBlogGitHub
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.