chore: prefer const (#865)
This commit is contained in:
parent
8adf0d682a
commit
14908f2734
@ -112,8 +112,8 @@ describe('api: watch', () => {
|
||||
let dummy
|
||||
watch([() => state.count, status] as const, (vals, oldVals) => {
|
||||
dummy = [vals, oldVals]
|
||||
let [count] = vals
|
||||
let [, oldStatus] = oldVals
|
||||
const [count] = vals
|
||||
const [, oldStatus] = oldVals
|
||||
// assert types
|
||||
count + 1
|
||||
oldStatus === true
|
||||
@ -412,7 +412,7 @@ describe('api: watch', () => {
|
||||
|
||||
it('warn and not respect deep option when using effect', async () => {
|
||||
const arr = ref([1, [2]])
|
||||
let spy = jest.fn()
|
||||
const spy = jest.fn()
|
||||
watchEffect(
|
||||
() => {
|
||||
spy()
|
||||
|
Loading…
Reference in New Issue
Block a user