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:
HeYunfei
2022-05-12 08:40:59 +08:00
committed by GitHub
parent cd395559ce
commit b5b103a736
8 changed files with 29 additions and 34 deletions

View File

@@ -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'