vue3-yuanma/test-dts/reactivity.test-d.ts

10 lines
264 B
TypeScript

import { readonly, describe, expectError } from './index'
describe('should support DeepReadonly', () => {
const r = readonly({ obj: { k: 'v' } })
// @ts-expect-error
expectError((r.obj = {}))
// @ts-expect-error
expectError((r.obj.k = 'x'))
})