chore(types): delete @ts-ignore or use @ts-expected-error instead (#3669)
Co-authored-by: heyunfei.i <heyunfei.i@bytedance.com>
This commit is contained in:
@@ -112,14 +112,13 @@ describe('reactivity/reactive/Array', () => {
|
||||
})
|
||||
|
||||
test('add non-integer prop on Array should not trigger length dependency', () => {
|
||||
const array = new Array(3)
|
||||
const array: any[] & { x?: string } = new Array(3)
|
||||
const observed = reactive(array)
|
||||
const fn = jest.fn()
|
||||
effect(() => {
|
||||
fn(observed.length)
|
||||
})
|
||||
expect(fn).toHaveBeenCalledTimes(1)
|
||||
// @ts-ignore
|
||||
observed.x = 'x'
|
||||
expect(fn).toHaveBeenCalledTimes(1)
|
||||
observed[-1] = 'x'
|
||||
|
||||
Reference in New Issue
Block a user